Lecture 17: SQLite and the Room ORM Flashcards
What is SQLite
A lightweight database that supports SQL style database syntax and a file based model
The entire SQLite database is stored in ___ and queries simply __
- single file
- search and modify that file
Why is SQL the preferred database for Android systems?
- file based model uses less resources
- supports enough sql syntax to make writing queries easy if youve worked with SQL before
- its public domain (free and open-sourced)
SQLite only requires an ___ and a ___ it can read/write from
- SQLite library
- file
What is an ARM
Object Relational Mapping (ORM)
An abstraction layer between the database and the code. The code interacts with the ORM instead of the database
ORM makes it easier to mainain code ___ from the database
separetely
Android provides built in ORM that it recommends you use when accessing databases known as ___
Room
Underneath Room is still a ___, but you wont see it instead you ____
- SQLite database
- interact with classes ad methods defined within the ORM
Rooms offer a easy way to set up ___ while also offering features you dont get in raw SQLite
databases, tables, and queries
The Room ORM uses ___ layers to abstract the database
3
Entities describe ___, define the ___, and allow ___
- singular rows
- column names of the table
- get/set of values
What are Data Access Objects (DAOs)
Queries that return a collection of entities for the query
What are the Room ORM layers?
- Room database
- Data Access Objects
- Entities