Realm makes use of transactions in order to perform updates to records. Learn how to take advantage of it in this video.
- [Narrator] Like many modern database solutions,…Realm makes use of transactions…in order to perform updates to records.…Those transactions are atomic, consistent,…isolated, and durable, or in other words, ACID.…This means that your database…will always be in a valid state…and anything done inside a transaction…is guaranteed to all succeed or fail.…Let's look at an example of a Realm transaction.…In this scenario we're going to want to create a new user.…
We start by calling the Begin Transaction Method…on the Realm object,…and we finish by calling the Commit Transaction Method.…In between, we create an object of type user…and we set the values for the name in Email Properties.…This will let other instances in the Realm…know that something has been created or modified,…so that they can update accordingly.…Since this is such a common paradigm,…Realm introduced the Execute Transaction Method.…
This handles beginning and committing transactions for you.…It also knows how to cancel a transaction…in the case that an exception is thrown.…
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 58m Intermediate
Learning Firebase Cloud Messaging for Androidwith Joe Marini52m 49s 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.