Primary and foreign keys


Question:

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.

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 Preview :

Prepared by a verified Expert
Database Management System: Primary and foreign keys
Reference No:- TGS01937461

Now Priced at $20 (50% Discount)

Recommended (99%)

Rated (4.3/5)