Chapter 3 Flashcards

1
Q

What are the two main activities of the database design process?

A

1- database design
2- applications design

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

(database design/applications design) focuses on the programs and interfaces that access the database.

A

application design

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does the following diagram represent?

A

the main phases of database design

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

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 ____________________.

A

conceptual design

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the two ways in which a database can be modeled as?

A

A collection of entites or a relationship among entities

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

An _______ is an object in real world with an independent existence.

A

entity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

T/F: The entity can be an object with a physical existence or with a conceptual existence in the real world.

A

true

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

T/F: Entities have attributes.

A

true

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does the following figure show?

A

two entities and their attribute values (ex: the entity [e1] and its attribute values [name, address, age, homephone].)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

________ are properties used to describe an entity.

A

Attributes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

T/F: A specific entity will have a value for each of its attributes.

A

true.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

T/F: All attributes have the same value set (or data type) associated with it.

A

false, each one has a value set…

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

T/F: Entity is a basic concept for the ER model.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

_______ are specific things or objects in the mini-world that are represented in the database.

A

entites

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are the 6 types of attributes?

A

simple, composite, multi-valued, stored, complex and derived.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

A _______ attribute is when each entity has a single atomic value for the attribute. For example, SSN or Sex.

A

simple

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

A ________ attribute may be composed of several components.

A

composite

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Name 2 composite attributes from the following ER schema diagram.

A

Address (which is composed of apt#, house#, street, city, state, zipcode, and country.) and Name (which is composed of firstname, middlename, and last name)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

T/F: Composition may form a hierarchy where some components are themselves composite.

A

True.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

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 _________)

A

multi-valued, {Color}, {PreviousDegrees}.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

A _________ attribute is an attribute value which can be derived from related attributes or entites.

A

derived

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Name 2 Derived attributes from the following ER schema diagram.

A

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.)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

A _______ attribute can have other attributes derived from it.

A

stored (Ex: Birth_date)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

T/F: In some cases, two or more attribute values are related.

A

true, stored and derived attributes are related in which one is derived from the other.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

A _______ value is used in some cases in which a particular entity may not have an applicable value for an attribute.

A

null

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

Determine the value of the following:
a College_degrees attribute applies only to people with college degrees.

A

null value. a person with no college degree would have NULL for College_degrees.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

______ means not applicable or unknown.

A

Null (not applicable: dosent exist for some instances and Unknown, not known whether the attribute value exists for some instances. )

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

The two cases in which NULL can be classified under the unknown category are ________ or _________.

A

missing, or not known.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

T/F: composite and multi-valued attributes may be nested arbitrarily to any number of levels, although this is rare.

A

true. they are formed in complex attributes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

In a _______ attribute, the composite attribute is between parentheses () and the components are seperated by commas, and the multivalued attributes are displayed between braces {}.

A

complex. (also called a composite multivalued attribute.)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

{PreviousDegrees (College, Year, Degree, Field)} is a denoted example of a __________ attribute.

A

Complex/composite multi-valued attribute

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

Name the subcomponents attributes of: {PreviousDegrees (College, Year, Degree, Field)}

A

College, Year, Degree, Field.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

T/F: Multiple {PreviousDegrees (College, Year, Degree, Field)} values cannot exist.

A

false, multiple values can exist.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

The following is an example of a ________ attribute.

A

composite

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

T/F: Attribute names are enclosed in circles and are attached to their entity type by straight lines in ER diagrams.

A

false, they are enclosed in ovals.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

T/F: Composite attributes are attached to their component
attributes by straight lines.

A

true.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q

T/F: composite attributes are displayed in double ovals.

A

false, multivalued attributes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q

T/F: Entities with the same basic attributes are grouped or typed
into an entity type.

A

true.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q

T/F: Each entity type will have a collection of entities stored in the
database.

A

true

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

Each entity type will have a collection of entities stored in the
database called the _______ or sometimes ________.

A

entity set, entity collection.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
41
Q

T/F: the entity set and the entity type are two seperate concepts that must always have two different names.

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
42
Q

Determine the Entity set and Entity type in the following figure:

A

Employee and Company are the entity type names.
e1 e2 e3 and c1 c2 are the entity set for each entity type.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
43
Q

The following figure shows which state of the entity set?

A

it shows the current state of the entities of that type that are stored in the database.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
44
Q

T/F: Entity set is the current state of the entities of that type
that are stored in the database.

A

true

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
45
Q

An attribute of an entity type for which each entity must have a unique value is called a ___________ of the entity type.

A

key attribute

46
Q

The key attribute is an attribute whose values are _______ for each individual entity in the entity set.

A

distinct

47
Q

T/F: the key attribute’s values can be used to identify each entity uniquely.

A

true.

48
Q

T/F: sometimes several attributes together can form a key.

A

true, the combination of the attribute values must be distinct for each entity.

49
Q

T/F: Every entity must always have a key attribute.

A

false, an entity type may have no key.

50
Q

An entity type may also have no key, in which case it is called a ______ entity type.

A

weak

51
Q

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.

A

True.

52
Q

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.

A

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.

53
Q

T/F: A key attribute can never be composite.

A

false, it may be composite (if possible).

54
Q

T/F: An entity type may have more than one key.

A

True.

55
Q

T/F: In an ER diagram, each key is underlined.

A

true.

56
Q

A _________ specifies the set of values associated with an attribute.

A

value set (domain)

57
Q

T/F: Each simple attribute is associated with a value set.

A

true.

58
Q

Mathematically, an attribute A for an entity type E whose value set is V is defined as a function..

A

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.)

59
Q

T/F: Value sets are similar to data types in most programming languages – e.g., integer, character (n), real, bit.

A

true.

60
Q

T/F: In ER diagrams, an entity type is displayed in a square box.

A

false, rectangular box.

61
Q

T/F: The initial conceptual design of entity types is typically not complete.

A

true

62
Q

What does the following figure represent in a ER diagram?

A

it represents a cardinality ratio 1 : N for E1:E2 in R

63
Q

What does the following figure represent in a ER diagram?

A

a derived attribute

64
Q

What does the following figure represent in a ER diagram?

A

a weak entity type.

65
Q

What does the following figure represent in a ER diagram?

A

a structural constraint (min, max) on participation of E in R.

66
Q

What does the following figure represent in a ER diagram?

A

an indentifying relationship

67
Q

What does the following figure represent in a ER diagram?

A

Total participation of E2 in R.

68
Q

A __________ relates two or more distinct entities with a specific meaning.

A

relationship

69
Q

T/F: Relationships of the same type are grouped or typed into a relationship type.

A

true.

70
Q

The degree of a relationship type is the number of ______________.

A

participating entity types. (Ex: In COMPANY, Both MANAGES and WORKS_ON are binary relationships.)

71
Q

______ is the schema description of a relationship, and identifies the relationship name and the participating entity types.

A

Relationship Type.

72
Q

T/F: The relationship type also identifies certain relationship constraints.

A

true.

73
Q

The current set of relationship instances represented in the database is the ______________.

A

relationship set.

74
Q

T/F: the relationship set has the current state of the relationship type.

A

true.

75
Q

T/F: more than one relationship type can exist between the same participating entity types.

A

true

76
Q

Constraints on Relationship Types are also known as ___________

A

ratio constraints

77
Q

Cardinality Ratio (specifies ________ participation) while the Existence Dependency Constraint (specifies ________ participation).

A

maximum, minimum.

78
Q

T/F: the cardinality ratio is also called participation constraint.

A

false, The existence Dependency Constraint is also called…

79
Q

One-to-one (1:1), One-to-many (1:N) or Many-to-one (N:1), Many-to-many (M:N) are the ___________.

A

cardinality ratio.

80
Q

In the Existence Dependency Constraint, zero represents _________ participation. Therefore (It is/It is not) existence-dependent.

A

optional, it is not.

81
Q

In the Existence Dependency Constraint, one or more represents _________ participation. Therefore (It is/It is not) existence-dependent.

A

mandatory, it is.

82
Q

Determine what is the cardinality ratio for the following figure:

A

Many-to-Many (M:N)

83
Q

Determine what is the cardinality ratio for the following figure:

A

Many-to-One (N:1)

84
Q

A relationship type between the same participating entity
type in distinct roles is the ______________ relationship type.

A

recursive

85
Q

The recursive relationship type is also called a ___________ relationship type.

A

self-referencing.

86
Q

Determine which relationship type the following figure represents:

A

the recursive relationship type

87
Q

A weak entity is an entity that does not have a key attribute and that is identification-dependent on __________.

A

another entity type.

88
Q

A weak entity must participate in an _________ relationship type with an owner or identifying entity type.

A

identifying.

89
Q

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.

A

partial.

90
Q

T/F: A relationship type can have attributes.

A

True.

91
Q

T/F: Most relationship attributes are used with M:N relationships.

A

True.

92
Q

T/F: Relationship attributes in M:N relationships can be transferred to the entity type on the N-side of the relationship.

A

false, in 1:N relationships…

93
Q

T/F: Total participation constraint (existence dependency) is shown by a ________, and partial participation constraint is by a _________in an ER diagram.

A

double line, single line.

94
Q

the ___________ constraint specifies that each entity e in E participates in at least min and at most max relationship instances in R.

A

structural.

95
Q

The default structural contraint is: min=__, max=__.

A

0,n.
Default(no constraint): min=0, max=n (signifying no limit).

96
Q

T/F: the structural constraint must have min≤max, min≥0, max ≥1.

A

true.

97
Q

T/F: The structural contraint is specified on each participation of an entity type E in a relationship type R.

A

true.

98
Q

Determine the structural constraint of the following:
A department has exactly one manager and an employee can
manage at most one department.

A

Specify (0,1) for participation of EMPLOYEE in MANAGES.
Specify (1,1) for participation of DEPARTMENT in MANAGES

99
Q

Determine the structural constraint of the following:
An employee can work for exactly one department but a
department can have any number of employees.

A

Specify (1,1) for participation of EMPLOYEE in WORKS_FOR.
Specify (1,n) for participation of DEPARTMENT in WORKS_FOR.

100
Q

Relationship types of degree 2 are called _____.
Relationship types of degree 3 are called _____ and of degree n are called ______.

A

binary, ternary, n-ary.

101
Q

T/F: In general, an n-ary relationship is not equivalent to n binary relationships.

A

true.

102
Q

T/F: Constraints are harder to specify for higher-degree relationships (n > 2) than for binary relationships.

A

true.

103
Q

If a particular binary relationship can be derived from a higher-degree relationship at all times, then it is __________.

A

redundant.

104
Q

T/F: In some cases, a ternary relationship can be represented as a weak entity.

A

True, if the data model allows a weak entity type to have multiple identifying relationships (and hence multiple owner entity types)

105
Q

Determine what type of n-ary relationship is represented in the following figure:

A

a ternary relationship.

106
Q

Determine what type of n-ary relationship is represented in the following figure:

A

a ternary relationship.

107
Q

Determine what type of n-ary relationship is represented in the following figure:

A

a redundant ternary relationship.

108
Q

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.

A

true.

109
Q

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.

A

additional, no, one.

110
Q

What is needed in general to fully describe the constraints in a higher-degree relationship?

A

it requires both (min,max) and 1, M, or N to fully describe the constraints.