Android data and storage interview questions
Room, DataStore, migrations, Paging, scoped storage and what to wipe on logout.
– interview-ready · 10 questions in this topic
– of 10 tried
Saved on this device. Interview-ready means you got it right on two different days. Guesses and hints count for less.
Questions
- Room basicsPick the fix
- How Room Flow queries updatePredict
- Relations, transactions and N+1 queriesPick the fix
- Room migrationsOrder the steps
- DataStore vs SharedPreferencesPick the fix
- Scoped storagePick the fix
- Paging 3Pick the fix
- What to clear on logoutOrder the steps
- Database performancePick the fix
- Cache freshness and stale dataPick the fix
Practise this topic
Flashcards · 14
Flip, then say if you knew it. Needs JavaScript; every answer is also on its question page.
Quick quiz · 10 questions
One exercise per question, checked as you go. Needs JavaScript.
Mock interview · 2 sets
Timed, out loud, then tick what you covered. Needs JavaScript.
Quick facts
Recall the answer first, then tap Show to check.
@Upsert
Room's @Upsert inserts a row or updates it if the primary key exists.
Database Inspector
Android Studio's App Inspection lets you browse and query a running app's Room database.
clearAllTables()
RoomDatabase.clearAllTables() deletes all rows but keeps the schema.
Proto DataStore
Proto DataStore stores a typed object defined with protocol buffers or a custom serializer.
Printable cheat sheet · Review your weak spots in this topic
Share your progress
Sources: Question outline adapted from Android-Interview-Questions by Mohsen Mirhoseini, licensed under Apache 2.0. We reorganised the questions, rewrote every answer and added new ones. Credits and license