In this lesson, you’ll learn how to define a Room database. This lesson will include the purpose of a Room database, the components of a Room database, and how to create a database.
Room is part of the Android Jetpack libraries and provides an abstraction layer over SQLite. This allows for more robust database access while harnessing the full power of SQLite. Room provides compile-time checks of SQLite statements. It can return RxJava, Flowable, LiveData, or Kotlin Flow types for database queries.
Room also allows for the use of Data Access Objects (DAOs) to define the database interactions. Room’s use of DAOs makes it easier to work with databases in Android while writing less boilerplate code. Room uses code generation to generate the boilerplate code for you at compile time. Room also provides rich migration support to handle changes in the database schema.
Your key objectives for this lesson are:
Identify the purpose of a Room database.
Describe the components of a Room database.
Explain how to create a Room database.
See forum comments
This content was released on Sep 10 2024. The official support period is 6-months
from this date.
Introduction section for the lesson. This section provides an overview of what you’ll learn in the lesson.
Download course materials from Github
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress,
bookmark, personalise your learner profile and more!
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.