C++, databases and SQL, can anyone help?

Greetings. I feel I know a reasonable amount of C++, and for what I'm working for part of my University project I have decided I need a database because I'll be storing a lot of data.

However, although we did a short module on databases a couple of years ago, I had nothing to apply what they were talking to us about to, and ultimately I've forgotten pretty much everything they spoke about. They did not get lectured on SQL.

Anyway, I am aware that 'SQL queries' are used to add and retrieve data from a database of some kind. How this is done I do not know, I would assume there is some sort of interface depending on the type of database.

So, the basic outline of what I want to do is (using C++) create a database that I can access using SQL queries.

I have done some research and various acronyms were hurled at me along with various names; ODBC, DTL, ADO, SQLite...

I repeatedly get results referring to 'SQL Server'. Now maybe I do not understand the term, but I'm trying to create and utilise a local database here, not something that runs on a server.

Does anyone have any experience with any of this? EVEN if you do not know any C++, if you have experience working with databases and/or any of the systems I have mentioned above, or anything else for that matter, please reply with whatever information you may know that you feel may be of use to me, if you can. Or reply requesting further details on what I'm trying to do.

Thanks in advance.

EDIT: I apologise for the apparent lack of paragraphs in my post. For some reason when posting, it appears to ignore them.

Your question's pretty vague. Relational Databases are an entire field of computer science, it would take days just to explain, for example, normalization. You'd probably be best off getting a book. When I was in school, I relied on Database Systems: A Practical Approach to Design, Implementation, and Management. That was a decade, and two editions, ago-- but databases haven't really changed much.

Anyway, I am aware that 'SQL queries' are used to add and retrieve data from a database of some kind. How this is done I do not know, I would assume there is some sort of interface depending on the type of database.

SQL is "Standard Query Language" (or Structured Query Language), used for not only querying databases but for manipulating data within, as well as other things. You're correct in that it is used for database operations.

Yes, some kind of interfaces exist - some nothing more than a command shell for SQL statements, others graphical. Some are provided for other languages to connect and send SQL statements to the DB (such as ODBC and the like)

@Absolute Gravy said:

So, the basic outline of what I want to do is (using C++) create a database that I can access using SQL queries.

I'm guessing you meant "I want to access a DB using SQL queries through C++" - your sentence there sounds like you want to actually write a database in C++.

@Absolute Gravy said:

Now maybe I do not understand the term, but I'm trying to create and utilise a local database here, not something that runs on a server.

Does anyone have any experience with any of this?

Yes. MySQL and SQLite are two free databases available to download and install. However, it sounds like you need to pick up a smattering of SQL to understand what statements you want to throw at the database before looking at popping those into some C++ code (and to provide expected results to compare).

In short, what you're asking for isn't impossible. It does sound like you need to find another module in databases or do more research to give you a better grounding in database, else you'll flounder badly when it comes to data manipulation.

I'd prefer not to have to distribute any additional prerequisite programs for my program to be usable on another machine.

I'd much rather have whatever the solution is compiled in to my program and be standalone.

EDIT: Also, this may be an incredibly dumb question, but how on Earth do I actually put new lines in to my posts!? When I go to edit my post like now, I can SEE the new lines, but when I post...it ignores them. This Edit for example should be on a new line. Am I missing something!?

EDIT: Also, this may be an incredibly dumb question, but how on Earth do I actually put new lines in to my posts!? When I go to edit my post like now, I can SEE the new lines, but when I post...it ignores them. This Edit for example should be on a new line. Am I missing something!?

* I want the program to be able to do the above things without the installation of other programs being required (bar the machine running the Windows OS).

You'll be writing your own database software then. Do like Blakeyrat suggested and get a book; databases are complex, but solved. Though you really should save yourself months of work and just install an already existing, tried-and-true database (SQLite, MySQL, SQL Server Express). Or copy-paste SQLite (public domain) into your program and compile it.

Then again, doesn't some version of SQL Server come stock with Windows 7 nowadays?

So.. if a wheel exists but is in use elsewhere, it's okay to steal it rather than recreate another?

Beauty of profession is no need to steal. Once wheel creation is complete, it is available for everybody at same time.
In real world, if design for wheel is in existence, then you make copy of design and use it.

If you are confusing by my statement, seek clarification and I will provide it.

More seriously, due to time constraints I've managed to learn how to write instances of my classes to files. It's probably not as efficient as some of these other systems, but it will do. Thanks for your input people.