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
Q

Referential integrity constraints are drawn via ____________ from dependent to parent table.

A

ARROWS

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

Referential constraints are implemented with foreign key to primary key references.

True or False?

A

TRUE

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

[Mapping Regular Entities to Relations]

How do we map simple attributes?

A

E-R attributes are mapped directly onto the relation. These are just copied.

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

[Mapping Regular Entities to Relations]

How do we map composite attributes?

A

Use only their simple, component attributes

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

[Mapping Regular Entities to Relations]

How do we map multivalued attributes?

A

Multivalued attributes become a separate relation with foreign key taken from the superior entity.

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

________________ enforce domain integrity constraints

A

DOMAIN DEFINITIONS

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

How do we map weak entities?

A

Weak entities become a separate relation with a foreign key taken from a superior entity

32
Q

In weak entities, primary keys are composed of:

A
  • partial identifier of weak entity
  • primary key of identifying entity (strong entity)
33
Q

What are the three ways of mapping binary relationships?

A

One-to-many
Many-to-many
One-to-one

34
Q

This is a binary relationship wherein the primary key on one side becomes a foreign key on the many side.

A

ONE-TO-MANY

35
Q

This is a binary relationship which creates a new relations with the primary keys of the two entities as its primary key

A

MANY-TO-MANY

36
Q

This is a binary relationship wherein the primary key on the mandatory side becomes a foreign key on the optional side.

A

ONE-TO-ONE

37
Q

What are the two ways of mapping associative entities:

A
  1. Identifier not assigned
  2. Identifier assigned
38
Q

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

A

IDENTIFIER NOT ASSIGNED

39
Q

This is a way of mapping associative entities which is natural and familiar to end-users, although the default identifier may not be unique

A

IDENTIFIER ASSIGNED

40
Q

The domain constraint for the foreign key should not allow null value if dependent is a weak entity.

True or False?

A

TRUE

41
Q

Often in 1:1 relationships, twenty directions is optimal

A

FALSE. One direction is optimal

42
Q

What are the two ways of mapping unary relationships?

A
  1. One-to-many
  2. Many-to-many
43
Q

How do we describe the one-to-many method of mapping unary relationships?

A

Recursive foreign key in the same relation

44
Q

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?

A

TRUE

45
Q

What are the ways of mapping ternary relationships?

A
  • One relation for each entity and one for the associative entity
  • Associative entity has foreign keys to each entity in the relationship
46
Q

In mapping, supertype attributes (including identifier and subtype discriminator) go into ________________

A

SUPERTYPE RELATION

47
Q

Primary key of supertype relation also becomes primary key of subtype relation.

True or False?

A

TRUE

48
Q

2:1 relationship is established between supertype and each subtype, with supertype as primary table

True or False?

A

FALSE. 1:1 relationship

49
Q

This is primarily a tool to validate and improve a logical design so that it satisfies certain constraints that avoid unnecessary duplication of data.

A

DATA NORMALIZATION

50
Q

It is the process of decomposing relations with anomalies to produce smaller, well-structured relations

A

DATA NORMALIZATION

51
Q

It is a relation that contains minimal data redundancy and allows users to insert, delete, and update rows without causing data inconsistencies

A

WELL-STRUCTURED RELATIONS

52
Q

This an anomaly that results from adding new rows that forces user to create duplicate data

A

INSERTION ANOMALY

53
Q

This is an anomaly that results from deleting rows that may cause a loss of data that would be needed for other future rows

A

DELETION ANOMALY

54
Q

This is an anomaly that happens when changing data in a row forces changes to other rows because of duplication

A

MODIFICATION ANOMALY

55
Q

A table should pertain to more than one entity type.

True or False?

A

False. A table should not pertain to more than one entity type

56
Q

This is the case when the value of one attribute (the determinant) determines the value of another attribute

A

FUNCTIONAL DEPENDENCY

57
Q

This is an attribute that determines the value of another attribute

A

DETERMINANT

58
Q

This is a unique identifier. One of the ________________ will become the primary key.

A

CANDIDATE KEY

59
Q

Each non-key field is functionally independent from every candidate key.

True or False?

A

FALSE. Each non-key field is functionally dependent on every candidate key

60
Q

The _________________ is a state wherein there are no multivalued attributes and every attribute value is atomic.

A

FIRST NORMAL FORM

61
Q

All relations are in the first normal form.

True or False?

A

TRUE

62
Q

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?

A

INSERTION

63
Q

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?

A

DELETION

64
Q

Changing the price of product ID 4 requires update in several records.

What kind of anomaly is this?

A

UPDATE

65
Q

What is one reason that these anomalies exist?
(See Figure 5-2b for reference)

A

Because there are multiple themes (entity types) in one relation. This results in duplication and an unnecessary dependency between the entities

66
Q

This describes a form wherein every non-key attribute is functionally dependent on the entire primary key

A

SECOND NORMAL FORM [1NF PLUS]

67
Q

Every non-key attribute must only be defined by part of the key, not the entire key.

True or False?

A

FALSE. Every non-key attribute must be defined by the entire key, not by only part of the key.

68
Q

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

A

PARTIAL FUNCTIONAL DEPENDENCY

69
Q

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.

A

THIRD NORMAL FORM (3NF)

70
Q

These are called transitive, because the primary key is a determinant for another attribute which in turn is determinant for a third

A

TRANSITIVE DEPENDENCIES

71
Q

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

A

TRANSITIVE DEPENDENCY

72
Q

A table that contains one or more repeating groups.

A

Unnormalized Form (UNF)

73
Q

A relation in which the intersection of each row and column contains one and only one value.

A

First Normal Form (1NF)

74
Q

A relation that is in first normal form and every non-primary-key attribute is fully functionally dependent on the primary key.

A

Second Normal Form (2NF)

75
Q

A relation that is in first and normal form and in which no non-primary-key attribute is transitively dependent on the primary key.

A

Third Normal Form (3NF)

76
Q

This is a normal form without any multivalued dependencies

A

FOURTH NORMAL FORM

77
Q

This is a normal form without any remaining anomalies

A

FIFTH NORMAL FORM