Data Modeling: This Class: Hand in Exercises On Paper After Class Next Class: No Reading. Exercises Due After Class
Data Modeling: This Class: Hand in Exercises On Paper After Class Next Class: No Reading. Exercises Due After Class
264 Lecture 8
Data modeling
Data models
Data model is representation of
Things (or entities or objects) of importance to a
business or a system
How the things relate to each other
Entity occurrence
Department
DeptNbr
DeptName
DeptType
DeptStatus
Table, class
DeptNbr
930
378
372
923
483
Department
DeptName DeptType
Receiving
Mfg
Assembly
Mfg
Finance
Adm
Planning
Adm
Construction Plant
DeptStatus
Active
Active
Active
Active
Inactive
Row, object
8
Entities
Department is an entity type
Attributes
Attributes are a data item or property
associated with an entity type
They are typically nouns (quantity, type, color, )
Example: Employee
ID
Name
Social security number
Address
Phone
11
Instructor
Teaching assistant (TA)
Course section number
Building name
Course number
Textbook price
Teaching asst (TA) name
Instructor ID
Textbook author
Course title
Textbook
Classroom
Textbook ISBN
Section days
Instructor
Teaching assistant (TA)
Course section number
Building name
Course number
Textbook price
Teaching asst (TA) name
Instructor ID
Textbook author
Course title
Textbook
Classroom
Textbook ISBN
Section days
Solution
14
Department
DeptNbr DeptName DeptTypeDeptStatus
930 Receiving Mfg
Active
378 Assembly Mfg
Active
372 Finance Adm
Active
923 Planning Adm
Active
483 Construction
Plant
Inactive
ValidDeptType
DeptType
Mfg
Adm
Plant
Sales
Operations
15
Relationships
Entities are drawn as boxes, as in the broker
diagram
Relationships are lines between boxes
Cardinality is the expected number of
related occurrences between the two
entities in the relationship
Relationships + cardinality = business rules
One
(Instructor)
Zero or many
(Course section)
16
17
Solution
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.