In order to prepare a SQLite database for your Android application, you only need to follow a few simple steps. Learn what those steps are and the importance of having an abstraction layer for your chosen database solution.
- [Instructor] In order to prepare a SQLite database…for your Android application,…you only need to follow a few extra steps.…The first step in the process…is to create the contract for our tables.…A contract is just a container class…that holds onto the Constance that we need…in order to define the table names and columns.…It helps with the maintainability of your application…as changes to naming will not impact multiple classes.…Next, we'll need an SQLite open helper class.…
This class saves us from the heavy work…of managing database creation…and version management on our own.…Now only does it know when we need to have…our database created,…it also knows how to provide us with connections…to our database when we request them.…The final piece of the puzzle is a wrapper class,…or you could say some type of abstraction layer.…Now this is optional, however, I highly recommend…having one as it keeps your code organized.…
In this course, I will use a data source class…to serve as my abstraction layer.…You will see how I'm able to rotate…
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.
- 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
Skill Level Intermediate
Q: This course was updated on 05/24/2018. What changed?
A: New videos were added that cover working with Room.
Android App Development: Unit Testingwith James P White2h 58m Intermediate
Learning Firebase Cloud Messaging for Androidwith Joe Marini52m 49s Intermediate
1. SQLite Basics
2. SQLite Beyond the Basics
3. Working with Room
4. Working with Cupboard
5. Realm Basics
6. Realm Beyond the Basics
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.