SQLite <-> Firebird <-> SQLite Convertertool
How to/Why use SQLite in Bold (Delphi Architect version 7)
(This page was last modified on 2004/07/26 12:43:01)
In my experience, SQLite 2.8.8 is about twice as fast as
Firebird 1.5.1 (in embedded version), when used in Bold (Delphi 7
Architect).
I did some simple benchmarking tests which showed that Firebird, in
simple queries and inserts was a bit faster then SQLite.
But, when running in a Bold-environment, SQLite is much faster then
Firebird. The controls are much faster filled with data.
I do not want to argue about this, this is my experience.
It is also possible that it has to do with optimizations from the
Bold-enviroment.
Maybe it is because SQLite does complex queries faster, Bold queries
tend to be a bit complex.
I also noticed that Firebird needs a filesize of 2348 KB where
SQLite needs 449 KB to store exact the same data.
Further I noticed that the embedded working horse of Firebird is about
1.5 MB, where the working horse of SQLite only is about 300 KB.
drawbacks: SQLite does not support the keywords EXISTS and ALTER TABLE.
This really is a pain in the ....
The driving force behind SQLite: D. Richard Hipp promised me those
keywords will be added.
I quote (Fri, 23 Jul 2004 10:01:14 -0400): "There are plans to add EXISTS and ALTER
TABLE and a few other things.
Whether or not this occurs in the "near future" depends on your
definition of "near", I suppose.
".
What can you do in the meantime...
You can download this MS-Windows-converter-tool
(with source), it can convert SQLite database-files to
Firebird-database-files, and Firebird-database-files to SQLite database
files (metadata, data).
It works in two steps, first it reads the source-file and extracts
meta-data, in the second step, it creates the target-file and inserts
the data.
You can connect the Firebird database to your Bold-app, let Bold
create, evolve, check, or whatever it wants to do.
When done, you can convert the Firebird-file back to SQLite and change
the connectors in your application.
Only a few minutes of work.
(if it does not work for you as you expect, you can take a look at the sourcecode, it is really simple)
- Note that user-accounts in Firebird will get lost when converting to
SQLite, because SQLite is not a multi-user database
- It only does a limited number of datatypes, you will find which ones
in the sourcecode. All not supported data-types will be tried to
convert to string, if not succesful, I guess, an exception comes up, or
not.
- It makes a backup-file if it finds a target-database-file before
overwriting it.
- It is not a complete application, it has very rudimental
exception-handling
- Use it at your own risk and responsibility, don't complain to me when
you loose data, or your computer or house burns down.
- It is not licensed, but it is public domain.
- It is not guaranteed to do anything useful at all.
- As for the exe-files and sourcefiles: You can change them when you
like or need to do.
- As for the dll's, these are not created by me, You should asked for
permission to change them if you need to, at the copyright-owners,
which are Borland, D. Richard Hipp and Marco Wobben (see below)
Inside the zip-file you will find all files that you need when you want
to use SQLite in a Bold-environment.
The included DBX-driver originally comes from Marco Wobben.
I had to modify it a bit, to get it work with Bold. All these binaries
are as offered here work together, they are based on SQLite, version
2.8.8.
Marco Wobben does not want to make the changes needed in his release,
that is why I offer the (slightly modified) DBX-driver (binary only) on
this page. You can buy the source-code of the original DBX-driver on
the link above.
More information about SQLite is here
Good luck and have a nive day, and as D. Richard Hipp states in the
sourcecode of SQLite:
** May you do good and not evil.
** May you find forgiveness for yourself and forgive others.
** May you share freely, never taking more than you give.
Kind Regards
Bert Verhees
also great component to use with SQLite (not for Bold), click (be patient slow website)