MySQL Forums
Forum List  »  Newbie

Creating A database, way more complex than I expected?
Posted by: Corey Carpenter
Date: July 26, 2009 05:00PM

I am upgrading my private in-house reptile husbandry website. Right now we can input data with a type of commenting system, but it is too limited and we need to be able to do more with the data.

I have figured out some of the simpler tables but I am stuck with the breeding part. Here is some info...

each animal has it's own unique numeric id, when they are bred we get a new id; id1xid2 so that is the pair id. the pairs are not solid, one may mate with many others so I am sticking with the id1xid2 system. So that brings me to the 'pairing' page - any breeding records for that particular pair are found on that page and multiple breeding sessions are also listed on that page.

The offspring needs to be recorded as well. there are three types, slugs, still, and live. Slugs just need a count, stills need a list of just the morph or type, and live needs the type and an id assigned by the existing framework.

I also need to keep per-session notes for the pairing so that would be session id, notes, and date.

What I do not understand is if I have a table for pairings, sessions, slugs, stills, and lives... how do I keep track of what records match?

I ran across this example, but what I need is a bit more complex.

"The emp_id column has been designated as a primary index in the workers table. There are two reasons for this. This ensures that no two employees will mistakenly be assigned the same id number, and it also provides an index in case we decide to use a foreign key to maintain referential integrity between the two tables. "

Thanks!

Options: ReplyQuote


Subject
Written By
Posted
Creating A database, way more complex than I expected?
July 26, 2009 05:00PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.