Database handling with Room
summary
Room is Google’s ORM-style library that generates DAO code via kapt, creates SQLite tables from entities with composite keys and foreign keys enforcing constraints, and returns row IDs for inserts; it supports Kotlin type converters for LocalDateTime, LiveData or RxJava return types, and produces JSON schema files for migration testing. Uses a singleton database instance, allows migrations (including import of existing DB via 0→1), and adds transactions in DAO so multi-step updates emit once.
AI-written summary · about
chapters (25)
- 0:00Introduction
- 0:31About Sergi Martinez
- 1:05What is Room
- 1:25ORM
- 2:05Object types
- 2:26Entity
- 4:30Entities
- 6:30Entity options
- 6:40Index fields
- 8:00Foreign keys
- 10:13Nested objects
- 11:51Access object
- 14:10Insert object
- 15:52Query
- 19:27Database object
- 20:03Generate database object
- 20:44Create more than one database object
- 21:22Date
- 22:37Type converter
- 23:59Entity field
- 24:25Migrations
- 26:37Live Data
- 27:02RxJava
- 28:14Transactions
- 34:48Questions








