CSC 675 Review 2 - Entity Relationship Data Model, Relational DDL Flashcards
Entity Relationship Data Model, Relational DDL
Explain how data models are used in the database design process.
Data models are used in the schema design.
entity
correspond to “things” in the real world, each of which can be uniquely identified.
attribute
Properties associated with entities or relationships
attribute value
entity instances
relationship instance
associate two or more entity instances together.
composite attribute
one name, multiple named component attributes
multivalued attribute
attribute can have multiple values
derived attribute
Attribute which is related to another attribute value or entity, for example age/ birthdate, number of students/students.
key attribute
Subset of attributes which uniquely determine an entity instance
value set
(domain) - set of atomic values and type
What is an entity type? *
(entities): groups of entities with the same attributes.
What is an entity instance? *
Correspond to “things” in the real world, each of which can be uniquely identified.
Explain the difference between an entity instance and an entity type. *
Student is an example of an entity type ( student_ID , Name, … ) Nicole is an example of an entity instance ( has all the attributes of a student and exists in the real world ).
Explain the difference between an attribute and a value set (domain).
Attributes are properties associated with an identity
domain - the collection of all possible values an attribute can have
Person has the attribute name, the domain is the set of all possible combinations of character strings that are a name
What is a relationship type?
sets of relationship instances between entity instances of the same types. !
Explain the difference between a relationship and a relationship type.
relationship is actual. type is abstract
What is a participation role?
Signifies role that a participating entity from the entity type plays in each relationship means.
When is it necessary to use role names in the description of relationship types?
Role names are not necessary when all participation entities are distinct the name of identity types generally specify the role played in each entity type
Describe the two alternatives for specifying structural constraints on relationship types.
We will refer to the cardinality ratio and participation constraints, taken together, as the structural constraints of a relationship type.
lower and upper bound on number of relationship instances in existence at all times (min = 0 -> partial, min > 0 -> total)
to specify minimum
and maximum numbers (min, max) on the participation of each entity type in a relationship type.
slides 51, 52, 53
What are the advantages and disadvantages of specifying structural constraints on relationship types?
?
What is meant by a recursive relationship type?
Each entity serves a particular role in the relationship. This allows the same entity to appear more than once in a relationship type (i.e. to participate in a recursive relationship).
Give some examples of recursive relationship types.
A tutor is a student and teaches a student. manager is an employee and manages an employee.
Owner entity key
Primary key of the strong entity in the week entity, foreign key
it must also have least one subset of attributes which distinguish multiple entities with the same owner key.
Weak entity type
some entities do not have unique keys, although they do participate in a total relationship with another entity which does have a key.