views:

524

answers:

4

What are the differences between SQLite and DISQLite and why would I want to pick one over the other?

My context is that I am dealing with a large database (could be up to 10 GB), the critical part of which is in one very simple table with a single indexed field and one text field up to a few KB in size. My development tool is Delphi 2009 and the database will be embedded in my .exe.

My main criteria is speed. This would be for a software application running on a typical Windows computer, say with Windows 7 and 4 GB of RAM.

If you want to suggest another database tool, please tell me why it would be better than these two for my application, especially on the speed frontier.

+2  A: 

I can suggest you writing your own implementation. If you don't need complex SQL queries, the simplest (and probably the fastest) implementation is file-based storage.

Frantic
I've thought about that idea for awhile. See: http://stackoverflow.com/questions/1799634/how-should-i-implement-a-huge-but-simple-indexed-stringlist-in-delphi
lkessler
I agree, actually fastest performance on sequential reading/writing...but horrible access on random reading. If you need indexed access on large datasets then use an engine...if the sets are relatively small, or only read in the order they are written then use a file/stream based solution.
skamradt
+4  A: 

AFAIR, DISQLite uses the obj files of Sqlite, and compile them with Delphi and produce more features than the original one, and using the same sqlite DB format, hence you can read the DISQLite database file by it by other languages that has support for Sqlite drivers.

Also one more feature with DISQLite you don't have to distribute the Sqlite DLL.

DISQLite support database size up to 2TB, so it could handle your requires without problems.

Another options I would consider is FireBird embedded version,and if you would like to scale it more, you can change to full FireBird server without much effort.

But I think both Sqlite & DISQLite will perform better than Firebird.

I use Audcom Sqlite components to access Sqlite databases, and you can compile it with Sqlite objs file so you will not have deploy sqlite dll.

Mohammed Nasman
Thanks for the opinion of them performing better than Firebird. But as Kavitesh says, SQLite can be compiled into my application with the sourcecode and no DLL is required.
lkessler
From SQLite: http://www.sqlite.org/download.htmlThe sqlite-amalgamation provides all preprocessed C code combined into a single source file which can be used in your application and compiled together.Since i have not worked on delphi, so i would not comment if it can compile C code directly or would require DLL to access all the APIs.
Kavitesh Singh
He meant the source code of original sqlite library, which is written in C, If you read last paragraph in my answer, you can do that with Audcom Sqlite components too, so you don't have to distribute the Sqlite Dll with your application.
Mohammed Nasman
+1  A: 

DISQLLite has two versions with the free one limited to personal and non-commerical usage. So this could be one of the deciding factor as SQLite is free opensource implementation without free/paid versions.

Both of the database would be able to handle data ranging in GBs. SQLite is available in pre-compiled binary i.e. DLL which can be distributed along your application. However, with the source code available you can also compile it within your application and use it without the need for DLL.

The advantage of using the DLL module (at times) is when some of the bugs are resolved you would simply be required to replace the DLL at the client machine instead of recompiling the whole application.

I feel SQLite would be a better option for yor requirement. Speed of database is not entirely based on the type of database. Hardware like harddisk access speed, available processing power, RAM etc also play an important role in speeding up database.

Kavitesh Singh
But WHY do you think would SQLite be better for me? I know speed depends on outside factors, but for standard windows machines running Vista or Windows 7 with 4GB RAM, which would be better for me (I'll add this to my question as well).
lkessler
SQLite is opensource with no limitations whatsover. If you check the comparison chart for DISqlite http://www.yunqa.de/delphi/doku.php/products/sqlite3/feature_chart?DokuWiki=t5fl5li3pqncsusi0qd0df90m3 you would see most of the features are available in paid version. Also since you are not looking at enterprise level db, the performance difference would be negligible i feel. Also right now DISQLite offers free version, they might discontinue or offer it at some price later on. Which may be a prob. Also SQLite is having active community development making updates easily available.
Kavitesh Singh
+1  A: 

Note that the DISQLLite personal version has some limitations and I don't think that the price for the professional version (Euro 149.99 without source) is worth it when anyone can just implement a SQLite wrapper for free.

I was using DISQLite personal for a freeware product and had to implement a database change in a new version release. The personal version does not support 'ALTER' so I was faced with having to purchase the full version. So I ditched DISQLite and just went with a good SQLite wrapper. Only go for DISQLite if you're prepared to pay for the full version.

SQLite4Delphi might be a better option, or at least point you to a more cost-effective solution.

Gerard