
If you are looking for a fully functional powerful database which can be easily used in your mobile apps and, importantly, unlike SQLite, it supports full-strength encryption without having to pay an extra fee then we have some good news! Not only does InterBase work on practically every platform there is, including mobile devices, but you probably already have a license for it, for free.
Table of Contents
Why SQLite might not be the best choice for mobile apps
Without doubt SQLite is an extremely popular choice for simple databases. It’s free to use, open source, and is ubiquitous enough that you will find it for every platform you can think of. But there is a problem with SQLite; if you want the data stored in a SQLite database to be encrypted you need to pay a yearly license fee for the non-free SQLite Encryption Extension. This currently costs $2500 USD per year according to the official SQLite website. So, SQLite is not actually ‘free’ by any definition of the word if you actually want to use SQLite for data storage in a real-world scenario where you are required to ensure sensitive data is encrypted at rest and is as resistant to unauthorized use as it possibly can be. If you use IBToGo, the embedded version of Embarcadero’s InterBase database, it includes full strong 256bit AES encryption of the entire database and at the column level, for free.

How do I install the free InterBase components?
Open the RAD Studio IDE and click on the tools menu. From there select “manage features”.

Now scroll down the list, if necessary. Then make sure the InterBase options are selected as shown below.

After that is done you should end up with some additional components in the palette. You will also be able to use FireDAC to connect to the database too. In the webinar I show a couple of apps one which used the InterBase Express IBX components and another which used FireDAC.

How do I create a new InterBase database?
When you installed the InterBase options it will also have installed the IBConsole tool. This is a powerful utility that allows you to create and administer InterBase servers and databases. You can find it by hitting the Windows “start” button and then typing “IB” so it is offered as a choice. Then simply click on “open”.

There is already a good collection of instructional information describing how to use IBConsole. You can find it from this landing page: https://docwiki.embarcadero.com/InterBase/2020/en/IBConsole and by searching for InterBase on our YouTube channel with this link: https://www.youtube.com/@EmbarcaderoTech/search?query=interbase where there is a wealth of content.

How do I embed a database into my mobile app?
First, create your database using the IBConsole app. Note down the location of where the database file is – it most likely ends in “.ib”. You can find the path to that file by right-clicking on the name of the database in IBConsole and then selecting “properties” from the popup menu.

Then, in RAD Studio, with your project open and active, select project, deployment, from the RAD Studio IDE menu.
This will open the deployment screen with a load of files already in there. The deployment screen is where you can add additional files or drivers that your app needs so that it can function properly. We need to add two things: the drivers and license for InterBase and the actual physical database file so that they get copied into the correct places on your user’s devices.
How to add additional drivers and the embedded database to your mobile app
From the dropdown in the deployment screen select the appropriate platform you are targeting – Android, iOS, and so on. With that platform selected, click on “add featured files”. This will allow us to add the InterBase drivers and the IBLite/IBToGo licenses.


How to add an external file or database to your mobile app
You use the deployment window to tell RAD Studio about any additional files you want to embed or ship with your mobile app. To add a file to your mobile app click on the add button and then select the physical database file that you noted down from IBConsole as shown in the earlier screenshot.

You need to take one additional step for mobile apps that target iOS or Android, and that is to correctly specify the “remote path” so that the physical database file is deployed into a location which is allowed by the mobile operating system’s rules. For Android this is the assets
–>internal
folder. For iOS this is the Startup
–>Documents
folder.
In code you can update your database connection’s database property like so:
- For iOS:
TPath.Combine(TPath.GetDocumentsPath, 'database_filename.ib');
- For Android (when you choose ‘internal’):
TPath.Combine(TPath.GetDocumentsPath, 'database_filename.ib');
- For Android (when you choose ‘external’):
TPath.Combine(TPath.GetPublicPath, 'database_filename.ib');
When using the InterBase IBX components the line to refer to the database at runtime would look like this: MyDatabase.DatabaseName := TPath.Combine(TPath.GetDocumentsPath, '
but for FireDAC it is subtly different: database_filename.ib
');MyDatabase.Params.Values['database'] := TPath.Combine(TPath.GetDocumentsPath, '
database_filename.ib
');
Notice that this is almost the only code difference in usage between the FireDAC and InterBase Express IBX database component sets.
You also use the deployment window to upload your IBToGo license (it arrives as a text file which you simply deploy with your app to get the full feature set of IBToGo). Desktop users can also take a look at an IBToGo subscription so they too can use the power of it.
How does InterBase compare to other databases?
Here’s a whole page discussing the pros and cons various databases with comparisons on the features: https://www.embarcadero.com/products/interbase/compare
Where can I find out more about InterBase, IBLite, and IBToGo?
InterBase has its own product page here: https://www.embarcadero.com/products/interbase – in short, it’s a extremely lightweight yet fully featured, rock solid, dependable, zero configuration, industrial strength database with some quite unique additional patented features. It can be used by anyone, not just Delphi and C++Builder developers – there are drivers for virtually every possible programming language. Databases from InterBase can either be embedded for single user type use cases like mobile apps and desktop caching with lightning fast storage and retrieval. Yet it can also scale up to many gigabytes of data with huge amounts of simultaneous users. It is award-winning for the awesome patented InterBase change views technology and…you probably have a license for it already. Try it out.

Is there a replay of the “The Best Embedded Database For Your Mobile Apps Is Free” webinar?
Yes, the replay for the “”The Best Embedded Database For Your Mobile Apps Is Free” webinar is here:
Where can I find the slides for the “The Best Embedded Database For Your Mobile Apps Is Free” webinar?
Here are the slides for the “The Best Embedded Database For Your Mobile Apps Is Free” webinar.














If you want to try out projects of your own and you don’t have a copy of the latest version of RAD Studio with Delphi, you can go to the products page and download a free fully working trial version.
Design. Code. Compile. Deploy.
Start Free Trial Upgrade Today
Free Delphi Community Edition Free C++Builder Community Edition