In this video learn how queries are executed against SQLite. Annyce reviews the various options available with the SQLiteDatabase class.
- [Instructor] SQLite Queries are executed using…the SQLiteDatabase class in its query method.…The results that you receive…are returned to you as a cursor object.…We'll talk more about this later.…Further, the way you choose which records are returned,…is by using a String which contains your selection criteria.…You can also use a String array…to define which columns from the table you want to return.…If we take a look at the Android Developer documentation,…for querering SQLite data, we can see an example…of the various components I just mentioned.…
In this particular example, a table,…which contains feed items is being queried,…based on the Title column.…But let's explore this a bit further.…Let's say we want to retrieve a record…from a User's table, based on its ID.…What would that look like in practice?…First, here's what the SQL Query would look like:…We have a SELECT statement,…that will retrieve all of the rows from the user table,…where the ID is equal to one.…
That should look very familiar to us.…Now what we want, is to convert that…
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
Android App Development: Unit Testingwith James P White2h 59m Intermediate
1. SQLite Basics
2. SQLite Beyond the Basics
3. Working with Cupboard
4. Realm Basics
5. 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.