Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

LtRammstein

macrumors 6502a
Jun 20, 2006
570
0
Denver, CO
I work with PL/SQL at work and C++ at school... I have NEVER heard of a C++ Database. Do you mean the STL (Standard Template Library)? A little more info would be appreciated.
 

SMM

macrumors 65816
Sep 22, 2006
1,334
0
Tiger Mountain - WA State
I work with PL/SQL at work and C++ at school... I have NEVER heard of a C++ Database. Do you mean the STL (Standard Template Library)? A little more info would be appreciated.

Here is one I know of. That is unless I am missing the boat on what you are asking for (would not be the first time found guilty of that). This is not the database I would choose to build an MRP system with, although they exist.

http://www.classicsoftware.com/prod04.htm

If you are wanting to create a database engine, from scratch, in C++, salute. I can tell you the major players, but not knowing the level of complexity you require, this is going to be a little vague.

You will need at least two files, but usually three. One will store your schema, next stores the data and the optional third stores the indexes. The files will have something like this:

Schema (minimum entries)
Table Name
List of Columns (attributes), data types, etc
First Data Row ID (very important)

Data Table (minimum entries)
Previous Row Pointer (long integer or single) - default 0 for 1st row
Current Row Pointer (long integer or single) - cannot be 0 or null
Next Row Pointer (long integer or single) - can be 0 (better) or null for EOF
Data in some delimited format

There are several indexing algorithms. I do not recall them off the top of my head.

Before I proceed any farther, is this the type of information you were seeking?
 

lorductape

macrumors 6502
Original poster
Jun 23, 2006
262
11
t3h usa
I really have no idea... all i want to write is a program that can store and retrive data (while outside of the running of the program, keep the info hidden in a file.)

like I said (or maybe I didnt, I don't know) I'm new to c++, having only ever done TI-83+ before. ;)
 

LtRammstein

macrumors 6502a
Jun 20, 2006
570
0
Denver, CO
Well, I had a project due a while back, and it was a DVD library database. All you need to do is write the data you want to an outfile. Not hard to do, but a database in C++ is extremely hard to do and maintain. Using a file with delimitors (like semicolons) are a lot easier to use and maintain because you know what's on each line of text.

Mind you this kind of program making is hard to do. It too me and my group about 4 hours to do it, and we went through multiple ideas! Linked-lists, queues, stacks... You name it we probably tried it. Just message me or reply to this topic if you want me to post the source code we have. Mind you, this is our code, and I do not want random people stealing it from us.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.