Kotlin ORM Libraries
Kotlin ORM Libraries
Kotlin ORM libraries leverage Java interoperability and Kotlin's expressiveness. Exposed is a lightweight ORM developed by JetBrains, Ktorm utilizes Kotlin's DSL, Room is Android's official ORM, and JOOQ provides type-safe query builders similar to the Java version. They also support asynchronous processing with coroutines.
GitHub Star Comparison
No | Name | GitHub Stars | Description | Trend | License | Type | Official Site |
---|---|---|---|---|---|---|---|
1 | Exposed | ⭐ 8.9k | Exposed is a Kotlin-first ORM framework developed by JetBrains that achieves type-safe database access through a "SQL DSL-first approach". With concise syntax and complete integration of modern Kotlin features, it features Kotlinx datetime support, coroutine support, and intuitive query construction. As of 2025, it has become the most promising Kotlin ORM candidate, chosen by 60% of developers as a lightweight solution and the first choice recommended for new projects. | stable | Apache-2.0 | Library | Official |
2 | jOOQ (Kotlin) | ⭐ 6.4k | jOOQ (Java Object Oriented Querying) is "a type-safe SQL query builder with an SQL-first philosophy" that can be effectively utilized in Kotlin for database access. With the "SQL-first" philosophy, it provides compile-time type safety without compromising SQL's expressiveness. By automatically generating Kotlin code from database schemas, it enables IDE auto-completion and compile-time checks that significantly reduce runtime SQL errors. Complex JOINs, window functions, aggregate queries, and all SQL features can be written in Kotlin's type-safe DSL, achieving both reliability and productivity in enterprise-level database application development. | stable | MIT | Library | - |
3 | Hibernate ORM (Kotlin) | ⭐ 6.2k | Hibernate ORM is "a comprehensive object-relational mapping solution for Java and Kotlin" developed as the most mature ORM framework in the JVM ecosystem. With over 20 years of development experience, it enables large-scale data processing in complex enterprise applications. As the reference implementation of JPA (Jakarta Persistence API), it combines standard JPA APIs with proprietary extensions to provide type-safe database operations fully integrated with Kotlin language features. Through deep integration with modern frameworks like Spring Boot and Quarkus, it has established a solid position as the foundation for contemporary Kotlin application development. | stable | Apache-2.0 | Library | Official |
4 | Ktorm | ⭐ 2.3k | Ktorm is developed as a "lightweight and elegant Kotlin ORM framework" that adopts a SQL-first approach for database access. It leverages the power of functional programming and Kotlin DSL to enable type-safe and expressive SQL operations. Instead of Active Record patterns, it provides highly descriptive query construction through SQL DSL, achieving modern database access layers suitable for contemporary Kotlin application development through compile-time type safety, null safety, and concise expression using lambda expressions for lightweight and high-performance operation. | stable | Apache-2.0 | Library | Official |
5 | Krush | ⭐ 250 | Krush is "a Kotlin-first type-safe ORM" developed as a database access library that maximizes the utilization of Kotlin language characteristics. Through annotation-based entity definitions and code generation, it ensures compile-time type safety and achieves perfect integration with modern Kotlin language features such as data classes, null safety, and type inference. While providing simple and intuitive APIs, it supports complex query construction, relationship mapping, and batch processing, offering a clean and readable database access layer that feels natural to Kotlin developers. | stable | MIT | Library | - |
6 | Room (Android Architecture Components) | - | Room (Android Room Persistence Library) is an Android-exclusive ORM (Object-Relational Mapping) library provided as part of Google's Android Jetpack project that "provides an abstraction layer over SQLite to allow for more robust database access." While leveraging the full power of SQLite, Room offers compile-time SQL query validation, type-safe database operations, and integration with LiveData and Kotlin Coroutines, providing a powerful data persistence solution for modern Android app development. Designed with a Kotlin First approach, it achieves natural integration with Android's MVVM architecture. | stable | MIT | Library | - |