Computer Science Homework Solutions
Problem
#93921

Primary and Foreign Keys

Please tell me which one is primary key and which one is foreign key in each situation (1-1, 1-many, many-1). In () are keys but I need to know which one is primary and foreign keys. If there's no foreign keys, pls. give one foreign key each for the situation. Thank you in advance.

1. One-to-One:
Man (man_name, man_age, man_race, man_height, man_weight)
Woman (woman_name, woman_age, woman_race, woman_height, woman_weight)
Man (1) - marries - woman(1)

2. One-to-Many:
Child (child_name, child_gender, child_age, child_weight)
Mother (mother_name, mother_age, mother_weight)
Mother (1) - has - child (Many)

3. Many-to-Many:
Teacher (teacher_name, empl_id, teacher_gender, salary_bracket)
Student (student_name, student_id, student_gender, student_grade)
Teacher (Many) - teaches/learns - Student (Many)

Solution
What is this?
By OTA - Overall OTA Rating
Purchase Cost Now
$2.19 CAD (was ~$3.99)
Included in Download
  • Plain text response
  • Attached file(s):
    • 93921_Primary and Foreign Keys.doc
$2.19 Instant Download
Add to Cart
Why you can trust BrainMass.com
  • Your Information is Secure
  • Best Online Academic Help Service
  • Students find real academic Success
Related Solutions
  • Relational Databases - Look for an example of a one-to-one relationship, an example of a one-to-many relationship, and an example of a many-to-many relationship in a newspaper, magazine, book, or everyday situation you enco ...
  • Draw dependence diagrams - The following table shows a table called Grade Report for a university. The existing functional dependencies are described as follows: Student_ID -> Student_Name, Major Course_ID -> Course_Title, ...
  • Need flow chart and pseudo-code for the following problem - Create a flowchart and pseudo-code for the following problem: You have a file containing the grades of students from Beginning Programming, along with the students' information. Your part of the pr ...
  • database concept - 1. What is an entity? An attribute? 2. What is a one-to-many relationship? Give two examples of entities that have one-to-many relationships. 3. What is a DBMS? 4. How is it possible to get m ...
  • Develop database tables using a relational database system - The following table (Attached) shows a table called Grade Report for a university. The existing functional dependencies are described as follows: Student_ID -> Student_Name, Major Course_ID -> Co ...
Browse