Fog Creek Software
Discussion Board




embedded sql engine?

we are developing a shrink-wrapped software product and we need an sql engine. and we want to make it as cross-platform as possible (at least linux and mac os x).

so far the best option seems to be sqlite (http://www.hwaci.com/sw/sqlite). how do we go and embed it into the software? and where will the database files be stored?

are there any other alternatives? we do not need any fancy sql stuff, just lots of lots of data and some simple select statements. thanks in advace!

ron meyer
Saturday, June 21, 2003

if you dont need fancy sql stuff, do you really need a _sql engine_ at all?

if the answer to that is no, metakit is _very_ good.

Its not a standard sql engine, but its database engine is fast + reliable + robust + pretty easy to follow + very well supported.

its license allows for proprietry usage as I understand it.
(I certainly hope so anyway, Im using it myself)

FullNameRequired
Saturday, June 21, 2003

Firebird now has an embedded version. I have not used the embedded version, just the normal server version, and it is very good

Craig
Saturday, June 21, 2003

I spent the past weeks looking at stand-alone, install-free embedded solutions. SQLite is very good, MySQL is also very good, and the FireBird Interbase looks promising but just came out in 1.5 RC3.

Work in progress here:

http://perso.club-internet.fr/ffaure/databases.html

Frederic Faure
Saturday, June 21, 2003

Advantage Local Database Server is a free cross-platform server

http://www.advantagedatabase.com/ADS/Product+Detail/Advantage+Local+Server/default.htm

Cletus
Saturday, June 21, 2003

what about sqlite? nobody mentions it - is it any good? by now i thought of sqlite as our best option.

ron meyer
Saturday, June 21, 2003

Ron : SQLite is mentionned... :-) And very good for single-users at least. No MDAC, no ODBC drivers to take care of.

Frederic Faure
Saturday, June 21, 2003

I've used SQLite for about a year. Overall my experience has been very positive. I've never run into any strange errors or db corruptions (the db is just a file on disk).

My only complaint is that the query optimizer isn't very good. Often you have to hand tweak relatively complicated queries to get optimal performance. This is true of many queries that other dbs would automatically optimize.

If you are considering using SQLite, I'd recommend downloading the python binding and writing a few scripts. It's a fast and easy way to evaluate whether or not it will be adequate for your needs.

20schwarz
Saturday, June 21, 2003

@20schwarz: what would you call a complicated query?

ron meyer
Saturday, June 21, 2003

If no fancy SQL stuff is required, I recommend BerkeleyDb from sleepycat

Erik Lickerman
Saturday, June 21, 2003

I'm using SQLite now for a shrinkwrap project, and while my project is in early stages, I've been very impressed.

IMO you don't really need to download the Python bindings to try it out. The sqlite command-line utility will give you a very good idea of how it works. The query optimizer is intentionally simple (i.e. how you write your queries can affect performance more than with a server-based DB). You can use the EXPLAIN command to disassemble a query into SQLite opcodes, so you can see exactly what the query optimizer is doing to your statements.

Nate Silva
Saturday, June 21, 2003

On several occasions, I've run across queries that take much longer to execute than they should. The simplest case that you're bound to run into involves ordering tables in the FROM clause. SQLite executes the query in the order the tables were specified in the FROM clause, so ordering your tables from smallest to largest can dramatically speed up queries.

Unfortunately, not all optimizations are as straightforward. Sometimes it becomes an exercise in figuring out how to specify a query such that SQLite executes multiple joins under certain conditions in a particular order. This isn't necessarily difficult, but can eat up some time.

As Nate suggested, EXPLAIN can help, and if you really get stuck you can get relatively inexpensive support from the original founder/designer.

http://www.hwaci.com/sw/sqlite/support.html

20schwarz
Sunday, June 22, 2003

CodeBase is the way to go.

Pablo
Sunday, June 22, 2003

*  Recent Topics

*  Fog Creek Home