Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Making a DATA-Base
04-11-2010, 12:52 AM
Post: #1
Making a DATA-Base
Hi guys,can anyone gimme a clue or sth of how to build a DATA-Base in Pascal?I haven't any ideas of how doing such a thing ! (apologies in advance if it's a shame for me (lol!) )

Gholamreza Takhti
who was he? find out
Find all posts by this user
Quote this message in a reply
04-11-2010, 01:24 AM
Post: #2
RE: Making a DATA-Base
Well i have an idea. You need to learn Enumerated types, like here :
http://www.pro9ramming.com/learnpascal/e...types.html
And than working with files :
http://www.pro9ramming.com/learnpascal/files.html
If you know these, i will continue with explanation . . .
Those two are basic things for database !

There's a fine line between genius and insanity. I have erased this line.
Oscar Levant
There's a fine line between an administrator and black hat hacker. I have erased this line.
Dr DEBCOL
Visit this user's website Find all posts by this user
Quote this message in a reply
04-11-2010, 02:32 AM
Post: #3
RE: Making a DATA-Base
ow , thanks , i'll let you know when I read them , Gracias

Gholamreza Takhti
who was he? find out
Find all posts by this user
Quote this message in a reply
04-11-2010, 04:55 PM
Post: #4
RE: Making a DATA-Base
I read them mate,though I knew them,(the truth hurts,lol!-broken strings,nelly furtado)

Gholamreza Takhti
who was he? find out
Find all posts by this user
Quote this message in a reply
04-12-2010, 12:35 AM
Post: #5
RE: Making a DATA-Base
Okay if you know types and working with files, we can go to another things.
When you make a database first thing that you need to know is what kind of database. Is it address book, or something like that ???
I ask because we need to create data structures that are for databases.
For example database data structure for some person info is :
Code:
type
  tdate=record
    day:1..31;
    month:1..12;
    year:integer;
  end;
  tperson=record
    firstname:string;
    lastname:string;
    dateofbirth:tdate;
    address:string;
    telephone:string;
  end;
Also you can add more things to it, but basically it is like that.

There's a fine line between genius and insanity. I have erased this line.
Oscar Levant
There's a fine line between an administrator and black hat hacker. I have erased this line.
Dr DEBCOL
Visit this user's website Find all posts by this user
Quote this message in a reply
04-12-2010, 02:35 AM
Post: #6
RE: Making a DATA-Base
it's a good example,not important what the data base subject is,I will follow you,So this is the data structure,
and now, I have some Ideas of how to add some data from a file,but how to search in my data base?and these things...(according to the task that Codecaine suggested me to do)

Gholamreza Takhti
who was he? find out
Find all posts by this user
Quote this message in a reply
04-12-2010, 02:44 AM
Post: #7
RE: Making a DATA-Base
Basically from theory of databases you have this main parts :
-Input form
-Query/Search
-Report (it is actually result of search)
Now you need to think about all this parts.
Query/Search is main part which you use for finding data in database with criteria.
Now i don't know if you want a complex search of just simple one that just checks
for every sub-string ???

There's a fine line between genius and insanity. I have erased this line.
Oscar Levant
There's a fine line between an administrator and black hat hacker. I have erased this line.
Dr DEBCOL
Visit this user's website Find all posts by this user
Quote this message in a reply
04-12-2010, 02:57 AM
Post: #8
RE: Making a DATA-Base
I don't know,I just don't know any tools in pascal to base my algorithms of searchings on,for e.x the simple search or anythings else,how to search?is there any functions in some libraries to help you search?any keys?tools? as same as loops that helps you repeat some similar works there should be sth for search...

Gholamreza Takhti
who was he? find out
Find all posts by this user
Quote this message in a reply
04-12-2010, 03:16 AM
Post: #9
RE: Making a DATA-Base
Basically you need to think about the concept.
Let's say that you have a file (database) which has some order, let's say :
firstname/lastname/address/dateofbirth/phone
And you want to search all first names that include sub-string "ab", than you will
go through all cases and Find every person with that criteria and show it on the screen (report).
For searching you need one for loop and functions copy() and pos() which you have explained here :
http://www.pro9ramming.com/learnpascal/strings.html
Pascal doesn't have that included, you need to make it by yourself using what Pascal gives you.

There's a fine line between genius and insanity. I have erased this line.
Oscar Levant
There's a fine line between an administrator and black hat hacker. I have erased this line.
Dr DEBCOL
Visit this user's website Find all posts by this user
Quote this message in a reply
04-13-2010, 05:03 PM
Post: #10
RE: Making a DATA-Base
Thanks,I knew what should I do when I read the strings link and your exp.thX AmiGo

Gholamreza Takhti
who was he? find out
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


 Quick Theme: