Chapter 5 - Database Design Flashcards

1
Q

What is Database Design?

A

A set of database specifications that can actually be implemented in a DBMS.

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

What are the Three (3) Database Designs?

A

Conceptual Design (or Schema)
Logical Design: Modified conceptual design implemented in a specific DBMS
Physical Design: Includes aspects when implemented in the DBMS such as record, table structure, index, etc.

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

What are the Two (2) Big Steps for Transforming a Data Model into a Database Design?

A
  1. Create a Table for Each Entity
  2. Create Relationships by Placing Foreign Keys
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the Sub-steps for Creating a Table for Each Entity?

A

Specify primary key
Specify properties for each column
Verify normalizations (Any functional dependencies)

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

What are the Sub-steps for Creating Relationships by Placing Foreign Keys?

A

Strong entity relationships (1:1; 1:N; N:M)
ID-Dependent and non-ID-Dependent weak entity relationships
Subtypes
Recursive (1:1; 1:N; N:M)

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

How do you Represent Weak Entities with the Relational Model?

A

If ID-Dependent, then you must add the primary key of the parent entity.
If not ID-Dependent, use the same techniques as for strong entities

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

How do you Represent a 1:1 Relationship with the Relational Model?

A

The key from one relation is placed in the other as a foreign key. It does not matter which table gets the FK

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

How do you Represent a 1:N Relationship with the Relational Model?

A

A 1:N relationship is saved by placing the key from one table into another as a foreign key.
The foreign key always goes into the many side of the relationship. The 1 side is called the parent and the N side is called the child

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

How do you Represent a N:M Relationship with the Relational Model?

A

To create a N:M relationship, a new table is created. This is called the intersection table.
The intersection table has a composite key consisting of the keys from each table it connects.

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

How do you Represent a Recursive Relationship with the Relational Model?

A

1:1 and 1:N relationships are saved by using a foreign key to itself.
N:M relationships are saved by creating an intersecting relation

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

How does the HSD (Heather Sweeney Design) differ from the ER model in Ch. 4 to the Database Design in Ch. 5?

A

A new intersection table is created for SEMINAR_CUSTOMER and CONTACT connecting SEMINAR and CUSTOMER.

Foreign keys are added to the LINE_ITEM table, which is the many or child side to INVOICE and PRODUCT

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

Know Cascading ramifications of On Update and On Delete (Parent - Child - Referential Integrity Constraint - Cascading Behavior)

A

INVOICE - LINE ITEM - InvoiceNumber in LINE_ITEM must exist in InvoiceNumber in INVOICE - Yes cascading On Delete

PRODUCT - LINE_ITEM - ProductNumber in LINE_ITEM must exist in ProductNumber in PRODUCT - Yes cascading On Update

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