The article explores the Exposed library, a lightweight SQL framework for Kotlin that serves as a modern alternative to traditional ORM frameworks like Hibernate. It highlights how Exposed addresses common JDBC issues, such as excessive boilerplate code and manual resource management, while maintaining a "Kotlin-native" feel.
The library offers two distinct flavors of database access to suit different developer needs:
- SQL DSL: A type-safe wrapping of SQL that uses a Domain Specific Language to keep code readable and transparent.
- DAO (Data Access Objects): A more traditional ORM-like approach using "Entities" for those who prefer working with objects rather than raw table mappings.
While the SQL DSL flavor stays close to the database structure using a Map-like syntax for results, the DAO flavor allows for more complex object relationships and flexible loading strategies. The author notes that while both can exist in the same project, their table definitions are slightly different and generally not interchangeable.
Ultimately, the article concludes that Exposed leverages Kotlin’s expressiveness to provide a highly readable, performant, and flexible solution. It is recommended for developers who want the control of SQL without the overhead and complexity of heavy Java-based frameworks.

