Class 03. Flashcards
ERDs + relationships
what are entities?
the database “nouns” (signal the problem)
what are attributes?
characteristics of entities
what is a key attribute?
a unique identifier
what are multi varied attributes?
more than one values for an attribute (ie. address + number)
what is a composite attribute?
an attribute of an attribute
what is a candidate key?
the minimal set of attributes we can identify a record with + non-duplicate (one of these are the primary keys)
what are relationships?
how entities relate (the verbs)
T/F: relationships can’t have attributes
false
what is cardinality?
“at most one” participation
identify a many-to-one relationship
arrow on one side
identify a one-to-one relationship
arrows on both sides
what is participation constraint?
“at least one” participation
what are subclasses?
child of a parent entity connected by a merge (ie. grad vs undergrad)
what is a ERD pitfall to avoid?
over-specifiying attributes
how to create an ERD?
- list entities
- list attributes
- confirm primary keys
- establish relationships
- confirm cardinalities
- confirm participation constraints