Chapter 4: Logical Database Design and the Relational Model Flashcards

(79 cards)

1
Q

The entity relationship diagram is a logical data model (T or F)

A

False

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

What is the objective of logical database design?

A

To transform the conceptual design into a logical database design that can be implemented via a chosen dbms

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

The relational model is based on mathematics (T or F)

A

True

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

What are the 3 components of a relational data model?

A
  1. Data structure
  2. Data manipulation
  3. Data integrity
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

A named two-dimensional table
of data

A

relation

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

is an attribute or a combination of attributes that
uniquely identifies each row in a relation

A

primary key

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

A primary key that consists of
more than one attribute

A

composite key

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

What is used to show relationships with relations?

A

Foreign keys

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

In the shorthand notation, what is used to identify foreign and primary keys?

A

PK: Solid underline
FK: Dashed underline

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

Properties of Relations: What are the properties of relations?

A
  1. Has a unique name
  2. rows and columns are atomic
  3. each row is unique
  4. each column is unique
  5. The sequence of columns are insignificant
  6. the sequence of rows is insignificant
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

a description of the overall logical structure of the database

A

Schema

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

What are the two common methods for expressing a schema

A
  1. short text statements
  2. graphical representation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Integrity Constraints: What are the three constraints found in relational data models?

A
  1. Domain Constraint
  2. Entity Integrity
  3. Referential Integrity
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Integrity Constraints: is the set of values that may be assigned to an attribute

A

Domain Constraint

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

Integrity Constraints: is design to ensure that every relation has a primary key and that the data values are all valid

A

Entity Integrity

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

Integrity Constraints: In entity integrity, it ensures that all primary key attributes are?

A

Non-null

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

Integrity Constraints: A value that may be assigned to an attribute when no other value
applies or when the applicable
value is unknown.

A

Null

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

Integrity Constraints: A rule that states that either each
foreign key value must match
a primary key value in another
relation or the foreign key value
must be null.

A

referential integrity constraint

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

Integrity Constraints: In referential integrity, it is allowed to have a null foreign key if?

A

The relationship is optional

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

Well-Structured Relations: A relation that contains __ ___ and allows users
to __ ___ __ ___the
rows in a table without errors or
inconsistencies.

A
  1. minimal redundancy
  2. insert, modify, and delete
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Well-Structured Relations: Redundancies may lead to?

A

Anomalies

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

Well-Structured Relations: An error or inconsistency that
may result when a user attempts
to update a table that contains
redundant data

A

anomaly

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

Well-Structured Relations: What are the three anomalies?

A
  1. Insertion
  2. Deletion
  3. Modification
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Well-Structured Relations: Restrictions in composite primary keys when creating new tables are what anomaly?

A

Insertion Anomaly

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Well-Structured Relations: When a removal of an attribute leads to a deletion of the whole instance
Deletion Anomaly
26
Well-Structured Relations: When updating needs to be done to every instance is what type of anomaly?
Modification Anomaly
27
Transforming EER Diagrams into Relations: aare entities that have an independent existence and generally represent real-world objects, such as persons and products. It is represented by what in a graphical representation?
Regular Entities. By a solid line box
28
Transforming EER Diagrams into Relations: are entities that cannot exist except with an identifying relationship with an owner (regular) entity type. It is identified in a graphical representation as?
Weak Entities. A double line box
29
Transforming EER Diagrams into Relations: are formed from many-to-many relationships between other entity types. It is identified in a graphical representation with?
Associative Entities. Rounded cornered box
30
Transforming EER Diagrams into Relations: Associative entities are also called?
Gerunds
31
Transforming EER Diagrams into Relations: What are the steps in creating relational data models?
1. Map Regular Entities 2. Map Weak Entities 3. Map Binary Entities 4. Map Associative Entities 5. Map Unary Entities 6. Map Ternary Relationships 7. Map Supertype/Subtype Relationships
32
Transforming EER Diagrams into Relations: What happens to entities in step 1?
They become relations/tables
33
Transforming EER Diagrams into Relations: What will you do if there are composite attributes from an entity?
Separate each attribute into its own columns
34
Transforming EER Diagrams into Relations: What would you do with multivalued attributes?
Create a separate relation for the said attribute, and then use the primary key of the original relation and the ex- multivalued attribute as the primary keys
35
Transforming EER Diagrams into Relations: Nonkey attributes are also called
descriptors
36
Transforming EER Diagrams into Relations: exists only through an identifying relationship with another entity type called the
owner
37
Transforming EER Diagrams into Relations: a weak entity has no complete identified and only uses a?
partial identifier
38
Transforming EER Diagrams into Relations: What do you do when there is a weak and strong entity relationship in your E-R diagram?
The weak entity references the pk of the strong entity and its partial identifier as its primary keys
39
Transforming EER Diagrams into Relations: A serial number or other systemassigned primary key for a relation.
Surrogate primary key
40
Transforming EER Diagrams into Relations: What are the instances when you use a surrogate key?
1. When there is a composite primary key 2. When the natural primary key is inefficient 3. When it cannot be unique in the future
41
Transforming EER Diagrams into Relations: For binary 1:M, what do you do?
Create two relations, wherein the foreign key is placed on the "many" relation
42
Transforming EER Diagrams into Relations: Are foreign keys required to be the same names at the primary key it is referencing?
No. As long as it has the same domain.
43
Transforming EER Diagrams into Relations: In binary m:n, how do you do it?
Create 3 relations, each having their own unique attributes while the third one uses a composite key of both the original relations. (Associative Entity)
44
Transforming EER Diagrams into Relations: In binary 1:1, what do you do?
Create 2 relations, the optional relation has the foreign key reference
45
Transforming EER Diagrams into Relations: When identifiers are not assigned, associative entities use what primary keys?
A composite primary key of the two related relations
46
Transforming EER Diagrams into Relations: When an identifier is assigned to an associative entity, how would the relation look like?
1. The primary key will be the assigned one 2. The primary keys of the other two relations are referenced using foreign keys
47
Transforming EER Diagrams into Relations: In unary 1:M relationships, how would you make it?
1. Create a relation 2. Add a foreign key that references the primary key of the same relation
48
Transforming EER Diagrams into Relations: A foreign key in a relation that references the primary key values of the same relation
recursive foreign key
49
Transforming EER Diagrams into Relations: A unary M:N relationship is made how?
1. Create two relations (one is an associative entity) 2. A composite key that references the PK of the main relation
50
Transforming EER Diagrams into Relations: In a ternary relationship what is the default primary key?
The primary keys of the three relation and partial identifier of the associative entity
51
Normalization: When should you use normalization?
1. During logical database design 2. When reverse-engineering older systems
52
decomposing relations with anomalies
Normalization
53
Normalization: Normalization makes no assumptions about how data will be used in displays (T or F)
True
54
Normalization: is based on normal forms or functional dependencies defines data usage (T or F)
False. Business Rules dapat
55
Normalization: A state of a relation that requires that certain rules regarding relationships between attributes (or functional dependencies) are satisfied
Normal form
56
Steps in Normalization: What is the rules for first normal form?
multivalued attributes have been removed
57
Steps in Normalization: Can intersections in the table be null I the first normal form?
Yes
58
Steps in Normalization: rule for 2nd normal form?
Remove partial functional dependencies
59
Steps in Normalization: rules for 3rd normal form
Transitive dependencies are removed
60
Steps in Normalization: Any remaining anomalies that result from functional dependencies have been removed
Boyce Codd normal form
61
Steps in Normalization: Any multivalued dependencies have been removed
foruth normal form
62
Steps in Normalization: Any remaining anomalies have been removed
Fifth normal form
63
Normalization:A constraint between two attributes in which the value of one attribute is determined by the value of another attribute.
Functional dependency
64
Normalization:The attribute on the left side of the arrow in a functional dependency
Determinant
65
Normalization:An attribute, or combination of attributes, that uniquely identifies a row in a relation
Candidate key
66
Normalization:What are the two properties of Candidate Keys?
1. Unique 2. Nonredundant
67
Normalization:Are all candidate keys determinants? What about the other way around?
All candidate keys are determinants but not all determinants are candidate keys
68
Normalization: What is the preliminary step in normalization?
Get a user view
69
exists when a nonkey attribute is functionally dependent on part (but not all) of the primary key.
partial functional dependency
70
Normalization:A functional dependency between the primary key and one or more nonkey attributes that are dependent on the primary key via another nonkey attribute.
transitive dependency
71
Normalization: How to convert to 3rd normal form?
1. Create a new relation 2. Transfer all related attributes to the non pk 3. Reference PK of new relation to the old relation
72
Merging Relations: Is also called?
View integration
73
Merging Relations: Two (or more) attributes that have different names but the same meaning
synonym
74
Merging Relations:An alternative name used for an attribute.
alias
75
Merging Relations:An attribute that may have more than one meaning
homonym
76
A primary key whose value is unique across all relations.
Enterprise Key
77
Enterprise Key:This criterion makes a primary key more like what in object-oriented databases is called
object identifier
78
Enterprise Key: If a enterprise key is already available, what would happen to the "old pks"
they would become non key attributes
79