Create your account

Already have an account? Login here

Create account

57. Introduction to Realm Database in Android

Design + Code an Android App from Scratch

Woah, wait a second..

Scrounge up some loose change to buy this course, or login to your account to view this lesson.

Alright, buy it for $25 Or login to your account if you purchased already.

This video talks about Realm database which is a replacement for SQLite & Core Data. Realm is not an ORM on top of SQLite. Instead it uses its own persistence engine, built for simplicity (& speed). Thanks to its zero-copy design, Realm is much faster than an ORM, and is often faster than raw SQLite as well. Realm supports iOS & OS X (Objective-C & Swift) & Android. You can share Realm files across platforms, use the same high-level models for Java, Swift & Objective-C, and write similar business logic on all platforms. Realm supports advanced features like Encryption, graph queries, and easy migrations. We discuss realm data types such as boolean, short, int, long, float, double, data and so on. Extend the RealmObject add private fields and public getter and setter methods to let Realm use your object as a Table where data can be inserted or retrieved. Realm supports transactions where you can write objects to realm and then commit the transaction or rollback if something failed. Realm transactions are either synchronous which is the default behaviour or they can be asynchronous if you supply a callback to the executeTransaction method. Realm supports 1 to 1, 1 to many and many to many relationships easily with the help of the model itself. Use a RealmList to model many objects in a relationship.

Course Cirriculum