JavaScript/TypeScript ORM Libraries
JavaScript/TypeScript ORM Libraries
ORM libraries for JavaScript and TypeScript provide modern solutions focused on type safety and developer experience. Prisma features auto-generated typed clients, TypeORM offers a decorator-based approach, and Drizzle ORM provides lightweight and fast implementation. They are designed for Node.js environments and support major databases like PostgreSQL, MySQL, and SQLite.
GitHub Star Comparison
No | Name | GitHub Stars | Description | Trend | License | Type | Official Site |
---|---|---|---|---|---|---|---|
1 | TypeORM | ⭐ 35.7k | TypeORM is a modern ORM library for TypeScript and JavaScript. Supporting both Active Record and Data Mapper patterns, it works with major databases including MySQL, PostgreSQL, MongoDB, and SQLite. With decorator-based schema definition and powerful Query Builder, TypeORM enables type-safe and maintainable database operations. | stable | MIT | Library | Official |
2 | Sequelize | ⭐ 30.1k | Sequelize is a mature Promise-based ORM library for Node.js developed with the concept of "HTTP for humans." With over 9 years of production-proven experience, it supports PostgreSQL, MySQL, MariaDB, SQLite, and Microsoft SQL Server, establishing itself as one of the most popular ORMs in the Node.js ecosystem. Enhanced TypeScript support through sequelize-typescript provides comprehensive features needed for enterprise-level application development. | stable | MIT | Library | Official |
3 | Drizzle ORM | ⭐ 29.3k | Drizzle ORM is a SQL-centric TypeScript ORM that's lightweight with zero dependencies, optimized for serverless environments. Designed with the concept "If you know SQL, you know Drizzle," it balances high performance with intuitive API design as a headless ORM. | stable | Apache-2.0 | Library | Official |
4 | Drizzle | ⭐ 29.3k | Drizzle is a lightweight, serverless-ready next-generation ORM library for TypeScript. With the motto "If you know SQL, you know Drizzle," it provides SQL-like design and minimal abstraction with zero dependencies. At just 7.4KB (minified+gzipped) with cold start optimization, it excels in serverless environments and runs on Node.js, Bun, and Deno, making it the ideal database solution for modern TypeScript development. | stable | MIT | Library | - |
5 | Mongoose | ⭐ 27.3k | Mongoose is the de facto standard ODM (Object Document Mapper) for using MongoDB in Node.js environments. It provides powerful schema definitions, validation, and middleware capabilities, enabling structured data management while maintaining MongoDB's flexibility. | stable | MIT | Library | Official |
6 | Kysely | ⭐ 12.3k | Kysely is a type-safe SQL query builder designed specifically for TypeScript. It adopts an innovative approach that combines the power of raw SQL with TypeScript's type checking, specializing in complex query creation. Unlike traditional ORMs, Kysely enables direct SQL operations without sacrificing type safety for developers who prioritize SQL control. Type inference from database schemas detects access to non-existent tables or columns at compile time, significantly reducing runtime errors. The fluent API utilizing functional programming paradigms allows natural description of complex analytics queries and data warehouse operations. | stable | MIT | Library | - |
7 | MikroORM | ⭐ 8.4k | MikroORM is "a TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns" designed as a modern, high-performance ORM. Supporting MongoDB, MySQL, MariaDB, PostgreSQL, SQLite, and more databases, it prioritizes strict type safety and testability. It provides rich features including automatic migrations, entity generators, and query builders, optimized for enterprise development with excellent maintainability and scalability. | stable | MIT | Library | Official |
8 | MikroORM | ⭐ 8.4k | MikroORM is an ORM that adopts a TypeScript-first approach. It implements Data Mapper pattern, Unit of Work, and Identity Map patterns, supporting MongoDB, MySQL, MariaDB, PostgreSQL, and SQLite while providing strict type safety. | stable | MIT | Library | - |
9 | Objection.js | ⭐ 7.3k | Objection.js is an SQL-friendly ORM for Node.js designed to stay out of your way and make it as easy as possible to use the full power of SQL and the underlying database engine. Built on the Knex.js query builder, it provides both the benefits of an SQL query builder and a powerful set of tools for working with relations. More accurately described as a "relational query builder" rather than a traditional ORM, it uses SQL as a query language while making common operations easy and enjoyable. It's a practical solution that perfectly balances direct SQL control with the benefits of object mapping. | stable | MIT | Library | - |
10 | Prisma ORM | - | Prisma ORM is a next-generation ORM for TypeScript/JavaScript. It features type safety, auto-generated client, and intuitive data modeling language, supporting PostgreSQL, MySQL, SQLite, MongoDB, and SQL Server. It's a modern ORM designed with developer experience as the top priority. | stable | MIT | Library | - |