sql - Database design guidance needed -


A dairy farmer, also a part-time cartoonist, has many herds of cows. He has handed each cow to a special herd. In every herd, the farmer has a cow which is his favorite - often that cow is shown in a cartoon. Some of the massacres in each herd, mainly those who believe that they should be seen in the cartoon, disagree with the choice of the farmer's favorite cow, which they unpleasantly refer to as the Holy Cow, as a result, each herd has a leader of a herd Is selected.

Is this what I think that the tables should look like you can tell me that it can be done better? So far, I am using preferred tables for many people because intermediate is also the best possible solution, no SQL statement is necessary, it is only for design purposes.

Thank you in advance

  table hair table favorite table cartoon table cow pk headed intermediate table pk cartoon id pk guayed headnames cartoonestale cow's name headlider cartoon type cartoon date  

Edit image @ 3: 1 pmEST is this correct?

Added new image @ 8:57 AM 7/20/2010 Some ERDs can also be criticized

New image @ 12: 47 pm 7/20 Added / 2010 Until there is no objection, this is the last draft of the clarification of the mark

Michael:

What are the nouns in the problem statement, and how many of them are there? Farmer - A farmer is a cow - There are many cowhands - There are many herds cartoons - there are only a cartoon in the form of many cartoons

Leave out of future discussions. These are your base organizations.

What are the properties of each entity? Each cow has a name - a cow is a member of a herd - every cow has a cow in each herd which is a sacred cow - every cow has a cow which is a cow The leaders of the herd are cartoons - each cartoon has a name - every cartoon has a cow that can not be definitively specified

Then some of these properties refer to other sects, Nothing else May include. Characteristics that do not refer to other supporting entities are simple. Other people need to pay more attention.

  Can a cow be a member of more than one herd? Should the cow be a member of the herd? Does a herd have more than one cow which is a holy cow? Is there a cow in every herd which is a sacred cow? Are there more than one cow in a herd, which is the leader of the herd? Is there a cow in every herd which is the leader of the herd?  

These questions help in understanding whether relations between entities are compulsory or optional, and whether relationships are from one to the many-to-many-to-many-many .


Comments