473,406 Members | 2,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

relational database

I would like to create a relational database using only C++. What
would be more appropriate, using arrays, linked lists or some sort of
templates and structs? Any advice?

Apr 7 '07 #1
4 2596


zf*****@mail.com wrote:
I would like to create a relational database using only C++.
WHY ???
Apr 7 '07 #2
On Apr 7, 8:35 pm, zfar...@mail.com wrote:
I would like to create a relational database using only C++. What
would be more appropriate, using arrays, linked lists or some sort of
templates and structs? Any advice?
In memory, or on disk. In memory, the basic data structure
would be a struct for each table, with the table being an
std::vector of the struct; in addition, you might want to use
std::set of indexes into the vector for keyed accesses.

On disk, you'd have to design the structures yourself, but a
binary file with fixed length records can be used to simulate
the vector, with btrees for the std::sets.

--
James Kanze (Gabi Software) email: ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

Apr 7 '07 #3

<zf*****@mail.comwrote in message
news:11**********************@o5g2000hsb.googlegro ups.com...
>I would like to create a relational database using only C++. What
would be more appropriate, using arrays,
Don't use arrays. Standard library containers are safer,
easier to use, and have built-in operations.
linked lists
A linked list (possibly in addition to other structure type)
is one of many possibilities.
or some sort of
templates
Templates are for building generic classes and functions.
They might or might not help, depending upon your needs.
and structs?
It's highly likely you'd use structs to define database records.
(Note that in C++, a class and a struct are the same thing, only
with minor semantic difference).
Any advice?
You need to determine specifically what your database needs to
do. Only then could you make intelligent choices about its
implementation.

Finally, yours is not a question about the C++ language; you'd
probably get the best advice by asking this in a newsgroup about
databases.
-Mike
Apr 7 '07 #4
2b|!2b==? wrote:
>

zf*****@mail.com wrote:
I would like to create a relational database using only C++.

WHY ???

Probably as a training project. It would be a way to increase one's
knowledge of both relational database implementation and C++
programming.


Brian
Apr 7 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

34
by: yensao | last post by:
Hi, I have a hard time to understand difference and similarities between Relational database model and the Object-Oriented model. Can somebody help me with this? Thank you in advance. ...
5
by: Brent Ritchie | last post by:
Hello, My name is Brent Ritchie. I am starting a project for my family as a christmas present. What I want to do is create a lightweight database of my family tree, and allow family members to...
5
by: Markus Seibold | last post by:
Dear NG, I am working on a student project about a mobile tourism information system and among others I have to answer the question whether to use: - a relational database - a XML-native database...
0
by: Stylus Studio | last post by:
DataDirect XQuery(TM) is the First Embeddable Component for XQuery That is Modeled after the XQuery API for Java(TM) (XQJ) BEDFORD, Mass.--Sept. 20, 2005--DataDirect Technologies...
49
by: Mike MacSween | last post by:
I frequently hear that there isn't a commercially available dbms that fully implements the relational model. Why not? And which product comes closest. Mike MacSween
1
by: Tim Fierro | last post by:
Hello, I have had many years using flat file databases (File Express from way back) but am now at a company where a relational database is needed and would carry us into the future. Since I...
7
by: Pradeep | last post by:
Hello, I need to take a set of input tables and create an XML output file. The format of the XML output must be user-definable and must be intuitive enough for non-techies to use. input...
24
by: sonos | last post by:
Hi, I am working on a program to archive data to disk. At what point is it best to use a relational database like MySQL as the backend instead of a C program alone? Thanks to any and all...
10
by: nayden | last post by:
I started playing with python a few weeks ago after a number of years of perl programming and I can say that my first impression is, unsurprisingly, quite positive. ;) The reason I am writing here...
13
by: sulyokpeti | last post by:
I have made a simple python module to handle SQL databases: https://fedorahosted.org/pySQLFace/wiki Its goal to separate relational database stuff (SQL) from algorythmic code (python). A SQLFace...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.