by @alexstyl
✉️ Leave your feedback

This lesson is only available to members

  • ✅ Full access to all courses
  • ✅ Download courses for offline viewing
  • ✅ Regular new content releases
  • ✅ Support for any lesson

How to create a single instance of a Room Database

Published on

In this lesson, you will learn how to use the Singleton pattern in order to keep a single instance of your Room database through your application.

Creating a new Database object is an expensive operation, so it is important to reuse an existing instance you have.

Discussion
Manage your database with Room
  1. 1How to setup Room in your Android project
    00:28
  2. 2How to create Entities in Room
    1:25
  3. 3How to create DAOs in Room
    1:32
  4. 4How to create a Database in Room
    1:04
  5. 5How to create a single instance of a Room Database
    1:45
  6. 6How to insert and query data from Room
    2:56
  7. 7How to update data in a Room database
    1:38
  8. 8How to delete database data using Room
    1:08
  9. 9How to get data from your Room database reactively
    1:50