Design + Code an Android App from Scratch
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.