Docsity

data Exam 2 study notes, Exercises of Advanced Data Analysis

Toggle sidebar
bg1
Midterm exam notes
Many-to-Many Mapping
o Need to create a new relation (bridge table) to represent the relationship.
The new table will contain the primary keys from both entities as foreign
keys.
The combination of both foreign keys forms the composite primary key.
• EX: Student–Course relationship → Create table Enroll(StudentID,
CourseID).
• Avoids redundancy and maintains referential integrity.
Weak Entity Mapping
o Weak entity depends on a strong entity for identification.
The weak entity’s primary key is a combination of its partial key and the
foreign key from the strong entity.
Indicate this with a double rectangle in ER diagram.
• EX: Dependent depends on Employee → (EmployeeID + DependentName)
as composite key.

Partial preview of the text

Download data Exam 2 study notes and more Exercises Advanced Data Analysis in PDF only on Docsity!

Midterm exam notesMany-to-Many Mapping o Need to create a new relation (bridge table) to represent the relationship.  The new table will contain the primary keys from both entities as foreign keys.  The combination of both foreign keys forms the composite primary key.

  • EX: Student–Course relationship → Create table Enroll(StudentID, CourseID).
  • Avoids redundancy and maintains referential integrity.  Weak Entity Mapping o Weak entity depends on a strong entity for identification.  The weak entity’s primary key is a combination of its partial key and the foreign key from the strong entity.  Indicate this with a double rectangle in ER diagram.
  • EX: Dependent depends on Employee → (EmployeeID + DependentName) as composite key.