Skip to main content
gamedev.net
🔒 Locked

Embedded relational db's

Started by dgrantkp Oct 3, 2006 at 10:00 PM 9 replies 2.1k views
Original Post
dgrantkp
dgrantkp
What options exist for application embedded databases? I know of http://www.sqlite.org/, but I haven't investigated it in any detail yet. I'd like some experienced opinions on: - When and where it is appropriate to employ such a relational database. - What database transaction dialects exist, and what their strengths are. References to any good articles on the subject would be useful as well. ;) Many thanks..
dgrantkp
dgrantkp
I've read up on the SQLite website now, it does appear very accessible. I will check out the wiki links next as you suggest, thanks for that.

I will add my interest is the potential of a database transaction dialect to simplify AI programming. AI benefits from assessing a data-rich environment from many different perspectives, and C++ is very poor at expressing the sort of database-sifting that SQL makes look very simple by comparison. (This expressivity is important to me because of numerous rewrites required during development to find a good solution.) What I don't have is the experience to understand the real applicability of a relational database like SQLite to this task.
Mr Grinch
Mr Grinch
You may also want to look at Firebird. It is a pretty full featured database than can be deployed as a single dll with your application. It's free, open-source (very permissive license), and runs on just about any platform you want. I haven't done a lot with it, but it's worth looking at.
Extrarius
Extrarius
Embedded databases are for applications where you want a database, but don't want to require 'heavy'(large, cpu/resource intensive) database servers - stand-alone database programs are typically not something you want to install on a machine that won't be doing mainly database serving. Smaller servers like mysql might not be so bad, but the big ones like Oracle are designed to run on machines they 'own', and you can definitely tell that the machine belongs to the DB server when you install it. It can also be a lot of pain to set up a database server with users etc, and it can be difficult to export the entire database to a single file for easy moving. With an embedded database, your application directly controls everything and you don't need to worry about settings, and they typically work with a small number of files that you application can easily package up if you want to copy the data elsewhere.

You can find several embeddable databases in my thread Free Small Stand-Alone DataBase?

[Edited by - Extrarius on October 5, 2006 6:13:53 PM]
"Walk not the trodden path, for it has borne it's burden." -John, Flying Monk
dgrantkp
dgrantkp
Extrarius, your topic is enlightening. Your lightweight preferences are very similar to mine, though I don't have to worry about locking (so far). Your application appears to be a very suitable transaction implementation for users. I am looking more at the transaction dialect as a tool for exploring search-space solutions for AI. My idea is that I could take the concepts for solutions to implementation for testing much quicker than with C structs. (This also means I'm thinking of the working database as transient, with tables generated on entry into the AI processing function and dropped on exit.) Does this sound reasonable?

litesql looks promising in the sense that it has natural integration with existing C++ applications!
dgrantkp
dgrantkp
Quote:
Original post by Anonymous Poster
Quote:
Original post by dgrantkp
litesql looks promising in the sense that it has natural integration with existing C++ applications!


litesql is indeed pretty cool, it allows you to define your database(object) structure using XML files, which are then compiled into C++ template code, so that you can easily access these databases using different backends (i.e. mySQL, SQLite, PostGres) directly in your C++ code using corresponding templates.


Excellent. Thanks everyone.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.