All quizzes
Free quiz · 20 questions in the bank

Room quiz

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
  1. What does Room's compile-time schema export feature (writing schema JSON files to a specified directory) help with?
  2. Why might an app choose Room over directly bundling a third-party ORM or writing manual SQLite wrapper code, when developing for Android specifically?
  3. 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?
  4. Why does Room require an explicit "migration" strategy when the database schema version changes, e.g. adding a new column to an existing table?
  5. What is a Room "Entity," typically a class annotated with `@Entity`?
  6. What problem does Room solve compared to using Android's raw SQLite APIs directly?
  7. What does the `onConflict` parameter on a Room `@Insert` (or `@Update`) method control, e.g. `@Insert(onConflict = OnConflictStrategy.REPLACE)`?
  8. What does defining relationships between entities in Room (e.g. using `@Relation` or foreign keys) allow?
  9. 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?
  10. What is a "primary key" annotation (`@PrimaryKey`) used for on a Room entity's field?
  11. What does Room's support for returning `Flow` (or `LiveData`) from a DAO query method enable?
  12. What is a common architectural pattern for using Room within a larger Android app, particularly relating to a "single source of truth" for data?
Gaps to close?
Read the curated Room notes — core concepts, patterns, interview prep.
Room notes

More quizzes

.NET.NET MAUIAbsintheAccessibilityActixActix Web