For an object relational mapping library for Kotlin, the first results are kotlin-orm/ktorm (Ktorm is a lightweight, type-safe ORM specifically built for Kotlin that provides a powerful DSL for database interaction and entity mapping, though it lacks native built-in support for coroutines and automated schema migrations), ebean-orm/ebean (Ebean is a mature ORM framework that supports Kotlin through its query builders and metadata-driven mapping, though it is primarily a Java-centric library rather than one built specifically for Kotlin's idiomatic features) and agrosner/dbflow (DBFlow is an object-relational mapping library that provides type-safe query building and entity mapping for Kotlin, though it is specifically optimized for Android and SQLite rather than general-purpose multi-database environments). jetbrains/exposed and jooq/jooq round out the shortlist. Compare the match explanations and check the project documentation against your requirements.
We curate open-source GitHub repositories matching “best kotlin orm libraries”. Results are ranked by relevance to your query — pick filters below to narrow, or refine with AI.
Ktorm is a lightweight object-relational mapping framework for Kotlin that provides a type-safe SQL domain-specific language and functional sequence APIs for database interaction. It enables developers to define database schemas and map relational tables to interface-based objects, ensuring that data persistence and retrieval are handled through strongly-typed expressions. The framework distinguishes itself by utilizing a functional, collection-style approach to query construction, allowing developers to chain operations like filtering, sorting, and aggregation using idiomatic language patter
Ktorm is a lightweight, type-safe ORM specifically built for Kotlin that provides a powerful DSL for database interaction and entity mapping, though it lacks native built-in support for coroutines and automated schema migrations.
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 mature ORM framework that supports Kotlin through its query builders and metadata-driven mapping, though it is primarily a Java-centric library rather than one built specifically for Kotlin's idiomatic features.
DBFlow is an object-relational mapping library for Android that maps Java objects to SQLite databases. It serves as a persistence layer designed to reduce manual boilerplate code through automated database access and entity mapping. The project distinguishes itself with a type-safe query builder that uses a fluid interface to construct queries with compile-time checks. It provides transparent file-level encryption for securing sensitive data and a reactive wrapper that streams database changes to subscribers for real-time updates. Additional capabilities include asynchronous query execution
DBFlow is an object-relational mapping library that provides type-safe query building and entity mapping for Kotlin, though it is specifically optimized for Android and SQLite rather than general-purpose multi-database environments.
Kotlin SQL Framework
Exposed is a comprehensive Kotlin-native SQL framework that provides a type-safe DSL, coroutine support, and robust schema migration tools, making it the flagship ORM library for the Kotlin ecosystem.
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 is a powerful, type-safe SQL query builder and code generator that provides excellent Kotlin support through its fluent DSL and reactive features, though it functions as a SQL-centric mapper rather than a traditional JPA-style ORM.
Prisma is a type-safe database object-relational mapper that uses a declarative schema to map data models to relational and document databases. It provides a unified toolkit for data access, combining a database driver with tools for schema management and record manipulation. The project features a multi-database driver that standardizes interactions across PostgreSQL, MySQL, and MongoDB. It includes a system for tracking and applying structural schema migrations across different environments and a graphical user interface for browsing and editing database records. The system ensures data in
Prisma is a cross-language database toolkit that relies on a separate query engine binary rather than being a native Kotlin ORM library, making it a different architectural approach than the language-specific ORM you are seeking.
MyBatis-Flex is an object-relational mapping framework for Java that extends MyBatis with a fluent API and automated CRUD operations. It provides a data access suite featuring an automatic CRUD data mapper, a type-safe SQL query builder, and a row-based query engine for manipulating records without predefined entity classes. The framework includes a multi-dialect SQL translator that converts generated syntax across different database engines, such as MySQL, PostgreSQL, and Oracle. It further distinguishes itself by offering annotation-free entity mapping using runtime reflection and naming co
This is a Java-based ORM framework that lacks native Kotlin DSL and Coroutines support, making it a building block for Java applications rather than a library optimized for the Kotlin ecosystem.
Flyway is a database schema versioning tool and SQL migration orchestrator. It applies version-controlled schema changes to relational databases using SQL scripts and Java Database Connectivity to ensure environments remain consistent and reproducible. The tool tracks applied migration scripts in a dedicated metadata table to determine which updates require execution. It supports the synchronization of schema versions across multiple different database engines and provides integration for build systems and application frameworks to automate updates during software release processes. Capabili
This is a database schema migration and versioning tool, which is a related database utility but lacks the object-relational mapping capabilities required to manage entity persistence and mapping in Kotlin.
Gel is an object-relational database system that models data as a graph of interconnected objects. By utilizing a strongly typed schema, it enables complex relational queries and polymorphic data structures without the need for traditional join tables. The system integrates native vector storage and similarity search operators, allowing it to function as both a relational and a vector database for semantic data retrieval. The platform distinguishes itself through a comprehensive suite of developer-centric automation tools. It features a declarative migration system that tracks and versions sc
Gel is a standalone graph-relational database system rather than a Kotlin-specific ORM library, meaning it functions as the database engine itself instead of a tool for mapping objects within Kotlin code.
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 database toolkit and ORM primarily built for the TypeScript and Node.js ecosystem, rather than a native Kotlin library designed to leverage Kotlin-specific features like Coroutines or a Kotlin DSL.
linq2db is a type-safe object-relational mapper that translates LINQ expressions into optimized SQL queries for multiple database providers. It functions as a database mapper that links classes to tables and includes a SQL query builder and a command-line schema tool for generating data classes from existing databases. The project provides high-performance bulk data processing for inserting and loading large volumes of records via batch or binary copy methods. It also supports advanced SQL operations, including window functions, common table expressions for recursive hierarchical querying, an
This is a C#-based object-relational mapper designed for the .NET ecosystem, making it incompatible with the Kotlin language requirements specified in your search.
Drift is a type-safe SQL persistence library and relational mapper that provides a structured way to map database tables to classes and execute SQL queries with build-time validation. It functions as a type-safe query builder and a wrapper for SQLite and PostgreSQL, eliminating manual result set parsing by binding query outputs to native objects. The project distinguishes itself through a build-time code generation system that produces type-safe APIs and validates raw SQL statements against database versions before execution. It features reactive query streaming, which transforms SQL queries
This library is designed for the Dart and Flutter ecosystem rather than Kotlin, making it a tool for a different language environment despite its similar functionality as a relational mapper.
| Repository | Stars | Language | License | Last push |
|---|---|---|---|---|
| kotlin-orm/ktorm | 2.3K | Kotlin | Apache-2.0 | |
| ebean-orm/ebean | 1.5K | Java | Apache-2.0 | |
| agrosner/dbflow |
| 4.8K |
| Kotlin |
| MIT |
| jetbrains/exposed | 9.3K | Kotlin | Apache-2.0 |
| jooq/jooq | 6.7K | Java | other |
| prismagraphql/prisma | 16.4K | Scala | Apache-2.0 |
| mybatis-flex/mybatis-flex | 2.6K | Java | apache-2.0 |
| flyway/flyway | 9.8K | Java | Apache-2.0 |
| geldata/gel | 14.1K | Python | apache-2.0 |
| prisma/prisma | 46.4K | TypeScript | Apache-2.0 |