Android App Development: Data Persistence Libraries
4h 53mIntermediate2018-05-04
Authors

Annyce Davis
Engineering leader, international conference speaker, and author.
Course details
By persisting your data, you can provide users with a more seamless experience with your app—even when they go offline. If you're an Android app developer, you have many data persistence options to choose from. In this course, learn about various options for storing your app's data in a database.
To begin, Annyce Davis reviews using the de facto data persistence solution available on Android: SQLite. She takes you through basic SQLite concepts—such as how to create a database wrapper and insert data into a table—as well as a few more advanced topics. Next, she covers working with Cupboard, an open-source project dedicated to simplifying your SQLite interactions. To wrap up, she dives into working with Realm, an object database solution designed with mobile devices in mind. Throughout the course, Annyce discusses establishing relationships between database tables, creating and running queries, as well as performing data migrations.
Learning objectives
Overview of SQLite
Defining a database table's schema
Exploring SQLite create table syntax
Executing create table statements
Inserting data with a foreign key relation
Inspecting the database using a terminal
Updating and deleting records
Working with Cupboard
Working with Realm
To begin, Annyce Davis reviews using the de facto data persistence solution available on Android: SQLite. She takes you through basic SQLite concepts—such as how to create a database wrapper and insert data into a table—as well as a few more advanced topics. Next, she covers working with Cupboard, an open-source project dedicated to simplifying your SQLite interactions. To wrap up, she dives into working with Realm, an object database solution designed with mobile devices in mind. Throughout the course, Annyce discusses establishing relationships between database tables, creating and running queries, as well as performing data migrations.
Learning objectives
Overview of SQLite
Defining a database table's schema
Exploring SQLite create table syntax
Executing create table statements
Inserting data with a foreign key relation
Inspecting the database using a terminal
Updating and deleting records
Working with Cupboard
Working with Realm
Skills covered
AndroidDatabase DevelopmentDatabase ManagementGoogleSoftware Development
Concepts
0. Introduction
- 01 - Welcome
- 02 - What you should know
- 03 - Using the exercise files
- 04 - Review the starting app
1. SQLite Basics
- 05 - Overview of SQLite
- 06 - Define a database table's schema
- 07 - Define a Database SQLite open helper
- 08 - Explore SQLite create table syntax
- 09 - Execute create table statements
- 10 - Create a database wrapper
- 11 - Explore the ContentValues class
- 12 - Insert data into a table
- 13 - Insert data with a foreign key relation
2. SQLite Beyond the Basics
- 14 - Inspect the database using a terminal
- 15 - Inspect the database using GUI tools
- 16 - Explore SQLite queries
- 17 - Query data using a raw query
- 18 - Parse cursors and display data in the UI
- 19 - Update records in a table
- 20 - Delete records from a table
3. Working with Room
- 21 - Overview of Room
- 22 - Defining database entities
- 23 - Defining a Room database
- 24 - Create a data access object
- 25 - Working with the @Insert annotation
- 26 - Insert data into a table
- 27 - Explore Room queries
- 28 - Query data and display in a RecyclerView
- 29 - Create observable queries
- 30 - Create a schema migration
4. Working with Cupboard
- 31 - Overview of Cupboard
- 32 - Define a database schema
- 33 - Insert data into a table
- 34 - Introduction to converters
- 35 - Store lists as JSON using converters
- 36 - Query data and display in a RecyclerView
- 37 - Update records in a table
- 38 - Delete records from a table
- 39 - Create a schema migration
5. Realm Basics
- 40 - Introduction to Realm
- 41 - Configure a Realm instance
- 42 - Create a Realm object class
- 43 - Insert data into Realm
- 44 - View your data with the Realm browser
6. Realm Beyond the Basics
- 45 - Create relationships between objects
- 46 - Explore Realm queries
- 47 - Query Realm objects
- 48 - Display data in a RecyclerView
- 49 - Explore Realm updates
- 50 - Update Realm objects
- 51 - Delete Realm objects
- 52 - Explore Realm migrations
- 53 - Create a schema migration
Conclusion
- 54 - Next steps
Related courses
- Building an Android App with Jetpack Libraries
- Kotlin Multiplatform Development
- Building an Android App with Architecture Components
- Android App Development: Enterprise Integration
- Android App Development: Design Patterns for Mobile Architecture
- Writing Secure Code for Android by Infosec
- Java Design Patterns and APIs for Android
- Learning Java 17
Related learn paths
- Prepare for the Google Associate Android Developer Certification
- Advance Your JavaScript Skills
- Become an Android Mobile App Developer
- Become a Java Programmer
- A Quick Start Guide to Java Programming
- Become a Software Developer
- Prepare for the MTA: Software Development Fundamentals Exam (98-361)
- Become a Data Visualization Specialist: Tools