Jump to content

Platform independent distributable database


Recommended Posts

I'm currently messing around with developing a simpl game. At present all the startup data is based on an XML file, but it struck me that it would faster and easier to code if it was all in a database file.

 

Now, the only databases I've ever worked with are enterprise server types - and some testing with access databases. What I need is a database that can be distributed as a file with the app - a la Access, but is platform independant since I want the game to be for Windows and Unix...

 

Any suggestions? Is there such a thing?

Link to comment
Share on other sites

what language are you coding in? i believe you can use any database as long as the language you're using has libraries that can access the database file. i've written a java program in linux that used an MS Access DB file...so it's not really a matter of platform independence but rather if what you're coding in can access it.

Link to comment
Share on other sites

I'd probably stay away from the Access (Jet) db engine because its horrendously complex for what you need. All you want is the table info and something like a dbase IV file is much simpler and efficent.

 

The easiest way I have found for embedding databases is proably PERL with dbd and its very fast once you build the # the first time. Its also very simple and you just embed SQL in the code .. you can embed the perl itself into C .. its platform independant etc. etc.

 

Another good bet might be SQLlight... as used in Amorok if you don't use a full mysql...

 

If you search for PERL DBD and DBI (you need a main module and one for the specific database you access) you can get examples.

Link to comment
Share on other sites

I'm writing in C#. So, if I used an access DB file, would that work happily on Linux if I had the right drivers?

 

SQLite might be a good option also berkleydb is the world famous embedded jeans for the applications.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...