[fpc-pascal] sql server embedded: sqlite the only solution?

Michael Van Canneyt michael at freepascal.org
Tue Dec 22 13:46:33 CET 2009



On Tue, 22 Dec 2009, JoshyFun wrote:

> Hello FPC-Pascal,
>
> Tuesday, December 22, 2009, 12:55:07 AM, you wrote:
>
> ZD> I think you talk about Firebird embedded version 1.0, SQlite3 best than it
> ZD> I have Point of Sale application use Firebird 2.1 in desktop PC and
> ZD> Sqlite3 in Wince, the same project with same SQL statements (with a
> ZD> little directive for special queries).
>
> SQLite is faster than Firebird, but take care that SQLite does not
> enforce foreign keys, so data integrity must be handled by the
> programmer "manually".

About the "sqlite is faster":

This depends highly on the kind of queries you are using.

In my tests, sqlite was significantly slower than firebird. I compared
speeds of 4 different embedded engines, and sqlite was definitely not 
the fastest one.

Secondly, I would never recommend sqlite for use with Pascal applications, 
since sqlite does not even enforce the data to be of the correct type, which
creates problems if a field of type INT contains e.g. textual data, causing
a pascal application to crash.

(last time I checked, they called this "a feature")

Michael.



More information about the fpc-pascal mailing list