Chapter Four Flashcards

(29 cards)

1
Q

What is a One-to-Many relationship in database mapping?

A

Primary key on the one side becomes a foreign key on the many side.

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

How is a Many-to-Many relationship mapped?

A

Create a new relation with the primary keys of the two entities as its primary key.

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

What happens in a One-to-One relationship mapping?

A

Primary key on mandatory side becomes a foreign key on optional side.

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

How are weak entities mapped in database relations?

A

Becomes a separate relation with a foreign key taken from the superior entity.

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

What is the primary key composed of in a weak entity mapping?

A

Partial identifier of weak entity and primary key of identifying relation (strong entity).

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

What is view integration in merging relations?

A

Combining entities from multiple E-R models into common relations.

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

What are synonyms in the context of merging entities?

A

Two or more attributes with different names but same meaning.

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

What are homonyms in merging relations?

A

Attributes with the same name but different meanings.

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

What are transitive dependencies?

A

Even if relations are in 3NF prior to merging, they may not be after merging.

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

What is the requirement for a table to qualify as a relation?

A

It must have a unique name, every attribute value must be atomic, and every row must be unique.

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

What are the two main purposes of keys in a database?

A

Primary keys are unique identifiers; foreign keys enable a dependent relation to refer to its parent relation.

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

What is referential integrity?

A

A rule stating that any foreign key value must match a primary key value in the relation of the one side.

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

What does the Domain Constraint refer to?

A

Allowable values for an attribute, including data types and restrictions on values.

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

What is an Insertion Anomaly?

A

An insertion anomaly occurs when the structure of a database forces you to include unnecessary or duplicate data in order to insert a new record.

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

What is a Deletion Anomaly?

A

A deletion anomaly occurs when deleting a record from a database unintentionally removes valuable data that is still needed elsewhere.

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

What is a Modification Anomaly?

A

A modification anomaly occurs when updating a piece of data requires multiple changes across several rows due to data redundancy.

17
Q

What defines First Normal Form (1NF)?

A

No multivalued attributes and every attribute value must be atomic.

18
Q

What defines Second Normal Form (2NF)?

A

1NF plus every non-key attribute is fully functionally dependent on the ENTIRE primary key.

19
Q

What defines Third Normal Form (3NF)?

A

2NF plus no transitive dependencies on non-primary-key attributes.

20
Q

What is data normalization?

A

A tool to validate and improve logical design to avoid unnecessary duplication of data.

21
Q

Fill in the blank: A relation is a named, two-dimensional table of ______.

22
Q

True or False: All relations are in 1st Normal Form.

23
Q

What is the goal of well-structured relations?

A

To contain minimal data redundancy and allow users to insert, delete, and update rows without causing data inconsistencies.

24
Q

What is a candidate key?

A

A unique identifier; one of the candidate keys will become the primary key.

25
What is an associative entity?
An entity that represents a many-to-many relationship between two other entities.
26
What is the default primary key for an associative relation?
Composed of the primary keys of the two entities involved in the relationship.
27
What is the mapping for supertype/subtype relationships?
One relation for supertype and for each subtype, with supertype attributes in the supertype relation.
28
What issues may arise from transitive dependencies?
They can lead to anomalies when relations are merged.
29
What should non-key determinants with transitive dependencies do?
Go into a new table; the non-key determinant becomes the primary key in the new table.