Alex Rivera | Logout

Persistence solutions for C++ (with a SQL database)?

Asked 2009-01-20T14:43:42.533
9

I'm wondering what kind of persistence solutions are there for C++ with a SQL database? In addition to doing things with custom SQL (and encapsulating the data access to DAOs or something similar), are there some other (more general) solutions?

Like some general libraries or frameworks (something like Hibernate & co for Java and .NET) or something else? (Something that I haven't even thought of can also be welcome to be suggested)

EDIT: Yep, I was searching more for an ORM solution or something similar to handle sql queries and the relationships between tables and objects than for the db engine itself. Thanks for all the answers anyway!

Edit
Report

2 Answers

7

SQLite is great: it's fast, stable, proven, and easy to use and integrate.

There is also Metakit although the learning curve is a bit steep. But I've used it with success in a professional project.

answered 2009-01-20T14:56:34.893
0

I use MYSQL or SQLite.

MYSQL: Provides a server based DB that your application must dynamically connect to.
SQLite:Provides an in memory or file base DB.

Using the in memory DB is useful for quick development as setting up and configuring a DB server just for a single project is a big task. But once you have a DB server up and running it's just as easy to sue that.

In memory DB is useful for holding small DB such as configuration etc. While for larger data sets a DB server is probably more practical.

Download from here: http://dev.mysql.com/
Download from here: http://www.sqlite.org/

answered 2009-01-21T04:43:52.133

Your Answer