sql - database design help needed -


the U.S. Prepare a database to store information about their conditions in the presidents and offices of Also, the record details of their date and birth, gender, and political party affiliation. You need to record the order of the President so that the predecessor and successor of any president can be identified. Remember that Grover Cleveland has served two non-indirect words and can change political affiliation.

That is what I am telling me so far that this correction can be done please, please how can I also do this "the predecessor and successor of any president can be recognized" This is a recurring relationship And how do I execute it?

  Table Chair Table original PK Preed PK orID presF name OrCity presLName or state affiliation Birthday Sex word  

OK, you have two bodies (table): Status: President and Conditions Terms will record the date of the term and the current president.

The President will record the details of the host, not the terms as it is included in the table.

To know this, you can answer questions yourself. Here are some clues:

Identify the predecessor and successor. It will be based on the date so that you know that the preceding instant date before you visit, and the successor to note after the immediate on the predecessor and successor are always looking for your president (first president And current president) can not exist.

You want to see by ORDER until [DATE] and SELECT TOP ...

Technically designed can create a third table for further birthplace, but it is semantic.

Your current idea preserves the words in the presidents table - it does not cover the President who serves a second term. You can still show up two columns - but the generalization of the data will show you that the conditions may be a separate table (however, a design logic says that there will be only two words, hence it will have swings and fireworks).

In fact, a lot of statistics about the president can be divided into other tables using general rules - but I will not give it yet ...

If your Have a specific question, then ask in the comment - I am indirectly because its homework :)


Comments