Solution4(database)
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
99
On Slideshare
99
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
0
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • 13
  • 15
  • 20
  • 21
  • 21
  • 37

Transcript

  • 1. 1 Figure 2-8: Entity with a multivalued attribute (Skill) and derived attribute (Years_Employed)
  • 2. 2 Ch 4: Problems and Exercises 1a Employee_ID Employee_Name Address Date_Employed Employee_ID Skill EMPLOYEE_SKILL EMPLOYEE
  • 3. 3 Fig 2-9b: Composite key attribute
  • 4. 4 Ch 4: Problems and Exercises 1b Flight_Number Date Number_of_Passengers FLIGHT
  • 5. 5 Fig 2-11a: A binary relationship with an attribute
  • 6. 6 Ch 4: Problems and Exercises 1c Employee_ID Employee_Name EMPLOYEE Employee_ID Course_ID Date_Completed COMPLETION COURSE Course_ID Course_Title
  • 7. 7 Fig 2-11b: An associative entity (CERTIFICATE)
  • 8. 8 Ch 4: Problems and Exercises 1d Employee_ID Employee_Name EMPLOYEE Certificate_Number Employee_ID Course_ID Date_Completed CERTIFICATE COURSE Course_ID Course_Title
  • 9. 9 Fig 2-15a: Unary relationship COURSE Course_Title Course_ID Is_ prerequisite_ for
  • 10. 10 Ch 4: Problems and Exercises 1e Course_IDCOURSE Course_ID Prerequisite_IDCOURSE_PREREQUISITE Course_Title
  • 11. 11 Fig 2-16 (b) Relationship with cardinality constraints Note: The diagram is incomplete. Usually, there will be other non-key attributes for the entities.
  • 12. 12 Movie_Name MOVIE Copy_Number Movie_Name VIDEOTAPE Ch 4: Problems and Exercises 1g
  • 13. 13 Fig 2-19: Example of time stamping
  • 14. 14 Ch 4: Problems and Exercises 1h Product_IDPRODUCT Product_ID Effective_Date PricePRODUCT_PRICE
  • 15. 15 Figure 3-6b: Partial specialization rule Note: The diagram is incomplete. It is missing the subtype discriminator.
  • 16. 16 Ch 4: Problems and Exercises 2a Vehicle_ID Price Make Model Engine_Displacement VEHICLE C_Vehicle_ID No_of_Passengers CAR T_Vehicle_ID Car_Type Capacity TRUCK
  • 17. 17 (a) Disjoint rule Figure 3-7: Examples of disjointness constraints Note: The diagram is incomplete. It is missing the subtype discriminator.
  • 18. 18 Ch 4: Problems and Exercises 2b Physician_ID RESPONSIBLE_PHYSICIAN Patient_ID Admit_Date Physician_ID PATIENT O_Patient_ID Checkback_Date OUTPATIENT R_Patient_ID RESIDENT_PATIENT Bed_ID BED Patient_Name Date_Discharged Bed_ID
  • 19. 19 Figure 3-9: Subtype discriminator (overlap rule) Note: The diagram is incomplete. There should be unique attributes for the subtypes.
  • 20. 20 Ch 4: Problems and Exercises 2c Part_No Description Location Manufactured? Purchased? Qty_on_Hand PART M_Part_No MANUFACTURED_PART P_Part_No PURCHASED_PART P_Part_No Supplier_ID Unit_Price SUPPLY_LINE Supplier_ID Supplier_Name SUPPLIER
  • 21. 21 Figure 3-10: Example of supertype/subtype hierarchy Note: The diagram is incomplete and missing the subtype discriminators.
  • 22. 22 Ch 4: Problems and Exercises 2d SSN Name Address Gender Date_of_Birth PERSON E_SSN Salary Date_Hired EMPLOYEE F_SSN Rank FACULTY S_SSN Position STAFF ALUMNUS A_SSN ST_SSN Major_Dept STUDENT UNDERGRAD US_SSN Class_Standing A_SSN Degree Year Date DEGREES GS_SSN Test_Score GRADUATE
  • 23. Ch 4: Problems and Exercises 13a 23 Parking Ticket table in 1NF
  • 24. Ch 4: Problems and Exercises 13b 24 Functional Dependencies of the Parking Ticket table – 1NF PARKING
  • 25. Ch 4: Problems and Exercises 13c 25 Functional Dependencies of the Parking Ticket table – 2NF STID
  • 26. Ch 4: Problems and Exercises 13d 26 Functional Dependencies of the Parking Ticket table – 3NF STID