Click here to Skip to main content
15,614,421 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
i've never done database programming with C++ but i need to for a hobby project i'm working on. with very little research i have settled for SQLite. any better suggestions?
[no name] 22-Mar-11 4:56am    
Own file format is the best way.
I used text file. One sting is one data record. Fields measured in line by tabulation mark.

I'm sure the only valid answer would be this:[^].

That leaves for your choice from this table, which is entirely defined by your purpose :-)

Share this answer
Albert Holguin 16-Mar-11 0:28am    
good link... my 5!
Sergey Alexandrovich Kryukov 16-Mar-11 0:44am    
Thank you, Albert.
Espen Harlinn 16-Mar-11 15:14pm    
Interesting page - 5ed!
Sergey Alexandrovich Kryukov 16-Mar-11 15:27pm    
Thank you, Espen.
This is how I always start trying to choose a new product for any purpose.
You can use C++ with most database engines, to determine what database engine is right for you, you need to look at it's features and behaviour.

Does the engine need to handle concurrency (multiple concurrent users)?

Will you need support for large objects?

Will your solution involve extensive analythic functionality?

What kind of support du you need for referential integrity - check out how "on delete cascade" works for the various engines.

Would you like to do server side programming, what language features do you need?


You may think that SQLite is right for you, and maybe it is - but database engines like PostGreSQL, Oracle RDBMS, IBM DB2, MS SQL Server, and Firebird each offer their unique blend of functionality.

As I don't know your hobby - it's impossible to offer a real advice on what database engine may suit your needs best.

If you want the most powerful open source option, PostGreSQL is for you - as far as I know, no other open source engine commes even close in terms of supported features and extensions.

Oracle RDBMS, IBM DB2 and MS SQL Server have different strengths and weaknesses - to determine if one of them is right for you, you have to define your needs.

Best regards
Espen Harlinn
Share this answer
Sergey Alexandrovich Kryukov 16-Mar-11 17:24pm    
You're doing major job here. I only pointed to resource, but OP needs to understand selection criteria which is most critical part. Sure, a 5.
Espen Harlinn 16-Mar-11 17:32pm    
If I was to add any value to your answer - I couldn't just say use DB2 or use PostGreSQL - unless I wanted to get seriously singed by a flame war. This is nearly a religious issue :)

Anyway - thanks for the vote!
Sergey Alexandrovich Kryukov 16-Mar-11 18:44pm    
I would not care much, but your answer is exactly the most important factor, a criteria checklist.

(Any preferences based on your experience would not really hurt. The flame war started not when you provoke an aggressive reaction -- it is unavoidable in real life. Flame war starts only if you take the aggression seriously...)

SAKryukov has the right approach.

If you're looking for someone to validate the use of sqlite for you, I can tell it is what we use in our cross-platform framework. Has a nice, built in r-tree spatial indexer too, just as a little bonus.
Share this answer
Sergey Alexandrovich Kryukov 16-Mar-11 17:23pm    
Thank you for supporting my approach.
jasonterry1 19-Mar-11 16:50pm    
thanks for the helpful info

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900