Module 05a - Relationship and Cardinality Flashcards
Data Model vs DB Design
- A data model is a plan or blueprint for a database design
- Data model is more generalized and abstract than DB design
- It is easier to change a data model then it is to change a database design, so it is the place to work through conceptual DB problems.
Data Model = Conceptual design
Conceptual design = data model
Logical design
Physical design
ER Model
Is a set of concepts and graphical symbols that can be used to create conceptual schemas
ER Model versions
- Original ER model - Peter Chen (1976)
- Extended ER model
- Information Engineering (IE) - James Martin (1990) “crow foot notation”
- IDEF1X
- UML
Crow foot notation
Developed by James Martin (1990), also known as crow foot notation. It is easier to understand
Entity
Something that can be identified and the users want to track
Entity class
A collection of entities of a given type
Entity instace
The occurrence of a particular entity
Attributes
Attributes describe an entity’s characteristics. All entity instances of a given entity class have the same attributes, but vary in the values of those attributes.
Identifier
- Are attributes that name, or identify, entity instances.
- The identifier of and entity instance consists of one or more of the entity’s attributes.
- Composite identifiers are identifiers that consists of two or more attributes.
- Identifiers in data models become keys in database designs.
Relationships
Associate one entity with another
Relationships classes vs Relationships instances
- Relationship classes are associations among entity classes
- Relationships instances are associations among entity instances
Degree
Is the number of entity classes in the relationship.
- Two entities have a binary relationship of degree two
- Three entities have ternary relationship of degree three
Cardinality
Means “count”, and is expressed as a number.
Maximum cardinality
Is the maximum number of entity instances that can participate in a relationship.