Results 1 to 9 of 9
  1. #1
    Join Date
    Jun 2012
    Posts
    4

    Need homework help

    Im having a hard time understanding ER diagrams and Tables ..

    Someone please help....



    1) A military recruit must submit an application. The recruit can only submit one application and only one application can be submitted by that recruit. Draw an ER Diagram for this model. Then map you ER Diagram to a set of tables. [10 points]
    [Suggested attributes – RecruitID, RecruitLastName, addressinfo….. ApplicationID, ApplicationSubmissionDate….]
    ER Diagram


    Tables


    2) Actors act in Broadway Plays. But an actor must have a contract that specifies their start date and salary before they can perform in the play. Each actor has a unique Screen Actors Guild number. Other data kept about an actor includes name, age and gender. Plays have a name and genre. Draw the ER Diagram and then map the diagram to a set of tables [10 points]
    ER Diagram


    Tables

    3) A computer may be infected with many viruses and viruses may infect many computers. Computers have a serial number, operating system [and many other attributes which you do not need to show]. Viruses have a virus tag, virus name, discovered date [and many other attributes you do not need to show]. Draw the ER Diagram and Map to Tables [10 points]

    ER Diagram


    Tables

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    i love helping students

    however, i don't see where you've posted anything other than the assignment

    shirley you don't expect us to do it for you?

    please post your answers, and indicate what you're having trouble with
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Jun 2012
    Posts
    4
    Thank you for responding so quick. I am having some issues with the second one, no really sure how to start that one. I have attach a .doc which has what I have done so far. I would just like to know if I am on the right track
    Attached Files Attached Files

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    yeah, more or less on the right track

    for the recruit-application, you've got each table with a FK to the other -- that's not right

    my guess is, the recruit must exist before an application can be made -- you couldn't, for example, insert an application to its table first and then insert the recruit that made it to the recruits table

    so the FK belongs in the application, and it's a one-to-zero-or-one relationship from recruit to application

    the ER diagram for the computers and viruses is okay, but when you get to the tables, the same problem -- FKs in both tables referencing each other, and that just doesn't work

    hint: many-to-many relationships are always implemented in tables as two one-to-many relationships to an intermediate "relationship" or "association" table, which typically has only two columns, each of which is an FK to its respective table, and both together forming the composite PK
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  5. #5
    Join Date
    Jun 2012
    Posts
    1
    R937

    Im a little confused on your response in regards to the table for the computer scenario. This person has virus tag on the computer table.....which confuses me. For me I would have taken off the virustag(FK) from the computer table and I would put the serialnumber back onto the computer table...

    then what? do we have a foreign key? I dont think we do. This one is tricky. What about putting a foreign key onto computer with virustag as a foreign key?

  6. #6
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    no

    there should be a 3rd table between computer and viruses
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  7. #7
    Join Date
    Jun 2012
    Posts
    4

    Last overview

    This is my first database class and the information is quite confusing when taking this class online. this is the entire assignment. If someone could look it over and just point out what things I have wrong. Thank you all for you assistance.
    Attached Files Attached Files

  8. #8
    Join Date
    Sep 2013
    Posts
    1
    Did you ever get the solution to your question guille809?

  9. #9
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Quote Originally Posted by Ogadab View Post
    Did you ever get the solution to your question guille809?
    I hope not. DBForums supports the idea of assisting students with problems, but does not do their homework for them.

    First and foremost doing the homework for a student would be unethical, and unquestionable ethics are a core value of a DBA. The DBA can do ANYTHING to the data in the databases, so the owner of the data has to have unshakable faith in the integrity of their DBA.

    Second and more personal, it is not in the best interest of a professional to do the homework for people entering their field or a related field. The odds are too good that if you do the homework for a newcomer then you'll have to deal with newcomers without critical knowledge. This is clearly not in our self interest to bring incompletely educated people into the profession.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •