โ† All Android Development Flashcard Decks

Android Data Storage Flashcards

6 cards from real Android Development practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 6 Android Data Storage flashcards as text
  1. Which Android Jetpack library provides an abstraction layer over SQLite for local data persistence?

    Answer: Room

    Room is a persistence library that provides compile-time verification of SQL queries and abstracts SQLite database access.

  2. What annotation marks a class as a Room database entity?

    Answer: @Entity

    The @Entity annotation marks a Kotlin or Java class as a Room database table, with each field mapping to a column.

  3. Which Room annotation is used to define data access methods?

    Answer: @Dao

    @Dao marks an interface or abstract class as a Data Access Object, which contains methods for interacting with the database.

  4. What is the purpose of SharedPreferences in Android?

    Answer: To store small amounts of primitive key-value data persistently

    SharedPreferences provides a mechanism for storing and retrieving small amounts of primitive data as key-value pairs that persist across app sessions.

  5. Which Jetpack component is the recommended replacement for SharedPreferences?

    Answer: DataStore

    Jetpack DataStore is the recommended replacement for SharedPreferences, offering asynchronous, consistent, and transactional data storage.

  6. What does WAL mode stand for in SQLite?

    Answer: Write-Ahead Logging

    WAL (Write-Ahead Logging) mode in SQLite allows concurrent reads and writes, improving performance in multi-threaded apps.