Chapter 5, Data Modeling with the Entity-Relationship Model
- A data model is a plan for a database design.
- It is not a database implementation.
- Think algorithm, UML diagram, ...
- We will use the Entity-Relationship or ER model
- An entity is something the user wants to track
- It will eventually become a table
- A customer, an item, a grade, a class, ....
- The scope really depends on the information the user is interested in .
- He discusses classes and instances of classes, but you better have that. (If not speak now....)
- Entities are composed of attributes
- The individual characteristics of an entity.
- Members of a class. (In the CS sense)
- You should have this one too.
- Attributes are named with Identifiers
- Identifiers identify, or uniquely name instances
- (Primary Key)
- Identifiers can have multiple attributes, composit identifiers
-
- Relationships
- Entities are associated with one another by a relationship
- Origionally relationships were named.
- But this doesn't seem to be the case any longer.
-
- Cardinality
- Relationships are classified by Cardinality
- minimum cardinality is the minimum required number of entity instances in a relationship.
- An OrderItem must have a SKU, or it cant exist.
- An Order can have 0 or more items
- This is a 0 or one measure.
- Can something exist without a sub-part or not.