quiz 1 Flashcards
what are constraints in entity-relationship model
something that restricts relationships
what is a composite attribute
attributes that can be divided into sub-parts, use sub-parts in diagram
what are multivalued attributes
a single entity with multiple attrictbutes of the same type, not allowed for class, replace with a new entity set
what are derived attributes and how are they denoted
attributes whos value can be determined by other values available. denoted with broken oval around attribute
what is a key
a set of attributes whos values can uniquely identify an entity in an entity set
what is a superkey
a set of attributes that can uniquely identify an entity in an entity set, a set can have multiple superkeys if multiple attributes and their values together can be unique
what is a candidate key
a candidate key is a minimal superkey, no extrenuous or unnecessary attributes
what is a primary key and how are they denoted
candidate key chosen to refer to rows in a table. table can only have one primary key. denoted with primary key attribute(s) underlined. a primary key is chosen because their attributes rarely/never change
what is a relationship and its difference between relationship set
relationship is the association between entities. relationship sets are a set of relations of the same type
true or false: relationship sets can have (descriptive) attributes
true, used for properties that cant be associated with either connected entity sets
true or false: binary relationships can look like loops and if so will contain role descriptors
true slide 33
what is mapping cardinalities
to specify how many entities of set A is associated with ONE entity in set B and vice versa
what is a key constraint
A key constraint exists between set A and relationship R if entities in set A can only be associated with a single B entity (one to either one or many)
what is a one to one relationship and how do you show it in a diagram
when an entity in A can only be associated with at more one entity in B AND an entity in B can only be associated with at most one entity in A. denoted with arrows from both entity set to relationship
what is a one to many/many to one relationship and how to you denote it on a diagram
when an entity in A can be associated with any number of entities in B BUT an entity in B can be associated with at most one entity in A. denoted with the restricted set given an arrow and the whore set given a regular line
what is a many to many relationship and how are they denoted
an entity in A can map to any number of entities in B AND an entity in B can map to any number of entities in A. denoted with both entity sets connecting to the relationship with a line. no arrows.
what are descriptive attributes
attributes of a relationship set that cannot be apart of the primary key. primary key attributes are inherited from their connecting entity sets
where are primary key attributes for a relationship from
derived from one or more of its entity sets, primary keys of relationship sets cannot include descriptive attributes that belong to the set
describe many-to-many, one to many/many-to-one and one to one primary keys in relationship sets
many-to-many: relationship set’s primary key will be a compound of the primary keys from participating entity sets
one-to-many/many-to-one: the relationship set will take the same as the primary key from the entity with the key constraint (arrow)
one-to-one: the relationship set will take either primary key
what is participation constraints, what are the two types and how do you denote them
participation constraints are used to indicate that an entity in an entity set must be involved in at least one relationship.
total participation (double line or thick line from relationship to entity): constraint exists, ie all must have a match in the other entity set
partial participation (regular line) : no constraint
what is a weak entity set
where entities in an entity set cannot be uniquely identified without information from a related entity set
what are subclasses
class hierarchies of entities
what is aggregation
used to model the relationship/association that exists between entities and relationships
how are entities of a weak entity set identifies and when are we permitted to using a weak set. how are weak sets denoted
identified by combining its partial key the primary key of another entity set
only allowed when the owner and weak set are in a one to many relationship and the weak set has total participation in the full entity set.
denoted with double like around the relationship between owner and weak set and a dotted line under the weak relationships partial key