Have an amazing solution built in RAD Studio? Let us know. Looking for discounts? Visit our Special Offers page!
News

Three Ways To Easily Embed A Database With Your Android And IOS Apps

There are numerous embedded databases that can be used with Delphi and C++Builder. Embarcadero provides two embedded databases: InterBase ToGo and IBLite. The SQLite Consortium created SQLite, an embedded SQL database engine. Finally, there’s TFDMemTable, which can save and load data from binary, XML, and JSON files, as well as query them via its LocalSQL property. Each embedded database has its own set of advantages, and you can quickly integrate any of these solutions into your apps.

InterBase ToGo

InterBase ToGo supports encryption on Android, iOS, OSX, and Windows. It also has no restrictions on the size of its database file or the number of transactions allowed per connection. InterBase ToGo has a unique Change Views feature that captures data changes using InterBase’s multigenerational architecture. This has no performance impact on existing transactions because it keeps a consistent view of changed data that other transactions can see. The Change Views mechanism does not require its own underlying data and instead relies on data already stored for existing base tables or views derived from base tables. InterBase ToGo also has a lighter version with fewer features called IBLite, which comes with a free unlimited deployment license.

Head over and find out everything you need to get started using InterBase ToGo.

SQLite

SQLite features transactions that are atomic, consistent, isolated, and durable (ACID) even after system crashes and power failures. There is zero configuration with SQlite which means there is no setup or administration needed. SQLite implements most of SQL92 and supports table triggers and views. It is a complete database that is stored in a single cross-platform disk file. It supports massive terabyte-sized databases and gigabyte-sized strings and blobs. It can even be faster than popular client/server database engines for most common operations. There are no external dependencies and it runs on Windows, Mac OS X, iOS, and Android out of the box. The sources are in the public domain, which means use for any purpose is free. Its very powerful API allows you to extend the engine in practically all areas. Lastly, SQLite achieves one of the best data access performances among other embedded, file-server, and client-server database engines used by Delphi applications.

Head over and find out everything you need to start deploying SQLite with your apps.

TFDMemTable

TFDMemTable is a FireDAC based in memory table. It has a SaveToFile functionality to save dataset data to an external file for later use. It can also use it’s LoadFromFile method to populate the dataset with data stored in an external file (that you may have saved previously). The data is not moved to a database, it is just loaded into a dataset in-memory storage. You can use both methods with three different file format: binary, XML and JSON. You could for example prototype your app on Win32 and load up data into TFDMemTable. You could then save the data out to one of the three file formats and then deploy the file with your app to Android, IOS, OSX, or Windows. Lastly you could load up the file at runtime into TFDMemTable and query against the data using the LocalSQL property.

Head over to the Embarcadero DocWiki for more information and code samples for TFDMemTable.

 


Do you want to use the Three Easy Ways To Embed A Database on iOS and Android devices? Try the Cross-Platform App Builder, which can help you create apps in Delphi or C++ environments.

Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial   Upgrade Today

   Free Delphi Community Edition   Free C++Builder Community Edition

About author

FMXExpress.com has over 600 articles with all kinds of tips and tricks for Delphi FireMonkey on Android, IOS, OSX, Windows, and Linux.
Related posts
C++DelphiRAD Studio

How To Use Cross-Platform Programming Languages: Expectations vs Reality

C++CodeDelphiIDERAD Studio

10 Things Most People Don't Know About Clean Code Windows 10 Development

News

.NET Apps and Interbase Change Views - How to track data changes automatically

DelphiNewsWebinar

Android on Windows 11: A Developer's Perspective

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

IN THE ARTICLES