I'm familiar with SQLite and Derby. I used SQLLite in a Ruby project before and I looked at Derby for a personal Java project that went nowhere. Both of these were 2+ years ago, and I'm sure much has changed. What are the top contenders (preferably free) today?
SQLite is still an excellent choice. It's undergone performance tuning and sits at the core of a large number of applications now as a purely embedded database for that specific application. It's lightweight and very functional - it's provided as a common underpinning on small devices like the iPhone and Android, and plugs in to a large number of different languages.
You could also look at db4o at http://www.db4o.com/. I've played about with it but never used it in anger.
XML or other forms of text files... But serverless designs are slower; why do you want a serverless database?
SQLite is a fine choice, but it is a bit limited in some ways in what it supports. That's fine for a lot of applications (e.g. CoreData), but some folks might find it limiting. Also, SQLite doesn't work very well in Java (bad drivers).
Derby is also very nice, but it is Java specific unless you run it in server mode. It supports almost all standard database constructions, including triggers, stored procedures, indexes, etc. It's also very stable. The major problem I have with it is it is dog slow compared to SQLite.
One item which is not on the list so far but deserves to be is HSQLDB. It supports almost as many features as Derby (more than SQLite), and is utterly, blisteringly fast. It even has an in-memory mode for temporary databases and the like (I use it for testing ActiveObjects). Since they fixed the data-loss bugs a few years back, it's been very stable and reliable for most applications. Many Java utility webapps use it because it allows config-free installation (e.g. Hudson, Jira, Confluence, etc). The one downside is it is Java-specific in embedded-mode. However, if you're considering Derby, that might not be an issue. I would highly recommend this option.
Microsoft Access would also be a serverless database though I doubt many would think it a good idea.
Let's not forget the venerable Berkeley DB
And a new iteration on the concept, Tokyo Cabinet
Codebase just keeps on truckin'. I ported a bunch of code from DOS through windows and now into CE, with no changes.
And since they charge a little bit of $$, it's fully supported.
I'd go with Firebird. It:
- is completely SQL compliant with all the advanced features like foreign keys, triggers, stored procedures and views.
- has a very small footprint (just a couple of DLL files, a few MB total).
- is super easy to deploy (just copy those files with your executable)
- works on Windows, Linux, Mac
- is open source and free for commercial deployment
- keeps the entire database is a single file, so it's very easy to backup and move around
- scales very good: if you decide to go to full server one day, you just change the connection path, i.e. ONE LINE in your code or config file.
There are plenty of applications out there that need a serverless database engine. Maybe they want to xcopy or click once deploy to desktop and need a database present for queries and reporting.
If you are developing for .Net applications you could look at VistaDB. See the SO thread on Advantages of VistaDB for more information.
- Full disclosure - I am the owner of VistaDB so I may be biased. :)
Whatever you do - don't go with VistaDB. Their web site looks good and all that but the database sucks. I would suggest SqlLite. Really depends on how you are planning to use it.