Logical Database Design Flashcards

1
Q

___________ is a named, two-dimensional table of data.

A

RELATION

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

Tables consists of rows (__________) and columns (_____________)

A

records and attribute or field

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

Requirements for a table to qualify as a relation

A

[1] It must have a unique name
[2] Every attribute value must be atomic
[3] Every row must be unique
[4] Attributes in tables must have unique names
[5] The order of the columns must be relevant
[6] The order of the rows must be irrelevant

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

All relations are in _______________________.

A

1st Normal Form

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

_____________ (tables) correspond with entity types and with many-to-many relationship types.

A

RELATIONS

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

_________________ correspond with entity instances and with many-to-many relationship instances

A

ROWS

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

______________correspond with attributes

A

COLUMNS

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

The word relation (in relational database) is the same as the word relationship in (E-R model)

True or False?

A

FALSE

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

These are unique identifiers of relation in question

A

PRIMARY KEYS

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

What are some examples of foreign keys?

A

(1) employee numbers
(2) social security numbers

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

_________________ are how we can guarantee that all rows are unique

A

PRIMARY KEYS

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

_____________ are identifiers that enable a dependent relation on (the many side of a relationship) to refer to its parent relation (on the one side of the relationship)

A

FOREIGN KEYS

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

Keys can be simple but not composite

A

FALSE. Simple or Composite.

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

________ usually are used as indexes to speed up the response to user queries

A

KEYS

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

List three integrity constraints.

A
  1. Domain constraints
  2. Entity integrity
  3. Action assertions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

This is an integrity constraint the comprises the allowable values for an attribute.

A

DOMAIN CONSTRAINT

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

This is a integrity constraint wherein no primary key attribute may be null. All primary key fields must have data.

A

ENTITY INTEGRITY

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

This integrity constraint is best described as business rules.

A

ACTION ASSERTIONS

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

This is an integrity constraint that states that any foreign key value (on the relation of the many side) must match a primary key value in the relations of the one side

A

REFERENTIAL INTEGRITY

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

An example of an integrity constraint is “Delete Rules.” This is comprised of three rules, these being:

A
  1. Restrict
  2. Cascade
  3. Set-to-Null
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

This “Delete Rule” does not allow the delete of the “parent” side if related rows exist in “dependent side.”

A

RESTRICT

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

This “Delete Rule” automatically deletes “dependent” side rows that correspond with the “parent” side row to be deleted.

A

CASCADE

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

This “Delete Rule” sets the foreign key in the dependent side to null if deleting from the parent side.

A

SET-TO-NULL

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

Set-to-Null is preferably used in weak entities.

A

FALSE. Set-to-Null is not allowed for weak entities

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Referential integrity constraints are drawn via ____________ from dependent to parent table.
ARROWS
26
Referential constraints are implemented with foreign key to primary key references. True or False?
TRUE
27
[Mapping Regular Entities to Relations] How do we map simple attributes?
E-R attributes are mapped directly onto the relation. These are just copied.
28
[Mapping Regular Entities to Relations] How do we map composite attributes?
Use only their simple, component attributes
29
[Mapping Regular Entities to Relations] How do we map multivalued attributes?
Multivalued attributes become a separate relation with foreign key taken from the superior entity.
30
________________ enforce domain integrity constraints
DOMAIN DEFINITIONS
31
How do we map weak entities?
Weak entities become a separate relation with a foreign key taken from a superior entity
32
In weak entities, primary keys are composed of:
- partial identifier of weak entity - primary key of identifying entity (strong entity)
33
What are the three ways of mapping binary relationships?
One-to-many Many-to-many One-to-one
34
This is a binary relationship wherein the primary key on one side becomes a foreign key on the many side.
ONE-TO-MANY
35
This is a binary relationship which creates a new relations with the primary keys of the two entities as its primary key
MANY-TO-MANY
36
This is a binary relationship wherein the primary key on the mandatory side becomes a foreign key on the optional side.
ONE-TO-ONE
37
What are the two ways of mapping associative entities:
1. Identifier not assigned 2. Identifier assigned
38
This is a way of mapping associative entities wherein the default primary key for the association relation is composed of the primary keys of the two entities
IDENTIFIER NOT ASSIGNED
39
This is a way of mapping associative entities which is natural and familiar to end-users, although the default identifier may not be unique
IDENTIFIER ASSIGNED
40
The domain constraint for the foreign key should not allow null value if dependent is a weak entity. True or False?
TRUE
41
Often in 1:1 relationships, twenty directions is optimal
FALSE. One direction is optimal
42
What are the two ways of mapping unary relationships?
1. One-to-many 2. Many-to-many
43
How do we describe the one-to-many method of mapping unary relationships?
Recursive foreign key in the same relation
44
There are two relations for the many-to-many method of mapping unary relationships - One for the entity type - One for the associative relation in which the primary key has two attributes, both taken from the primary key of the entity True or False?
TRUE
45
What are the ways of mapping ternary relationships?
- One relation for each entity and one for the associative entity - Associative entity has foreign keys to each entity in the relationship
46
In mapping, supertype attributes (including identifier and subtype discriminator) go into ________________
SUPERTYPE RELATION
47
Primary key of supertype relation also becomes primary key of subtype relation. True or False?
TRUE
48
2:1 relationship is established between supertype and each subtype, with supertype as primary table True or False?
FALSE. 1:1 relationship
49
This is primarily a tool to validate and improve a logical design so that it satisfies certain constraints that avoid unnecessary duplication of data.
DATA NORMALIZATION
50
It is the process of decomposing relations with anomalies to produce smaller, well-structured relations
DATA NORMALIZATION
51
It is a relation that contains minimal data redundancy and allows users to insert, delete, and update rows without causing data inconsistencies
WELL-STRUCTURED RELATIONS
52
This an anomaly that results from adding new rows that forces user to create duplicate data
INSERTION ANOMALY
53
This is an anomaly that results from deleting rows that may cause a loss of data that would be needed for other future rows
DELETION ANOMALY
54
This is an anomaly that happens when changing data in a row forces changes to other rows because of duplication
MODIFICATION ANOMALY
55
A table should pertain to more than one entity type. True or False?
False. A table should not pertain to more than one entity type
56
This is the case when the value of one attribute (the determinant) determines the value of another attribute
FUNCTIONAL DEPENDENCY
57
This is an attribute that determines the value of another attribute
DETERMINANT
58
This is a unique identifier. One of the ________________ will become the primary key.
CANDIDATE KEY
59
Each non-key field is functionally independent from every candidate key. True or False?
FALSE. Each non-key field is functionally dependent on every candidate key
60
The _________________ is a state wherein there are no multivalued attributes and every attribute value is atomic.
FIRST NORMAL FORM
61
All relations are in the first normal form. True or False?
TRUE
62
If a new product is ordered for order 1007 of existing customer, customer data must be re-entered, causing duplication. What kind of anomaly is this?
INSERTION
63
If we delete the Dining Table from Order 1006, we lose information concerning this item's finish and price. What kind of anomaly is this?
DELETION
64
Changing the price of product ID 4 requires update in several records. What kind of anomaly is this?
UPDATE
65
What is one reason that these anomalies exist? (See Figure 5-2b for reference)
Because there are multiple themes (entity types) in one relation. This results in duplication and an unnecessary dependency between the entities
66
This describes a form wherein every non-key attribute is functionally dependent on the entire primary key
SECOND NORMAL FORM [1NF PLUS]
67
Every non-key attribute must only be defined by part of the key, not the entire key. True or False?
FALSE. Every non-key attribute must be defined by the entire key, not by only part of the key.
68
This is a functional dependency in which one or more non-key attributes are functionally dependent on part (but not all) of the primary key
PARTIAL FUNCTIONAL DEPENDENCY
69
No transitive dependencies. Non-key determinant with transitive dependencies go into new table; non-key determinant becomes primary key in the new table and stays as a foreign key in the old table.
THIRD NORMAL FORM (3NF)
70
These are called transitive, because the primary key is a determinant for another attribute which in turn is determinant for a third
TRANSITIVE DEPENDENCIES
71
A functional dependency between the primary key and one or more non-key attributes that are dependent on the primary key via another non-key attribute
TRANSITIVE DEPENDENCY
72
A table that contains one or more repeating groups.
Unnormalized Form (UNF)
73
A relation in which the intersection of each row and column contains one and only one value.
First Normal Form (1NF)
74
A relation that is in first normal form and every non-primary-key attribute is fully functionally dependent on the primary key.
Second Normal Form (2NF)
75
A relation that is in first and normal form and in which no non-primary-key attribute is transitively dependent on the primary key.
Third Normal Form (3NF)
76
This is a normal form without any multivalued dependencies
FOURTH NORMAL FORM
77
This is a normal form without any remaining anomalies
FIFTH NORMAL FORM