Lesson 3 | Data Modeling Concept Flashcards
(35 cards)
Types of Data Models
Entity-Relationship (ER) Model
UML (Unified Modeling Language
- Only addresses data and relationships
- Classic, simplest
- Best for deriving a sound table design
- Many extensions/variation exist
- Basis for most other modeling approaches
Entity-Relationship (ER) Model
- Class Models
- Goes beyong data, also models behaviors
UML (Unified Modeling Language)
- Technology Independent
- Contains more detail than the Conceptual Data Model
- Considered by many to be just an expanded conceptual data model
- Defines Entities and their attributes
- Defines Relationsips and Cardinality
- Defines Contraints
- Generally completed as a document Entity Relationship Model or Diagram
Logical Data Model
- Documentation of the structure of the data
- Used to communicate the design
- Serve as the basis for data model implementation
Entity Relationship Model
- Entities effectively become tables
- Attributes describe entities and become fields (columns) in table
- Relationhips link tables on a common attribute or “key” and become formal constraints (part of the business rules)
Entity Relationship Diagram (Relation Database Context)
What is the Data type for:
Site Name: Little Bear River near Wellsville
Char()
What is the Data type for:
Site Code: USU-LBR-Wellsville
varchar()
What is the Data type for:
Lattitude: 41.643457
Decimal() | Float
What is the Data type for:
Longitude: -111.917649
Float() | Decimal()
What is the Data type for:
Elevation: 1365 m
int(), since if we use “varchar” it becomes complex, as the user needs to know what unit they should use.
What is the Data type for:
State: UTAH
char()
What is the Data type for:
County: Cache
char()
What is the Data type for:
Description:: Attached to SR101 bridge
varchar()
What is the Data type for:
Site type: Stream
char()
What is the symbol for Zero to Many Crows foot
—–o-<– |
What is the symbol for the One to Many Crows Foot
——|–<–
What is the symbol for one to one crows foot
——|-|–
What is the symbol for Zero to One Crows Foot
—–o–|–
- Multiple notation systems are used
- Each software program is a little different
- Most common is “Crows Foot”
ER Diagram Relationship Notation
Maximum number of times an instance in one entity can be associated with instance in the related entitiy
Cardinality
Minimum number of times an instance in one entity can be associated with instance in the related entity
Participation
- Can ONLY have values of 1 or many
- Located closest to the entity in Crows Foot notation
Cardinality
- Indicates whether an instance of an entity MUST participate in the relationship
- Can ONLY have the values of 0 or 1
Participation