For persistence layers, the strongest matches are go-gorm/gorm (Gorm is a comprehensive object-relational mapping library for Go), seaql/sea-orm (Sea-ORM is an asynchronous object-relational mapping toolkit and database) and sequelize/sequelize (Sequelize is a feature-rich object-relational mapping library for Node). encode/databases and mikro-orm/mikro-orm round out the shortlist. Each is ranked by relevance to your query, popularity and recent activity.
Hand-picked open-source persistence layers ranked by GitHub stars and activity. Compare the top options, features, and find the right one.
GORM is a developer-focused object-relational mapping library for Go that provides a comprehensive data persistence framework. It serves as a database access layer, allowing developers to map application structures to database tables and perform CRUD operations using a fluent, type-safe query builder instead of writing raw SQL. The library distinguishes itself through its association-aware persistence, which automatically tracks and synchronizes complex entity relationships during database operations. It utilizes a driver-agnostic interface to maintain consistent behavior across various stora
Gorm is a comprehensive object-relational mapping library for Go that provides a complete data persistence framework, matching all the required database interaction and migration features.
Sea-ORM is an asynchronous SQL object-relational mapper and database toolkit for mapping relational tables to strongly typed objects. It provides a relational database mapper for performing CRUD operations across MySQL, PostgreSQL, and SQLite, and includes a programmatic dynamic query builder for constructing complex SQL statements. The project distinguishes itself by providing a GraphQL schema generator that transforms database entities into typed schemas with built-in pagination and filters. It also features a dedicated database migration tool for defining and applying versioned schema chan
Sea-ORM is an asynchronous object-relational mapping toolkit and database framework for Rust that provides strongly typed CRUD operations, migration management, a query builder, and multi-database support.
Sequelize is an object-relational mapping library that provides a unified interface for managing relational data through code. By implementing the Active Record pattern, it maps database tables to application objects, allowing developers to perform standard create, read, update, and delete operations using high-level method calls. The library abstracts complex database interactions by translating these calls into optimized, engine-specific SQL statements, ensuring consistent behavior across different database systems. The project distinguishes itself through a comprehensive suite of tools for
Sequelize is a feature-rich object-relational mapping library for Node.js that handles multi-database persistence, connection pooling, and migrations, though it implements a combination of the Data Mapper and Repository patterns rather than strict Active Record.
This project is an asyncio database abstraction layer that provides a common interface for performing non-blocking database operations in Python. It functions as an asynchronous database driver wrapper and a SQL expression builder, allowing for the construction of raw SQL strings from structured Python objects. The library includes an asyncio connection pool manager that utilizes task-local storage to handle connection lifecycles and reduce resource overhead. It also serves as an async database transaction manager, wrapping operations in atomic transactions and savepoints to maintain data int
This Python library provides asynchronous database abstraction, connection pooling, and transaction management, serving as a lower-level persistence building block that fits the core domain well.
Mikro-ORM is a TypeScript-based object-relational mapping system that provides a unified persistence layer for Node.js applications. It translates TypeScript entities into relational or document-based database schemas, supporting a variety of engines including PostgreSQL, MySQL, MariaDB, MS SQL Server, SQLite, and MongoDB. The project implements the data mapper pattern to decouple in-memory domain models from the database persistence layer. It utilizes a unit of work pattern to track entity changes in memory and commit them in a single coordinated database transaction. The library covers com
Mikro-ORM is a TypeScript-based ORM and persistence layer for Node.js supporting object-relational mapping, migrations, query building, connection pooling, and transactions across multiple databases.
Knex is a multi-dialect database client that provides a programmatic SQL query builder, a connection pool manager, and a versioned schema migration tool. It enables programmatic database interaction across multiple SQL engines, including PostgreSQL, MySQL, SQLite3, SQL Server, CockroachDB, and Oracle. The project distinguishes itself through a fluent interface for constructing complex SQL statements and a dedicated framework for database seeding. It utilizes specialized dialects to translate generic query representations into database-specific syntax while maintaining a consistent API across
Knex is a multi-dialect SQL query builder and connection pool manager that handles database interactions and migrations, though it operates as a query builder rather than a full object-relational mapping (ORM) framework.
Peewee is a SQL object-relational mapper and query builder that provides an object-oriented interface for mapping application classes to relational database tables. It functions as a relational database toolkit for managing schemas, executing migrations, and handling complex table relationships. The project distinguishes itself by providing an asyncio database driver for non-blocking database operations, ensuring event loop responsiveness. It also supports semi-structured data storage, allowing the storage and querying of flexible JSON documents within traditional relational database systems.
Peewee is an object-relational mapping and query building framework for Python that covers core database persistence needs including connection pooling, migrations, transactions, and multi-database support.
Ebean is a Java object-relational mapping framework designed to simplify database persistence through automated query generation, schema migration, and transaction management. It uses metadata-driven mapping and bytecode enhancement to bridge the gap between application objects and relational database tables, providing a persistent layer that handles complex data interactions while maintaining consistency across unit-of-work boundaries. The framework distinguishes itself through its focus on developer productivity and performance optimization. It provides type-safe query builders that generat
Ebean is a Java persistence framework that delivers object-relational mapping, query building, migration management, and multi-database support to streamline application data storage.
TypeORM is an object-relational mapper for TypeScript and JavaScript that bridges the gap between object-oriented application code and relational database tables. It provides a comprehensive data persistence layer that allows developers to define database entities using class decorators or configuration objects, enabling seamless interaction with data through object-oriented patterns. The project distinguishes itself through a flexible architecture that supports both the data mapper and repository patterns, alongside a fluent query builder that translates high-level method calls into platform
TypeORM is a TypeScript and JavaScript object-relational mapper that provides a comprehensive persistence layer featuring entity mapping, migrations, query building, connection pooling, and multi-database support.
Ent is a statically typed entity framework for Go that models database structures as a graph of nodes and edges. It functions as a code generation engine that transforms schema definitions into type-safe database clients, query builders, and migration scripts. By representing data as interconnected entities, the framework enables intuitive traversal of complex relationships and ensures that database interactions remain consistent with the application model at compile time. The framework distinguishes itself through its graph-based approach to data modeling and its reliance on compile-time cod
Ent is an entity framework and ORM for Go that provides type-safe query building, schema migration management, and graph-based relationship traversal for database persistence.
WCDB is a cross-platform storage layer and embedded database engine that serves as a framework for SQLite. It functions as an object relational mapper, linking application classes to database tables to enable data operations via objects rather than raw queries. The project is distinguished by an integrated encryption layer for securing data at rest and a full-text search engine that uses language-specific tokenizers for text lookups. It also features transparent field compression to reduce storage footprints and a connection-pooling model to coordinate simultaneous read and write operations a
WCDB is an embedded database framework and object-relational mapper for SQLite that handles connection pooling, data encryption, and object-based queries, though it is specifically tailored for mobile and desktop application storage rather than general server-side database interaction.
SQLAlchemy is a comprehensive Python SQL toolkit and object-relational mapper that provides a full suite of tools for interacting with relational databases. It serves as a foundational layer for database connectivity, offering both a high-level object-oriented interface for data persistence and a programmatic SQL expression language for constructing complex, dialect-agnostic queries. The project distinguishes itself through its sophisticated unit of work persistence, which coordinates atomic transactions and tracks object state changes to minimize redundant database operations. It provides a
SQLAlchemy is a comprehensive Python ORM framework and SQL toolkit that provides robust database connectivity, migration-adjacent tooling, a powerful query builder, and full transaction management for application persistence.
Prisma is a database toolkit that provides a unified access layer for interacting with relational and document databases. It centers on a declarative schema modeling approach, where developers define their data structures in a human-readable language. This schema serves as the single source of truth, from which the toolkit automatically generates type-safe database clients that provide compile-time validation and editor autocomplete for all data operations. The project distinguishes itself through a high-performance, Rust-based query engine that handles query planning and connection pooling o
Prisma is a comprehensive database toolkit and ORM that delivers declarative schema modeling, type-safe query generation, connection pooling, and multi-database support.
Knex is a programmatic SQL query builder for Node.js applications. It provides a unified interface for generating database statements and managing structural versioning through a schema migration tool. The project features a multi-dialect database layer that translates programmatic queries into specific syntax for relational databases including PostgreSQL, MySQL, SQLite3, and MSSQL. This allows for writing database logic that remains compatible across different systems. The system includes infrastructure for managing reusable database connection pools and handling relational transactions to
Knex provides a programmatic SQL query builder, connection pooling, schema migrations, and multi-database support for Node.js, fulfilling most requirements for an application persistence layer despite operating as a query builder rather than a full ORM.
Objection.js is an object-relational mapper for Node.js that maps SQL database tables to classes and rows to model instances. It functions as a high-level abstraction layer built on top of the Knex.js query builder to provide structured model definitions and relational data mapping. The project distinguishes itself through its ability to manage complex object graphs, allowing for the persistence and eager-loading of deeply nested related data in single operations. It incorporates a data integrity layer that uses JSON schema validation to verify model instances before they are persisted to the
Objection.js is an object-relational mapper for Node.js built on top of Knex.js that provides structured model definitions, complex object graph persistence, and relational data mapping, matching the requested data storage category.
Bun is a type-safe object relational mapper for Go that prioritizes SQL-first query construction and result mapping. It functions as a programmable SQL query builder, a database connection manager, and a tool for mapping database tables to Go structs. The project distinguishes itself through a multi-dialect SQL support system, allowing a single codebase to interact with different database engines via a consistent interface. It includes a built-in database observability tool for query interception, distributed tracing, and logging, as well as a schema migration tool for versioning structural c
Bun is a type-safe Go ORM and SQL query builder that supports connection pooling, migrations, and multi-database persistence, fitting this requirement squarely.
Hibernate ORM is a Java object-relational mapper and a full implementation of the Jakarta Persistence API. It serves as a SQL database abstraction layer that translates Java object models into relational database schemas to manage data persistence and lifecycles. The framework distinguishes itself with a multi-tenant data isolation framework for separating customer data within a single database instance. It also features a database schema generator that automatically produces and updates relational structures based on entity mappings. The system covers broad capability areas including transa
Hibernate ORM is a comprehensive Java object-relational mapping and persistence framework that provides robust support for connection pooling, transaction management, migration management, and multi-database connectivity.
SQLModel is a type-safe object-relational mapping library for Python that integrates database schema definitions with data validation logic. By combining these two roles into a single class, it allows developers to manage relational data structures and enforce data integrity for web APIs simultaneously. The framework is built to support asynchronous database operations, enabling high-performance applications to execute queries and transactions without blocking the main execution thread. The library distinguishes itself by leveraging Python type hints to provide IDE autocompletion and compile-
SQLModel is a type-safe object-relational mapping and database management library for Python that integrates schema definitions, data validation, and query operations for robust persistence layers.
Entity Framework Core is an object-relational mapper that enables developers to interact with database systems using strongly-typed code. It serves as a comprehensive data access framework, providing a unified interface for mapping application objects to relational and non-relational database schemas while managing the lifecycle of data operations through a central context. The project distinguishes itself through a provider-based architecture that decouples core data access logic from specific database engines, allowing for consistent interaction across diverse storage systems. It features a
Entity Framework Core is a comprehensive object-relational mapping framework for .NET that provides migration management, a robust query builder, connection pooling, and multi-database support for application state persistence.
Doctrine ORM is a PHP object-relational mapper that connects application objects to relational database tables. It uses the data mapper and identity map patterns to decouple the in-memory object model from the database schema, allowing developers to manage data persistence without writing manual SQL. The project features a dedicated object-oriented query language and programmatic builder for retrieving data based on entities rather than tables. It implements a unit-of-work system to track object changes during a request and synchronize them via atomic transactions. The capability surface inc
Doctrine ORM provides robust object-relational mapping, transaction management, query building, and connection pooling for PHP, making it a comprehensive persistence layer for managing application state.
This project is a type-safe database toolkit and object-relational mapper designed to enforce structural consistency between database schemas and application code. By leveraging compile-time validation, it ensures that SQL queries and data structures remain synchronized, preventing common errors before the application executes. It provides a comprehensive framework for relational data modeling, allowing developers to define table associations and map database results directly into strongly-typed language objects. The library distinguishes itself through its focus on compile-time safety and au
Diesel is a type-safe database toolkit and object-relational mapper for Rust that covers data persistence, query building, schema migrations, and connection management, though it relies on compile-time verification rather than traditional runtime multi-database flexibility.
GRDB.swift is a comprehensive SQLite toolkit and object-relational mapper for Swift. It provides a database wrapper that handles local data persistence, connection management, and encrypted file storage for Apple platforms. The library features a dedicated observation framework that tracks database changes to automatically synchronize the application state and user interface in real time. It distinguishes itself with a type-safe query builder and a protocol-based mapping system that converts database rows into structured Swift objects. The toolkit covers a broad range of administrative and o
GRDB.swift is a robust SQLite toolkit and object-relational mapper for Swift that covers most required persistence features like query building, migration management, and connection pooling, though it is specifically tied to SQLite rather than multi-database support.
MyBatis-Plus is a persistence framework extension for Java that simplifies data access by reducing boilerplate code. It provides a toolkit for automating common database operations, utilizing dynamic query wrappers and a system for automated CRUD generation. The project distinguishes itself through a code generation system that produces mapper, model, service, and controller layers based on database metadata. It also implements a security layer that prevents SQL injection through input sanitization and blocks dangerous global update or delete operations to prevent accidental data loss. The f
MyBatis-Plus is a Java persistence framework that simplifies database interactions with CRUD generation and query wrappers, though it focuses more on extension than being a complete independent ORM layer.
MyBatis is a Java persistence framework that functions as a database query mapper and object-relational mapping tool. It decouples SQL statements from application code, allowing developers to manage database interactions by mapping Java objects to relational database records. The framework provides a centralized approach to SQL query management, enabling the use of either XML configuration files or annotations to define persistence logic. It automates the transformation of database result sets into structured objects, which eliminates the need for manual data conversion and reduces repetitive
MyBatis is a Java persistence framework that handles object-relational mapping and database query execution, though it focuses on custom SQL mapping rather than full automated CRUD generation or migration management.
Simplifies the development of creating a JPA-based data access layer.
Spring Data JPA provides a comprehensive Java persistence framework that simplifies database interactions through object-relational mapping, query generation, and seamless integration with the Spring ecosystem.
Sequel is a relational database toolkit for Ruby that provides object-relational mapping, a fluent SQL query builder, and schema migration capabilities. It maps database tables to Ruby classes with support for associations, validations, lifecycle hooks, and eager loading, offering a comprehensive ORM layer for building data-centric applications. Sequel distinguishes itself through a plugin-based extension architecture that allows composable customization of models, databases, and datasets without relying on deep inheritance hierarchies. It includes a thread-safe connection pool with support f
Sequel is a robust Ruby database toolkit that handles object-relational mapping, query building, migrations, and connection pooling, fitting the core persistence layer requirements well.
FreeSql is a .NET object-relational mapper and data access layer that translates object-oriented code into SQL for multiple relational database providers. It functions as a fluent SQL query builder and database schema synchronizer, allowing developers to align database table and index structures with entity class definitions. The framework is specifically optimized for .NET Native AOT to ensure reduced memory footprints and faster startup times. It includes a database traffic manager to distribute load through read-write splitting, dynamic table sharding, and tenant-based data isolation. Bro
FreeSql is an object-relational mapper and data access framework for .NET that provides database schema synchronization, query building, and multi-database support.
Flask-SQLAlchemy is a relational database toolkit that integrates the SQLAlchemy object-relational mapper into web applications. It serves as a database session manager and schema toolkit, providing the necessary infrastructure to define data models and execute queries within a request lifecycle. The project is distinguished by its multi-database routing engine, which uses bind-keys to map different models to multiple distinct database engines. It also includes a SQL query auditing tool that captures and logs executed statements and timing data for a single request to identify performance bot
Flask-SQLAlchemy provides object-relational mapping, connection management, and session scoping for applications, though it functions as an integration toolkit rather than a standalone database framework.
jOOQ is a type-safe SQL query builder for Java that generates code from live database schemas, enabling compile-time validation of SQL syntax and data types. Its core identity is built around a fluent DSL that mirrors SQL structure, a code generator that maps tables, views, and routines to Java objects, and a multi-dialect engine that translates the same DSL into vendor-specific SQL for over 30 databases. The project also includes a SQL parser and transformer for refactoring or dialect conversion, reactive stream integration for non-blocking query execution, and a JDBC proxy diagnostics tool f
jOOQ provides a type-safe SQL query builder and code generator for Java that handles database interactions, though it focuses more on fluent SQL composition than traditional ORM mapping.
This project is a full-stack web framework designed for building database-backed applications through a standardized architectural pattern. It provides a comprehensive suite of integrated libraries that manage the entire request-response lifecycle, from routing incoming web traffic to rendering dynamic server-side templates. By utilizing an object-relational mapping layer, the framework allows developers to define domain models that map database tables directly to application objects, simplifying data persistence, schema migrations, and complex relationship management. The framework is distin
This repository provides a comprehensive full-stack web framework that includes a robust object-relational mapping layer, migration management, and database tools, fitting the persistence layer category while also encompassing broader web framework features.
Waterline is an adapter-based database library and object relational mapper for Node.js. It serves as a multi-database persistence layer that translates standard method calls into specific queries for both SQL and NoSQL databases. The library provides a unified interface for managing data across different stores, including MySQL, PostgreSQL, MongoDB, and Microsoft SQL Server. This architecture allows for the integration of multiple database backends within a single application and facilitates database vendor migration by changing adapters without altering business logic. The project covers r
Waterline is an adapter-based ORM and multi-database persistence layer for Node.js that provides unified data access across SQL and NoSQL stores, though it lacks built-in migration management and connection pooling features out of the box.
A dependency meta-package designed for PHP applications that groups database management libraries and Doctrine ORM together for installation. It functions as a wrapper and persistence layer connecting applications to relational databases by mapping object-oriented models to database tables. The package aggregates multiple related library dependencies into a single distribution using standard package management to ensure version compatibility. It applies convention-driven configuration defaults so applications operate immediately upon installation and manages evolutionary database changes thro
This repository provides a convenient meta-package for integrating Doctrine ORM into the Symfony framework, though it acts as a wrapper rather than a standalone database library.
| Repository | Stars | Language | License | Last push |
|---|---|---|---|---|
| go-gorm/gorm | 39.8K | Go | MIT | |
| seaql/sea-orm | 9.4K | Rust | apache-2.0 | |
| sequelize/sequelize | 30.3K | TypeScript | MIT | |
| encode/databases | 4K | Python | BSD-3-Clause | |
| mikro-orm/mikro-orm | 9.1K | TypeScript | MIT | |
| knex/knex | 20.3K | JavaScript | MIT | |
| coleifer/peewee | 12K | Python | MIT | |
| ebean-orm/ebean | 1.5K | Java | Apache-2.0 | |
| typeorm/typeorm | 36.5K | TypeScript | MIT | |
| ent/ent | 17.1K | Go | Apache-2.0 |