Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Creating a c++ database program

Posted on 1998-03-01
2
Medium Priority
?
1,490 Views
Last Modified: 2008-02-01
I need to make a database program that doesn't rely on other DB engines like msjet so it can run on different platforms. It will mainly run on windows OSs. Is there any samples or if need be books on DB engine or algorithm
that manages its own file reading and writing to it the data entered and storing it in its own file. The file will just store text information. One question that i been wondering is if the program deletes an entry in the DB file will there be a "whole" there so the pogram has to shift all entries after the one deleted up one to fill it in so a file read next time  won't prompt an error in the file like corrupt. It seems DB files use one file and then add more data to it when creating a new record under that DB if so wouldn't the file get to big after a while. I came up with an idea that for the
DB file it would just be a directory and the "table" would be another directory in the DB directory. Under each table
will be individual files for each record that has the actual data. The header of the file will contain fields data that says how many fields and how far each field entry will be when reading out the file. Does this sound reasonable?
0
Comment
Question by:trc170
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 6

Accepted Solution

by:
jpk041897 earned 0 total points
ID: 1182902
Thats one possib way of doing it, I would suggest you build a B Ttrieve sructure, or even better a B+trieve or CTrieve structure.

In this fashion, you can reutilize all the space in a fixed record length DB or most space in a variable record lengthDB.

I would further suggest that you either search the shareware pages for said algoritm, or you coud purchase te C Database Toolchest (orsimilar product) from:

http://www.mixsoftware.com/product/database.htm

If you opt for this product (hich I found verry well written) and  which dos everyting you want alleady, you would only nee to write a C++ wrapper arround their C API. Consideng the product sell for less tan US $50.00, I would believe it migt be a good bet.
0
 

Author Comment

by:trc170
ID: 1182903
Thanks jpk you are the few i run across that can answer my questions.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question