Skip to content

Room vs SQLDelight for Kotlin Multiplatform: Which Database ORM to Choose in 2026

I spent three days migrating our KMP project from SQLDelight to Room, only to realize I picked the wrong ORM for our team. Here’s what I learned about choosing between Room and SQLDelight for Kotlin Multiplatform.

The Problem: Two ORMs, One Project

When we started our Kotlin Multiplatform project last year, the choice was obvious: SQLDelight was the only mature option. But Room 3.0 changed everything with full KMP support.

I got stuck comparing them for hours. The documentation shows feature lists, but not the real-world implications. Let me break down what actually matters.

Room 3.0: Android-First KMP

Room 3.0 brings the familiar Android experience to all KMP targets:

User.kt
@Entity
data class User(
@PrimaryKey val id: Long,
val name: String,
val email: String
)

The annotation approach feels natural if you’ve done any Android development. You define entities as data classes, then create DAOs for database operations:

UserDao.kt
@Dao
interface UserDao {
@Query("SELECT * FROM User WHERE id = :id")
suspend fun findById(id: Long): User?
@Insert
suspend fun insert(user: User)
@Delete
suspend fun delete(user: User)
}

Room validates your SQL queries at compile time. If you misspell a column name, you’ll know before your app crashes.

SQLDelight: SQL-First Philosophy

SQLDelight takes the opposite approach. You write SQL first, then it generates Kotlin code:

User.sq
CREATE TABLE User (
id INTEGER PRIMARY KEY,
name TEXT NOT NULL,
email TEXT NOT NULL
);
selectById:
SELECT * FROM User WHERE id = ?;
insert:
INSERT INTO User(id, name, email) VALUES (?, ?, ?);
delete:
DELETE FROM User WHERE id = ?;

Then you use the generated queries in your Kotlin code:

UserRepository.kt
val queries: UserQueries = database.userQueries
suspend fun findById(id: Long): User? =
queries.selectById(id).executeAsOneOrNull()
suspend fun insert(user: User) =
queries.insert(user.id, user.name, user.email)

Key Differences That Matter

Here’s what the comparison tables won’t tell you:

Team experience outweighs features.

If your team knows Room from Android, the learning curve is near zero. If they’re comfortable with SQL, SQLDelight feels more natural.

Migration tools differ significantly.

Room has a built-in migration system with helper methods. SQLDelight requires you to write raw SQL migration files. I found Room’s approach less error-prone.

Platform maturity varies.

SQLDelight has been KMP-ready longer. Room 3.0 is newer but backed by Google’s resources. Both work fine on Android, iOS, Desktop, and JS/WasmJS targets.

When to Choose Room

Pick Room if:

  • Your team has Android/Room experience
  • You prefer annotation-based definitions
  • You want built-in migration helpers
  • You use other Jetpack libraries
  • Android Studio integration matters

Room fits Android-first teams perfectly. The transition to KMP feels seamless because the API stays the same.

When to Choose SQLDelight

Pick SQLDelight if:

  • Your team prefers writing SQL directly
  • You want maximum KMP maturity
  • You need explicit SQL control
  • You’re targeting all platforms equally
  • Compile-time SQL verification is important

SQLDelight shines when SQL is your team’s strength. The generated type-safe Kotlin code catches errors early.

My Mistake

I initially chose SQLDelight because it was “the KMP way.” But my team struggled with the SQL-first approach. We spent more time writing migrations than building features.

After the migration to Room, our velocity increased. The familiar annotations and Android Studio support made everyone productive faster.

Common Pitfalls

Avoid these mistakes:

Don’t choose based on feature lists alone. A slightly better feature doesn’t matter if your team can’t use it effectively.

Don’t ignore migration cost. Switching ORMs means rewriting your entire data layer. It’s expensive.

Don’t overlook platform priority. If Android is 90% of your traffic, Room’s Android optimization matters more.

Don’t skip the documentation. Both have learning curves. Read the docs before committing.

The Bottom Line

Room 3.0 and SQLDelight both solve KMP database needs well. The right choice depends on your team, not the features.

For Android-first teams, Room offers the smoothest path to KMP. For SQL-savvy teams building truly cross-platform apps, SQLDelight provides the control you want.

I switched back to Room after our failed migration attempt. The lesson: match the tool to your team’s strengths, not to what’s theoretically better.

Final Words + More Resources

My intention with this article was to help others share my knowledge and experience. If you want to contact me, you can contact by email: Email me

Here are also the most important links from this article along with some further resources that will help you in this scope:

Oh, and if you found these resources useful, don’t forget to support me by starring the repo on GitHub!

Comments