Gossamer Forum
Home : Products : DBMan : Customization :

Relational db ?

Quote Reply
Relational db ?
Hi all....let me explain my problem...

i need an archive...in this archive there are 25 fields...and that's is ok...but i also need 2 matrix of 48*2 field....( so there are 192 more field to every single record )

i don't need to made search in this matrixs and also it can be not filled at all or filled in part...

now can i create a main.db and 2 matrix.db to handle all this ???

also...what happen if i delete a record from main.db ???

it's still something i can handle with dbman or i have to switch to another db manager ???

thx



Quote Reply
Re: Relational db ? In reply to
I don't understand what you're doing here. Can you be more specific? Examples would help. Smile

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: Relational db ? In reply to
OK....i'm trying but my english is not so good...

My db need to store information about companies....

Now for each company there is a general part...( name , address , ... ) and then there are 2 matrix of 48*2 fields each one...

just to do an example

a db with phone call receveid from that company....

so date, reason

and one with all orders from that company

so date, total price...

it's just an example

the matrix have to be of fixed lenght ... 48 rows of 2 fields each one...

so i could code it as

1|left1|right1|left2.....|right48

or a record for each row of the matrix...

it's quite hard to explain i know....

nevermind...it's to complicate :)

thx :P

Quote Reply
Re: Relational db ? In reply to
Do you want three DB?
First DB is a Company DB with Company name, Address, Telephone...
Second DB, is a Contact DB with fields holding a date (for maybe the date of a phone call) and a text field (to hold a text "reason" for the phone call)...
Third DB is an Orders DB that holds the date (an Order is placed) and a total (amount of the order)

Contact DB is related to Company DB by a unique Company ID
Orders DB is related to Company DB by same unique Company ID

Yes?

Valerie
http://www.avemp.com
Quote Reply
Re: Relational db ? In reply to
Yes :) a kind....

but i don't need at all to search in the other 2 db...

just need to be able to find a company record and then view, add or modify also the contacts and orders...

(the contacts and orders db are fixed in length...i mean each company field can't have more then 48 contact or orders...don't ask me why...my boss ask so...)

Quote Reply
Re: Relational db ? In reply to
Do flat files already exist?

AND/OR - you would like to limit the number of CONTACT records and ORDERS records per Company to 48?

You need JPDeni's Relational.txt at http://www.jpdeni.com/dbman/Mods/relational.txt

What you want to do is possible and, unless there is an extra twist I didn't catch, has been covered in this forum (so you'll find lots of help along the way).

Valerie
http://www.avemp.com
Quote Reply
Re: Relational db ? In reply to
still no...i've not yet created the db...waiting to understand the better way to do it...

well i have to limit them yes...

but i need just one form for contact and one form with orders...each one with the 48 * 2 field...no matter if they are not all filled in...this way i automatically do a limit to the number of contact and orders...

i know ... it's a strange problem :)

Quote Reply
Re: Relational db ? In reply to
You do not need to have a flat file DB with blank fields. The Relational DB model solves this very problem by allowing you to add records to one database that are related to another DB by a common field. No blank space is necessary - i.e., if, for Company Widgets, Inc. you have no contact information and no orders, why should you have to have blank space in a flat file? It isn't necessary. Create one DB that holds only the Company info. Then you do not create records that have the same info in them (i.e., one flat file containing the company name, address, phone, date called, reason for call, date of order, total amount of order). The relational DB saves you the redundancy (of repeating the Company Name etc. for each record). And, in a roundabout way, makes it unnecesary to create the fieldspace for records which may never exist (i.e., the Company that never calls or you never call and never orders).

Start with JPD's Relational.txt. Although this won;t tell you how to limit the number of records in the Contact DB and the Orders DB, this can be done.

Valerie
http://www.avemp.com
Quote Reply
Re: Relational db ? In reply to
I'll try :) thx for suggestion...

i'll let you know if it will work :)

thx

Valerio Verde