Chapter 3 Flashcards
What are the two main activities of the database design process?
1- database design
2- applications design
(database design/applications design) focuses on the programs and interfaces that access the database.
application design
What does the following diagram represent?
the main phases of database design
ER diagrams, EER diagrams, UML Class diagrams, and the use of design tools industry for designing and documenting large scale designs are all methodologies for ____________________.
conceptual design
What are the two ways in which a database can be modeled as?
A collection of entites or a relationship among entities
An _______ is an object in real world with an independent existence.
entity
T/F: The entity can be an object with a physical existence or with a conceptual existence in the real world.
true
T/F: Entities have attributes.
true
What does the following figure show?
two entities and their attribute values (ex: the entity [e1] and its attribute values [name, address, age, homephone].)
________ are properties used to describe an entity.
Attributes
T/F: A specific entity will have a value for each of its attributes.
true.
T/F: All attributes have the same value set (or data type) associated with it.
false, each one has a value set…
T/F: Entity is a basic concept for the ER model.
True
_______ are specific things or objects in the mini-world that are represented in the database.
entites
What are the 6 types of attributes?
simple, composite, multi-valued, stored, complex and derived.
A _______ attribute is when each entity has a single atomic value for the attribute. For example, SSN or Sex.
simple
A ________ attribute may be composed of several components.
composite
Name 2 composite attributes from the following ER schema diagram.
Address (which is composed of apt#, house#, street, city, state, zipcode, and country.) and Name (which is composed of firstname, middlename, and last name)
T/F: Composition may form a hierarchy where some components are themselves composite.
True.
A __________ attribute describes an entity which may have multiple values for that attribute. (ex: color of a CAR or PreviousDegrees of a STUDENT. Which will be denoted as _______ or _________)
multi-valued, {Color}, {PreviousDegrees}.
A _________ attribute is an attribute value which can be derived from related attributes or entites.
derived
Name 2 Derived attributes from the following ER schema diagram.
Age (which can be derived from the birth_date attributes of a person) and Number_of_employees (which can be derived by counting the number of employees related to (working for) that department.)
A _______ attribute can have other attributes derived from it.
stored (Ex: Birth_date)
T/F: In some cases, two or more attribute values are related.
true, stored and derived attributes are related in which one is derived from the other.
A _______ value is used in some cases in which a particular entity may not have an applicable value for an attribute.
null
Determine the value of the following:
a College_degrees attribute applies only to people with college degrees.
null value. a person with no college degree would have NULL for College_degrees.
______ means not applicable or unknown.
Null (not applicable: dosent exist for some instances and Unknown, not known whether the attribute value exists for some instances. )
The two cases in which NULL can be classified under the unknown category are ________ or _________.
missing, or not known.
T/F: composite and multi-valued attributes may be nested arbitrarily to any number of levels, although this is rare.
true. they are formed in complex attributes.
In a _______ attribute, the composite attribute is between parentheses () and the components are seperated by commas, and the multivalued attributes are displayed between braces {}.
complex. (also called a composite multivalued attribute.)
{PreviousDegrees (College, Year, Degree, Field)} is a denoted example of a __________ attribute.
Complex/composite multi-valued attribute
Name the subcomponents attributes of: {PreviousDegrees (College, Year, Degree, Field)}
College, Year, Degree, Field.
T/F: Multiple {PreviousDegrees (College, Year, Degree, Field)} values cannot exist.
false, multiple values can exist.
The following is an example of a ________ attribute.
composite
T/F: Attribute names are enclosed in circles and are attached to their entity type by straight lines in ER diagrams.
false, they are enclosed in ovals.
T/F: Composite attributes are attached to their component
attributes by straight lines.
true.
T/F: composite attributes are displayed in double ovals.
false, multivalued attributes.
T/F: Entities with the same basic attributes are grouped or typed
into an entity type.
true.
T/F: Each entity type will have a collection of entities stored in the
database.
true
Each entity type will have a collection of entities stored in the
database called the _______ or sometimes ________.
entity set, entity collection.
T/F: the entity set and the entity type are two seperate concepts that must always have two different names.
false, the entity set is usually referred to using the same name as the entity type. (Ex: EMPLOYEE refers to both a type of entity as well as the current collection of all employee entities in the database.)
However, entity type and entity set may be given
different names.
Determine the Entity set and Entity type in the following figure:
Employee and Company are the entity type names.
e1 e2 e3 and c1 c2 are the entity set for each entity type.
The following figure shows which state of the entity set?
it shows the current state of the entities of that type that are stored in the database.
T/F: Entity set is the current state of the entities of that type
that are stored in the database.
true
An attribute of an entity type for which each entity must have a unique value is called a ___________ of the entity type.
key attribute
The key attribute is an attribute whose values are _______ for each individual entity in the entity set.
distinct
T/F: the key attribute’s values can be used to identify each entity uniquely.
true.
T/F: sometimes several attributes together can form a key.
true, the combination of the attribute values must be distinct for each entity.
T/F: Every entity must always have a key attribute.
false, an entity type may have no key.
An entity type may also have no key, in which case it is called a ______ entity type.
weak
T/F: Specifying that an attribute is a key of an entity type means that the preceding uniqueness property must hold for EVERY entity set of the entity type.
True.
T/F: The key forms a constraint which prohibits any two entities from having the same value for the key attribute at the same time.
true, It is not the property of a particular entity set; rather, it is a constraint on any entity set of the entity type at any point in time.
T/F: A key attribute can never be composite.
false, it may be composite (if possible).
T/F: An entity type may have more than one key.
True.
T/F: In an ER diagram, each key is underlined.
true.
A _________ specifies the set of values associated with an attribute.
value set (domain)
T/F: Each simple attribute is associated with a value set.
true.
Mathematically, an attribute A for an entity type E whose value set is V is defined as a function..
A(e): E -> P(V)
(Where P(V) indicates a power set (which means all possible subsets) of V. The above definition covers simple and multivalued attributes.)
T/F: Value sets are similar to data types in most programming languages – e.g., integer, character (n), real, bit.
true.
T/F: In ER diagrams, an entity type is displayed in a square box.
false, rectangular box.
T/F: The initial conceptual design of entity types is typically not complete.
true
What does the following figure represent in a ER diagram?
it represents a cardinality ratio 1 : N for E1:E2 in R
What does the following figure represent in a ER diagram?
a derived attribute
What does the following figure represent in a ER diagram?
a weak entity type.
What does the following figure represent in a ER diagram?
a structural constraint (min, max) on participation of E in R.
What does the following figure represent in a ER diagram?
an indentifying relationship
What does the following figure represent in a ER diagram?
Total participation of E2 in R.
A __________ relates two or more distinct entities with a specific meaning.
relationship
T/F: Relationships of the same type are grouped or typed into a relationship type.
true.
The degree of a relationship type is the number of ______________.
participating entity types. (Ex: In COMPANY, Both MANAGES and WORKS_ON are binary relationships.)
______ is the schema description of a relationship, and identifies the relationship name and the participating entity types.
Relationship Type.
T/F: The relationship type also identifies certain relationship constraints.
true.
The current set of relationship instances represented in the database is the ______________.
relationship set.
T/F: the relationship set has the current state of the relationship type.
true.
T/F: more than one relationship type can exist between the same participating entity types.
true
Constraints on Relationship Types are also known as ___________
ratio constraints
Cardinality Ratio (specifies ________ participation) while the Existence Dependency Constraint (specifies ________ participation).
maximum, minimum.
T/F: the cardinality ratio is also called participation constraint.
false, The existence Dependency Constraint is also called…
One-to-one (1:1), One-to-many (1:N) or Many-to-one (N:1), Many-to-many (M:N) are the ___________.
cardinality ratio.
In the Existence Dependency Constraint, zero represents _________ participation. Therefore (It is/It is not) existence-dependent.
optional, it is not.
In the Existence Dependency Constraint, one or more represents _________ participation. Therefore (It is/It is not) existence-dependent.
mandatory, it is.
Determine what is the cardinality ratio for the following figure:
Many-to-Many (M:N)
Determine what is the cardinality ratio for the following figure:
Many-to-One (N:1)
A relationship type between the same participating entity
type in distinct roles is the ______________ relationship type.
recursive
The recursive relationship type is also called a ___________ relationship type.
self-referencing.
Determine which relationship type the following figure represents:
the recursive relationship type
A weak entity is an entity that does not have a key attribute and that is identification-dependent on __________.
another entity type.
A weak entity must participate in an _________ relationship type with an owner or identifying entity type.
identifying.
Weak entities are identified by the combination of: a ________ key of the weak entity type, and the particular entity they are related to in the identifying relation type.
partial.
T/F: A relationship type can have attributes.
True.
T/F: Most relationship attributes are used with M:N relationships.
True.
T/F: Relationship attributes in M:N relationships can be transferred to the entity type on the N-side of the relationship.
false, in 1:N relationships…
T/F: Total participation constraint (existence dependency) is shown by a ________, and partial participation constraint is by a _________in an ER diagram.
double line, single line.
the ___________ constraint specifies that each entity e in E participates in at least min and at most max relationship instances in R.
structural.
The default structural contraint is: min=__, max=__.
0,n.
Default(no constraint): min=0, max=n (signifying no limit).
T/F: the structural constraint must have min≤max, min≥0, max ≥1.
true.
T/F: The structural contraint is specified on each participation of an entity type E in a relationship type R.
true.
Determine the structural constraint of the following:
A department has exactly one manager and an employee can
manage at most one department.
Specify (0,1) for participation of EMPLOYEE in MANAGES.
Specify (1,1) for participation of DEPARTMENT in MANAGES
Determine the structural constraint of the following:
An employee can work for exactly one department but a
department can have any number of employees.
Specify (1,1) for participation of EMPLOYEE in WORKS_FOR.
Specify (1,n) for participation of DEPARTMENT in WORKS_FOR.
Relationship types of degree 2 are called _____.
Relationship types of degree 3 are called _____ and of degree n are called ______.
binary, ternary, n-ary.
T/F: In general, an n-ary relationship is not equivalent to n binary relationships.
true.
T/F: Constraints are harder to specify for higher-degree relationships (n > 2) than for binary relationships.
true.
If a particular binary relationship can be derived from a higher-degree relationship at all times, then it is __________.
redundant.
T/F: In some cases, a ternary relationship can be represented as a weak entity.
True, if the data model allows a weak entity type to have multiple identifying relationships (and hence multiple owner entity types)
Determine what type of n-ary relationship is represented in the following figure:
a ternary relationship.
Determine what type of n-ary relationship is represented in the following figure:
a ternary relationship.
Determine what type of n-ary relationship is represented in the following figure:
a redundant ternary relationship.
T/F: In higher-degree relationship constraints, the (min, max) constraints can be displayed on the edges – however, they do not fully describe the constraints.
true.
In higher-degree relationship constraints, displaying a 1, M, or N indicates ________ constraints. In which, An M or N indicates _________ constraint, and a 1 indicates that an entity can participate in at most _______ relationship instance that has a particular combination of the other participating entities.
additional, no, one.
What is needed in general to fully describe the constraints in a higher-degree relationship?
it requires both (min,max) and 1, M, or N to fully describe the constraints.