Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New to Databases Question

Status
Not open for further replies.

TTChrisbo

Programmer
Mar 20, 2007
3
US
Hi,
I have been doing simple Delphi applications but now want to do another simple project including a data table and I'm unsure on how to start it.

I'm using D7 Personal, and need to build a table that will record 5 columns of data per record:
Start (int); End (int); Total (float); Price (float); Where (char)

I'll have to do some simple math on the numeric data and also pull some of the data for a graph.

I was going to use a text file, but thought there might be a simple table that has some of those math functions built in.

Any help would be awesome!
Thanks,
TTChrisbo
 
the BDE has paradox and a few others built in for you, but requires the BDE to be distributed with your app.

has a few good db vcl's including text file based ones.

as with the calculations thats generally done with delphi functions not the db.

hope this helps

Aaron
 
The following is a pretty good tutorial for bringing you up to speed with databases in Delphi:

Clive
Runner_1Revised.gif

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer." (Paul Ehrlich)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096
 
However, the key to good database development is the understanding of the how to structure a table. Find a few links below that are good resources. Having a correctly designed table will greatly increase the ease of extracting useful and meaningful data.

Leslie

Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual

Essential reading for database developers:
The Fundamentals of Relational Database Design
Understanding SQL Joins
 
Thanks for the suggestions, I'm checking them out right now. However, since I'm using the personal edition of Delphi which ships without any database support, I may have to go another route.

I may have to use a flat text file (.csv), then do the math after parsing out the relevant data.

...that is, unless I have it all wrong! Do I?

Thanks again,
TTChrisbo
 
If you do go down the csv route, Delphi's TStringList is a pretty handy object to use in this context as it has a CommaText property which is very useful for importing csv formatted text files. Check out the following thread for an example of how to import a csv file into a TStringGrid: thread102-839480

Clive
Runner_1Revised.gif

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer." (Paul Ehrlich)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096
 
Thanks for the tip, Clive.

I'll go that route, and besides, I'll have (at most) a few hundred records anyway and the .csv method should be fast enough - and I'm not really that interested in performance.

TTChrisbo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top