Exam 2 Flashcards
(52 cards)
Keys
a group of one or more attributes which uniquely defines a row
Surrogate keys
: a DBMS-supplied identifier of each row of a table.
Foreign keys
is an attribute (or collection of attribute) in one table that uniquely identifies a row of another table.
triggers
modules of code that are invoked by the DBMS when specific events occur.
cascading updates
propagating a change from the parent’s primary key to the children’s foreign key.
cascading deletes
deleting the children along with the parent.
how many relationships are needed and which keys go where for an id-dependent weak entity relationship
an entity whose identifier includes the identifier of another entity
two relations
one parent, one child
key of child is combination of parent key plus its own key
Used for multivalued attributes, archetype/version, and associations
how many relationships are needed and which keys go where for an 1:1 has-a entity relationship
each entity gets its own relation
the key of one is a non-key FK in the other
doesn’t matter which
if 1:1 and mandatory both ways, then they should probably be combined into one relation.
how many relationships are needed and which keys go where for an 1:M has-a entity relationship
each entity gets its own relation
key of parent must be FK in the child
usually, but not always, not part of key
child points to parent
how many relationships are needed and which keys go where for an M:N has-a weak entity relationship
three relations must be used
one for each original entity
one for “intersection” (assoc) relation
key to intersection will contain, at least, the keys of both parents
always a composite key
often contains additional attributes, for uniqueness
Always ID-dependent
how many relationships are needed and which keys go where for an recursive 1:1, 1:M, and M:N entity relationship
same as non-recursive has-a type relationships
you will have multiple columns with the same syntactic content but they will have different semantics
some rows are parent rows, some are child, some both, some neither
how many relationships are needed and which keys go where for an is-a entity relationship
one relation for supertype
one relation for each subtype
Define a BOMP relationship
Bill of Materials Processing is a class M:N recursive pattern.
what is the structure of a BOMP relationship
\_\_\_\_\_\_\_\_\_ |PartName| |OtherData|>-------| V | |\_\_\_\_\_\_\_\_ |
define relational algebra DML
procedural, complex, not common
define relational calculus DML
nonprocedural, theoretical, not used
define transform oriented DML
somewhat procedural, somewhat nonprocedural
simple, most common
SEQUEL, SQL, etc
define the graphical DML
QBE/QBF
simple, limited
define union operation
adding the tuples from one relation to those of a second relation to produce a third relation.
define the difference operation
a third relation containing tuples that occur in the first relation but not in the third.
define the intersection operation
a third relation of the tuples that appear in both, the first and second relation.
define theproduct operation
concatenation of every tuple of one relation with every tuple of the second relation.
define the project operation
an operation that selects specified attributes from a relation. (picks columns)
define the select operation
identifies tuples to be included in the new relation. (picks rows)