At the moment there are several embeddable databases and libraries out there that you can use in a mobile application. In this post, I examine most popular libraries and databases and highlight some of their characteristics.
Realm
Realm
Realm is a mobile platform and a replacement for SQLite & Core Data. According to the website, it has more than 100k active developers. Realm is fully open source and distributes under Apache License. Realm Mobile Database is much faster than an ORM, and often faster than raw SQLite due to zero-copy design. Some of the benefits of Realm are fast queries, safe threading, encryption of data and reactive architecture. You can learn more about Realm by visiting this page.
Sugar ORM is a library that can be used to interact with SQLite database using Object-Relational Mapping. Object-Relational Mapping (ORM) is a technique that used to query and manipulate data from a SQLite database using an object-oriented paradigm. And Sugar ORM takes care of the things like the creation of the database, management of object relationships and provides clear and simple APIs for database operations. To get started visit this page.
LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values (Keys and values are arbitrary byte arrays). Data is stored sorted by key. LevelDB supports multiple changes to be made in one atomic batch. And users can create a transient snapshot to get a consistent view of data. However, LevelDB is not a relational database. It does not support SQL queries, and it has no support for indexes. And only a single process (possibly multi-threaded) can access a particular database at a time. There is no client-server support builtin to the library. An application that needs such support will have to wrap their own server around the library.
Firebase is a real-time NoSQL cloud-based database. It stores and syncs data with NoSQL cloud-based database in real time. And data is synced across all clients in real-time and remains available when your app goes offline. Data is stored as JSON and developer can browse the data using a web-based console. And it includes offline support as well. It is very easy to integrate Firebase to Android project. To learn more about Firebase database visit this page.
As another alternative to easily access a SQLite database, JDXA is a simple, non-intrusive, and flexible ORM product for the Android platform. Based on some well thought-out KISS Principles, JDXA dramatically decreases development time by presenting a more intuitive object-oriented view of on-device SQLite relational data, eliminating the need to write and maintain endless lines of complex low-level SQL code.
ReplyDeleteJDXA easily supports complex object modeling including inheritance, one-to-one, one-to-many, and many-to-many relationships and offers a POJO (Plain Old Java Objects) friendly non-intrusive programming model, which does not require you to change your Java classes in any way: no need to subclass your domain model classes from any base class; no need to clutter your source code with annotations; no source code generation (no need for DAO classes), and no need for pre-processing or post-processing of your code. JDXA also offers convenient persistence for JSON objects. JDXA automatically creates the required database schema.
To learn more about JDXA visit: http://softwaretree.com/v1/products/jdxa/jdxa.html
Two others you should have included: Couchbase Mobile (https://developer.couchbase.com/mobile) and Green Robot DAO (http://greenrobot.org/greendao/)
ReplyDelete