Question: A M:N relationship can exist in theory only. It cannot be implemented in a relational database. In the table shown below, the tables of JOB_CLASS
A M:N relationship can exist in theory only. It cannot be implemented in a relational database. In the table shown below, the tables of JOB_CLASS and EMPLOYEE show a M:N relationship, as many employees can be assigned to many vehicles. Compared to the previous tables, more rows have been added to the Employee table. Use the table below to answer question 4.
|
|
|
| Table Name: Employee | ||
| Table Name: Job Class |
| EMP_ID | EMP_LNAME | JOB_ID | |
| JOB_ID | JOB_CLASS_TYPE |
| 2020 | Davolio | 2 |
| 1 | PT Permanent |
| 2021 | Smith | 1 |
| 2 | FT |
| 2022 | Penn | 3 |
| 3 | FT |
| 2024 | Snyder | 1 |
| 4 | PT Temp |
| 2025 | Jordan | 4 |
| 5 | FT |
| 2026 | Oliver |
|
| 6 | FT |
| 2029 | Buchanan |
|
| 7 | FT Temp |
| 2030 | Matthew | 5 |
|
|
|
| 2030 | Matthew | 6 |
|
|
|
| 2036 | Lamar | 4 |
|
|
|
| 2020 | Davolio | 3 |
|
|
|
| 2038 | Dillon | 2 |
4a. Using the example
, create the ERD that shows the M:N relationship. Then create a resolved relationship. Use the snipping tool to copy/paste each ERD from Visio, below, just as is shown in the figure. Be sure that both ERDs contain all of the components shown.
Putting it all together: Create the ERD
4b. Now, expanding on what you have already created for the second ERD for #4, create a complete ERD. Include all attribute names, and identify all PK and FK attributes. As a hint for what constitutes your PK/FK values on the resolved ERD for #4, look at the contents of the ENROLL table 
FIGURE 3.26 CHANGING THE M:N RELATIONSHIPS TO TWO 1:M RELATIONSHIPS STUDENT CLASS has ENROLL CLASS registers FIGURE 3.25 CONVERTING THE M:N RELATIONSHIP INTO TWO 1:M RELATIONSHIPS Table name: STUDENT Primary key: STU NUM Foreign key: none Database name: Ch03_College Try2 STU NUM STU LNAME 321452 Bowser 324257 Smithson Table name: ENROLL Primary key: CLASS CODE +STU NUM Foreign key: CLASS_CODE, STU_NUM CLASS CODE STU_NUM ENROLL_GRADE 10014 10014 10018 10018 10021 10021 321452C 324257 EB 321452 A 324257 8 321452 C 324257 C Table name: CLASS Primary key: CLASS CODE Foreign key: CRS _CODE CLASS CODE CRS CODE CLASS SECTION 10014 10018 10021 ! CLASS- TTh 2:30-3:45 p.m. BUS252 MMVF 9:00-9:50 am. KLR211 MMVF 8:00-8:50 a.m. KLR200 TIME CLASS ROOM PROF_NUM ACCT-211 3 CIS-220 2 QM-261 342 114 114 FIGURE 3.26 CHANGING THE M:N RELATIONSHIPS TO TWO 1:M RELATIONSHIPS STUDENT CLASS has ENROLL CLASS registers FIGURE 3.25 CONVERTING THE M:N RELATIONSHIP INTO TWO 1:M RELATIONSHIPS Table name: STUDENT Primary key: STU NUM Foreign key: none Database name: Ch03_College Try2 STU NUM STU LNAME 321452 Bowser 324257 Smithson Table name: ENROLL Primary key: CLASS CODE +STU NUM Foreign key: CLASS_CODE, STU_NUM CLASS CODE STU_NUM ENROLL_GRADE 10014 10014 10018 10018 10021 10021 321452C 324257 EB 321452 A 324257 8 321452 C 324257 C Table name: CLASS Primary key: CLASS CODE Foreign key: CRS _CODE CLASS CODE CRS CODE CLASS SECTION 10014 10018 10021 ! CLASS- TTh 2:30-3:45 p.m. BUS252 MMVF 9:00-9:50 am. KLR211 MMVF 8:00-8:50 a.m. KLR200 TIME CLASS ROOM PROF_NUM ACCT-211 3 CIS-220 2 QM-261 342 114 114
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
