Test your Room knowledge with a free interactive quiz — 20 questions with answers and explanations. No signup needed to play.
Question 1/5Score 0
What does Room's compile-time schema export feature (writing schema JSON files to a specified directory) help with?
Questions in this quiz
What does Room's compile-time schema export feature (writing schema JSON files to a specified directory) help with?
Why might an app choose Room over directly bundling a third-party ORM or writing manual SQLite wrapper code, when developing for Android specifically?
What is a realistic downside or limitation to weigh when relying heavily on Room's compile-time-generated boilerplate for a very complex, highly dynamic query need?
Why does Room require an explicit "migration" strategy when the database schema version changes, e.g. adding a new column to an existing table?
What is a Room "Entity," typically a class annotated with `@Entity`?
What problem does Room solve compared to using Android's raw SQLite APIs directly?
What does the `onConflict` parameter on a Room `@Insert` (or `@Update`) method control, e.g. `@Insert(onConflict = OnConflictStrategy.REPLACE)`?
What does defining relationships between entities in Room (e.g. using `@Relation` or foreign keys) allow?
Why does Room, by default, throw an exception if a DAO method that performs a database query is called directly on the main UI thread?
What is a "primary key" annotation (`@PrimaryKey`) used for on a Room entity's field?
What does Room's support for returning `Flow` (or `LiveData`) from a DAO query method enable?
What is a common architectural pattern for using Room within a larger Android app, particularly relating to a "single source of truth" for data?