Exam 1 Flashcards
Metadata
Data that describes the data
Entity
Collection of entity instanced – a container
Attributes
characteristics about an entity
Binary relationship
a relationship between two entities. pk—>fk
Ordinality
0 or 1
Cardinality
1 to many
On delete restrict
when you tried to delete an owner in a normal relationship and it gives an error because there needs to be owner for the child entity.
On delete set Null
we change on delete restrict to on delete set null and the owner in the record would become null. relationship changes to where owner becomes optional and mandatory 1 to many.
On delete cascade
makes it so that when we delete owner we delete all corresponding records. relationship changes to where owner becomes pk and fk in child entity. line and dots.
Many to many relationship
uses associate entity. both pk become pk & fk in the associative entity. Same thing as two binary 1:M relationships.
Historical associative entity
compositive pk & fk’s become fk’s and a new pk is made so that we can keep historical data.
ternary relationship
only used when three entities must be in a fourth entity. works the same as an associative identity.
1:1 relationships
either pk can become fk in mandatory. if one side is mandatory and one side is optional, the primary key from the mandatory side will become a foreign key in the optional side. if both sides are optional collapse into one entity.
two relationships between two entities
both pk’s become fk’s in other entity
unary relationship
an entity instance has a relationship with another entity instance in the same entity. the fk is from the same entity but different name. m:n > m:m one of the primary keys in the associative identity needs to be renamed.