Gossamer Forum
Home : Products : DBMan : Customization :

Relational mod questions

Quote Reply
Relational mod questions
Hi!

I have setup a nice database for horses with pedigree. Due to the big growth of the database I would like to make change and make relational one. I have found mod for this. So currently I have 45 fields in my flatfile database. Since there is a pedigree tree I could make relationship to the names in that tree of every horse, wright?
My fields are these:
Code:
'ID' => [ 0, 'numer', 5, 8, 1, '', ''],
'Name' => [ 1, 'alpha', 20, 255, 1, '', ''],
'Gender' => [ 2, 'alpha', 40, 255, 1, '', ''],
'Date_of_birth' => [ 3, 'date', 20, 255, 1, '', '^\w\w\s\w\w\s\w{4}$'],
'Date_of_decease' => [ 4, 'date', 20, 255, 0, '', '^\w\w\s\w\w\s\w{4}$'],
'Colour' => [ 5, 'alpha', 60, 255, 0, '', ''],
'Euro_ID' => [ 6, 'alpha', 20, 255, 0, '', '^\w\w\s\w{4}\s\w{4}$'],
'Owner' => [ 7, 'alpha', '40x5', 1000, 0, '', ''],
'Breeder' => [ 8, 'alpha', '40x5', 1000, 1, '', ''],
'Remarks' => [ 9, 'alpha', '40x5', 1000, 0, '', ''],
'Mother' => [10, 'alpha', 20, 255, 1, '', ''],
'Father' => [11, 'alpha', 20, 255, 0, '', ''],
'MMother' => [12, 'alpha', 20, 255, 0, '', ''],
'MFather' => [13, 'alpha', 20, 255, 0, '', ''],
'FMother' => [14, 'alpha', 20, 255, 0, '', ''],
'FFather' => [15, 'alpha', 20, 255, 0, '', ''],
'MMMother' => [16, 'alpha', 20, 255, 0, '', ''],
'MMFather' => [17, 'alpha', 20, 255, 0, '', ''],
'MFMother' => [18, 'alpha', 20, 255, 0, '', ''],
'MFFather' => [19, 'alpha', 20, 255, 0, '', ''],
'FMMother' => [20, 'alpha', 20, 255, 0, '', ''],
'FMFather' => [21, 'alpha', 20, 255, 0, '', ''],
'FFMother' => [22, 'alpha', 20, 255, 0, '', ''],
'FFFather' => [23, 'alpha', 20, 255, 0, '', ''],
'MMMMother' => [24, 'alpha', 20, 255, 0, '', ''],
'MMMFather' => [25, 'alpha', 20, 255, 0, '', ''],
'MMFMother' => [26, 'alpha', 20, 255, 0, '', ''],
'MMFFather' => [27, 'alpha', 20, 255, 0, '', ''],
'MFMMother' => [28, 'alpha', 20, 255, 0, '', ''],
'MFMFather' => [29, 'alpha', 20, 255, 0, '', ''],
'MFFMother' => [30, 'alpha', 20, 255, 0, '', ''],
'MFFFather' => [31, 'alpha', 20, 255, 0, '', ''],
'FMMMother' => [32, 'alpha', 20, 255, 0, '', ''],
'FMMFather' => [33, 'alpha', 20, 255, 0, '', ''],
'FMFMother' => [34, 'alpha', 20, 255, 0, '', ''],
'FMFFather' => [35, 'alpha', 20, 255, 0, '', ''],
'FFMMother' => [36, 'alpha', 20, 255, 0, '', ''],
'FFMFather' => [37, 'alpha', 20, 255, 0, '', ''],
'FFFMother' => [38, 'alpha', 20, 255, 0, '', ''],
'FFFFather' => [39, 'alpha', 20, 255, 0, '', ''],
'UserID' => [40, 'alpha', 20, 255, 0, '', ''],
'Certificate' => [41, 'alpha', 20, 255, 0, '', ''],
'Markings' => [42, 'alpha', 70, 255, 0, '', ''],
'Branding' => [43, 'alpha', 70, 255, 0, '', ''],
'SIRE' => [44, 'alpha', 12, 12, 0, '', '^\w\w\s\w{3}\s\w{3}\s\w\$']

Can somebody suggest me how to divede database to more databases (how many) ?
Do I need to create dropdown boxes for entry or not?

Sasa
Quote Reply
Re: [atomant] Relational mod questions In reply to
Hi Sasa,

Quote:
Since there is a pedigree tree I could make relationship to the names in that tree of every horse, wright?

In theory you could have a single database that starts the same way you have it now, but ends with mother and father.

For display purposes, (displaying the tree) if there was a complete record for the mother and father in the database, then mmother, mfather, fmother and ffather could be displayed automatically.

Same for each generation until an incomplete record was found, or 4 generations, which seems to be as far back as you want to go.

Quote:
Do I need to create dropdown boxes for entry or not?
I would say you do not need to create drop down boxes, but they sure would be handy (and helps avoid errors), and can be generated from the database, I can see 2 drop down boxes, 1 for each gender to complete the mother and father fields.

I am still thinking about the HOW to do it using dbman, and will let you know if I have a break through.

Joe
Quote Reply
Re: [atomant] Relational mod questions In reply to
Here is some code for the database setup I suggested in the earlier post. As always, I am happy to get feedback on how to do it better.

This code covers the part about finding the mother's and father's mother and father etc. based on mother's and father's name (assumming they are in the same database of course). Are you confused yet? Crazy

I don't plan on working on the drop down lists.

The code is a variation of the relational MOD by JPDeni.

See attached for sample code to put into your working DBMAN install.