Module 06b - Creating Relationships Flashcards

1
Q

1:1 Strong Entity Relationships

A

Place the primary key of one entity in the other entity as a foreign key.

–> Either design will work—no parent, no child

–> Minimum cardinality considerations may be important.

  • > O-M will require a different design than M-O.
  • > One design will be very preferable.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

1:N Strong Entity Relationships

A

–> Place the primary key of the table on the one side of the relationship into the table on the many side of the relationship as the foreign key.

–> The one side is the parent table and the many side is the child table, so “place the key of the parent in the child.”

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

N:M Strong Entity Relationships

A

The solution is to create an intersection table that stores data about the corresponding rows from each entity.

The intersection table consists only of the primary keys of each table which form a composite primary key.

Each table’s primary key becomes a foreign key linking back to that table.

COMPANY_PART_INT (CompanyName, PartNumber)

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

Four Uses for ID-Dependents Entities

A
  1. Representing N:M relationships
  2. Representing association relationships
  3. Storing multivalued attributes
  4. Representing archetypes/instance relationships
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Intersection table vs Association table: what’s the difference by our textbook

A

–> An intersection table Holds the relationships between two strong entities in an N:M relationship; Contains ONLY the primary keys of the two entities:

  • As a composite primary key
  • As foreign keys

–> An association table Has all the characteristics of an intersection table PLUS it has one or more columns of attributes specific to the associations of the other two entities

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

N:M Recursive Relationships

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

Summary

A

–> Representing relationships using foreign keys.

–> The one side is the parent table and the many side is the child table  place the key of the parent in the child.

–> N:M relationships: adding an intersection table to create direct link.

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