Relationship in a Horse Progeny Table

  • Thread starter Thread starter Brad Kimbrell
  • Start date Start date
B

Brad Kimbrell

I need to set up a database that will have what seems to be an unending
trail. I have a horse table that represents all horses. I also have a
progeny table that lists the horse and then the sire and dam of that
horse. Those sires and dams have other sires and dams which have sires
and dams and so on.

How do I set up the relationships for this database?

I also have some lookup tables that describe sex, color, etc. Do I
need to include these tables in the relationships diagram?
 
Brad Kimbrell said:
I need to set up a database that will have what seems to be an unending
trail. I have a horse table that represents all horses. I also have a
progeny table that lists the horse and then the sire and dam of that
horse. Those sires and dams have other sires and dams which have sires
and dams and so on.

How do I set up the relationships for this database?

I also have some lookup tables that describe sex, color, etc. Do I
need to include these tables in the relationships diagram?

You don't need a separate table for progeny. Include a sire field and a
dam field in the horse record that contains the id of the sire and dam
respectively.
You can then include the horse table as many times as you need to in a query
to show the bloodline as far back as you want.

Tom Lake
 
You don't need a separate table for progeny. Include a sire field and a
dam field in the horse record that contains the id of the sire and dam
respectively.

The OP is describing a tree.

You appear to be describing the adjacency list model.

The OP should also consider the nested sets approach:

http://www.intelligententerprise.com/001020/celko.jhtml

or this from the Access MVPs ("nested set solutions are up to 1000
times faster than their equivalent methods"):

http://www.mvps.org/access/queries/qry0023.htm

Jamie.

--
 
Back
Top