Page 1 of 1

Database for C Kernel?

Posted: Thu Dec 17, 2009 12:16 am
by xvedejas
I'm looking for an open source (anything GPL compatible) database that might be easily ported to an all-C kernel. We've implemented a bit of stdlib already, and we're wondering if there might be a small database that could be compiled with the kernel on top of that. The one small catch is we don't want the database to use any threads or anything.

Is anyone aware of a small, simple, and efficient database software that might fit this? Thanks for any help.

Re: Database for C Kernel?

Posted: Thu Dec 17, 2009 12:32 am
by MasterLee

Re: Database for C Kernel?

Posted: Thu Dec 17, 2009 12:47 am
by xvedejas
We've already tried SQLite, it uses POSIX threads in numerous places, so it probably can't be ported -- that isn't to say we can't use code from it. But we really don't want to fork a project.

Re: Database for C Kernel?

Posted: Thu Dec 17, 2009 1:20 am
by pcmattman
We've already tried SQLite, it uses POSIX threads in numerous places
We ported sqlite to our kernel's C++ config module with no POSIX apart from malloc/free and a couple of string and memory manipulation functions without too much of a problem. It's handy as it supports callbacks, which we've made use of quite extensively already.

Re: Database for C Kernel?

Posted: Thu Dec 17, 2009 8:19 am
by MasterLee
Take a look at following page:
http://www.sqlite.org/custombuild.html
There you can find porting information.

Re: Database for C Kernel?

Posted: Thu Dec 17, 2009 12:52 pm
by dak91
I had the same question, and I chose sqlite3, it's easy to be integrated. I followed the page that MasterLee have already posted. You can config sqlite3 to use a single thread, it's all in the link