Section 4 Flashcards
(30 cards)
An entity-relationship model
Is a high-level representation of data requirements, ignoring implementation details
An entity
is a person, place, product, concept, or activity
A relationship
Is a statement about two entitities
An attribute
is a descriptive property of an entity
A reflexive relationship
Relates an entity to itself
An entity-relationship diagram
Commonly called an ER diagram, is a schematic picture of entities, relationships, and attributes.
In entity-relationship modeling, a type is a set:
-An entity type is a set of things
-A relationship type is a set of related things
-An attribute type is a set of values
an instance is an element of a set
-An entity instance is an individual thing
-A relationship instance is a statement about entity instances
-An attribute instance is an individual value
Complex databases are developed in three phases:
Analysis
Logical Design
Physical Design
Analysis
Develops an entity-relationship model, capturing data requirements while ignoring implementation details
Logical design
Converts the entity-relationship model into tables, columns, and keys for a particular database system
Physical design
Adds indexes and specifies how tables are organized on storage media
Analysis steps
- Discover entities, relationships, and attributes
- Determine Cardinality
- Distinguish strong and weak entities
- Create supertype and subtype entities
Logical design steps
- Implement entities
- Implement relationships
- Implement attributes
- Apply normal form
Cardinality
Refers to maxima and minima of relationships and attributes
Relationship maximum
Is the greatest number of instances of one entity that can relate to a single instance of another entity
Relationship minimum
Is the least number of instances of one entity that can relate to a single instance of another entity
A subtype entity, Supertype entity
A —— is a subset of another entity type, called the —–
A partition
A —- of a supertype entity is a group of mutually exclusive subtype entities
Logical design follows analysis
Logical design converts an entity-relationship model to tables, columns, and keys for a specific database system.
Crow’s foot notation
Depicts cardinality as a circle (zero), a short line (one), or three short lines (many).
An intangible entity
Is documented in the data model, but not tracked with data in the database
What should primary keys be?
Simple. —– values should be easy to type and store. Small values are easy to specify in a SQL clause and speed up query processing.
An artificial key
Is a single-column primary key created by the database designer when no suitable single-column or composite primary key exists. Usually, —– values are integers, generated automatically by the database as new rows are inserted to the table.
They are stable, simple, and meaningless.