0% found this document useful (0 votes)
10 views

Lecture 06 Web Ver

- The homework results showed an average grade of 132.8 (80%) out of a total of 166 points. The minimum grade was 0 and the maximum was 163. Excluding zeros, the average was 151.7 (94.8%). - The document discussed different ways of representing relationships between entities in a relational database for a health inspection problem, including transaction-in-rows vs transaction-in-columns and treating permits as an attribute vs separate entity. It also discussed modeling inspections and permits as either one-to-one or many-to-one with establishments.

Uploaded by

d.vargas
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Lecture 06 Web Ver

- The homework results showed an average grade of 132.8 (80%) out of a total of 166 points. The minimum grade was 0 and the maximum was 163. Excluding zeros, the average was 151.7 (94.8%). - The document discussed different ways of representing relationships between entities in a relational database for a health inspection problem, including transaction-in-rows vs transaction-in-columns and treating permits as an attribute vs separate entity. It also discussed modeling inspections and permits as either one-to-one or many-to-one with establishments.

Uploaded by

d.vargas
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 7

Homework #3 Results

• Total points 166


• Overall grades:
– Average 132.8 or 80% HW#3 Grade Distribution
– Minimum 0 70
– Maximum 163 60
50
– Standard Deviation 51 40

• Excluding zeros: 30
20

– Average: 151.7 or 94.8% 10


0
– Minimum 120 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170

– Maximum 163
– Standard Deviation 8.65

Tuesday, September 21 90-728 MIS Lecture Notes 1


, 1999
Relational Database Development So Far
• E-R diagrams
– Entities: essential data elements
– Attributes: data element descriptors
– Entity linkage categories: relationships, connectivity, cardinality
• Relational Database Models
– Tables: correspond to entities
– Fields: correspond to attributes
– Relationships: correspond to business rules, connectivity
– Basic queries
• Relational Database Applications
– Data management
– Tables
– Forms

How do we bring it all together in a real-world setting?


Tuesday, September 21 90-728 MIS Lecture Notes 2
, 1999
Health Inspection Problem Extensions - I
• Inspection event may be represented two ways:
– transaction-in-rows
– transaction-in-columns
Example:
Cleanliness Safety Structural
Soundness

INSPECTION

vs:
1 M M 1
INSPECTION_TYPE INSPLINK INSPECTION

What are the pros and cons of each approach?

Tuesday, September 21 90-728 MIS Lecture Notes 3


, 1999
Health Inspection Problem Extensions- II
• Permit could be treated as:
– attribute of ESTABLISHMENT
– separate entity
Permit ID
Example:
PERMIT 1 M
has a ESTABLISHMENT
STATUS (1,1) (0,M)

vs: Permit ID

PERMIT STATUS 1 M M 1
has a PERMIT has a ESTABLISHMENT
(0,M) (1,1) (1,1) (0,M)

What are the pros and cons of each approach?

Tuesday, September 21 90-728 MIS Lecture Notes 4


, 1999
Health Inspection Problem Extensions- III
• INSPECTION and PERMIT (if included as an entity) could be
treated as:
– one-to-one related with ESTABLISHMENT (snapshot)
– many-to-one related with ESTABLISHMENT (life cycle)

What are the pros and cons of each approach?

Tuesday, September 21 90-728 MIS Lecture Notes 5


, 1999
School Bus Garage E-R Diagram
EMPLOYEE_CODE
1 (1,M)

Has a

M (1,1)

GAS_TANK_LEVEL GAS_FILL_UP EMPLOYEE


M (1,1) 1 (1,M)

Undergoes Has a Has a Has a

1 (1,M) M (1,1)
M 1 1 M M Has a 1
OIL_CHECK Undergoes BUS Undergoes REPAIR (1,1) (1,M)
REASON_CODE
(1,M) (1,1)
(1,1) (1,M) 1 (0,M)
1 (1,M)
M (1,1)
Undergoes M 1
RPLINK (1,M)
PART
M (1,1) (1,1)

INSPECTION
1 (10,10)
M (1,1)

M 1 INSPECTION_
INSPLINK CODE
(1,1) (1,M)

Tuesday, September 21 90-728 MIS Lecture Notes 6


, 1999
School Bus Garage Case Relational
Database Schema
tblReasonCode (Reason)
Scheduled Maintenance tblEmployee (EmployeeID, Classification@, LName, FName, …)
Breakdown
Bus Driver Request tblBus (BusID, Make, CurrentOdometerReading)
Result of Inspection
tblRepair (RepairID, RepairDate, BusID@, MechanicID@, HelperID@, SupervisorID@,
tblClassificationCode (Classification) Reason@, RepairOdometerReading, WorkDescription)
Mechanic
Helper tblPart (PartID, PartDescription, UnitCost)
Supervisor
tblRepairPartLink (RepairID@, PartID@, Quantity)
tblInspectionOutcomeCode (Outcome)
OK tblGasTankLevel (ReadingID, ReadingDate, ReadingTime, ReadingValue)
Adjusted
Replaced tblGasFillUp (FillUpID, BusID@, FillUpDate, GasOdometerReading, GallonsPumped)

tblInspectionType(Type) tblOilCheck (OilCheckID, BusID@, OilCheckDate, QuartsAdded)


FLBrakes
FRBrakes tblInspection (InspectionID, BusID@, InspectionDate, InspectionOdometerReading)
RLBrakes
RRBrakes tblInspectionTypeLink (InspectionID@, Type@, Outcome@, Comment)
FLTire
FRTire
RLOTire Derived Attributes:
RLITire [ExtendedCost] = Quantity*[UnitCost]
RROTire [TotalCost] = Sum of [ExtendedCost]
RRITire
Tuesday, September 21 90-728 MIS Lecture Notes 7
, 1999

You might also like