Inner table link

dgkindy

Registered User.
Local time
Yesterday, 22:18
Joined
Feb 22, 2007
Messages
34
I have seen this same question before but could not find the response.

I want to build a db for a dog breeder.

tblDog is a table that contains all dogs while tblParent is to represent the link back to the tblDog to store the name of the father and mother.

Currently I have a lookup between DogID and Father. This is not working correctly but am I close.

tblDog tblParent
DogID Father
Name Mother
Sex
Chip
 
All dogs are dogs, any dog can become a parent so you only need one table.

tblDog
DogID
Name
Sex
Chip
SireID Link to ID of sire
DamID Link to ID of dam

I have a cat pedigree application and I generate 5 generation peidgrees from this table structure. You just create a query that has the same table in your query 31 times with the links from SireID and DamID to the next table.
 
Neil, thanks for the reply but I am still confused.

I understand the concept of the table containing all dogs but the linking the lookup back to the table is what is causing me some trouble.


From Sire I have the look up:

SELECT tblDog.Name, tblDog.DOB, tblDog.Sex FROM tblDog;

But then it is empty when I try to use it.

What am I missing?
 
Have a look at the attached. It's a bit rough and ready but should get you started.
 

Attachments

Users who are viewing this thread

Back
Top Bottom