Room Database
Local database with Room: Entity, DAO, Database, Relations, Migrations, TypeConverters, LiveData and Flow
25 面接問題·
Mid-Level
1What is Room in Android?
1
What is Room in Android?
回答
Room is a persistence library that provides an abstraction layer over SQLite. It simplifies database access with annotations and generates code to avoid boilerplate. Room is part of Android Jetpack.
2What are the 3 main components of Room?
2
What are the 3 main components of Room?
回答
The 3 main components of Room are: 1) Entity (represents a table), 2) DAO (Data Access Object, contains queries), 3) Database (abstract class containing database configuration and DAOs).
3What is the @Entity annotation used for in Room?
3
What is the @Entity annotation used for in Room?
回答
@Entity marks a class as a database table. Each field in the class becomes a column. By default, the table name is the class name, but it can be customized with tableName.
4
How to define a primary key in a Room Entity?
5
What is the @ColumnInfo annotation used for?
+22 面接問題
その他のAndroid面接トピック
Android Fundamentals
Junior
24問Android UI and Resources
Junior
30問Android Lifecycle
Junior
30問Android Navigation
Junior
26問Android Data Management
Junior
29問Android Networking
Junior
29問Android Testing
Junior
28問Android Gradle
Junior
26問Kotlin Language Essentials for Android
Junior
24問Background Work
Mid-Level
18問Jetpack Compose
Mid-Level
28問Permissions and Device Features
Mid-Level
21問Firebase for Android
Mid-Level
23問Android MVVM Architecture
Mid-Level
18問Advanced Android Networking
Mid-Level
13問Kotlin Collections and Operators
Mid-Level
20問Kotlin Coroutines and Flow
Mid-Level
20問Android Dependency Injection
Mid-Level
15問Android MVI Architecture
Mid-Level
17問Android Clean Architecture
Senior
21問Android Compose Advanced
Senior
17問Android Performance and Monitoring
Senior
13問Android Security and Privacy
Senior
18問Android CI/CD and Release
Senior
15問Android UX and Form Factors
Senior
18問Android Testing Advanced
Senior
18問