0% found this document useful (0 votes)
19 views

Database Fundamentals – Assignment 1

The document outlines the steps for mapping entity types in a database assignment, including regular, weak, binary 1:1, binary 1:N, and binary M:N relationships. It details the attributes and keys for entities such as Student, Program, Course, and Attempts. The final mapping consolidates all the relationships and attributes into a structured format.

Uploaded by

jexijeg969
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Database Fundamentals – Assignment 1

The document outlines the steps for mapping entity types in a database assignment, including regular, weak, binary 1:1, binary 1:N, and binary M:N relationships. It details the attributes and keys for entities such as Student, Program, Course, and Attempts. The final mapping consolidates all the relationships and attributes into a structured format.

Uploaded by

jexijeg969
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Name : Khalid Jaber Al-Salhi ID: 445013760 Database Assignment

Step 1: Mapping of Regular Entity Types :

• For each regular (strong) entity type in the ER schema, create a relation that includes all the simple
attributes (includes simple attributes of composite relations)
• Choose one of the key attributes as the primary key .
• If the chosen key is composite, the set of simple attributes that form it will together form the primary key .

Student

GivenNames Surname Student_ID Date_of_Birth YearEnrolled

Program
Name program_id CreditPoints YearCommenced
Name : Khalid Jaber Al-Salhi ID: 445013760 Database Assignment

Step 1: Result of Mapping Regular Entity Types :

Student
GivenNames Surname Student_ID Date_of_Birth YearEnrolled

Program
Name program_id CreditPoints YearCommenced
Name : Khalid Jaber Al-Salhi ID: 445013760 Database Assignment

Step 2: Mapping of Weak Entity Types :

• For each weak entity type, create a corresponding relation that includes all the simple
attributes.
• Add as a foreign key all of the primary key attribute(s) in the entity corresponding to the owner
entity type
• The primary key is the combination of all the primary key attributes from the owner and the
partial key of the weak entity, if any

Course

Program_id course_id Name CreditPoints YearCommenced


Name : Khalid Jaber Al-Salhi ID: 445013760 Database Assignment

Step 2: Result of Mapping Weak Entity Types :

Student
GivenNames Surname Student_ID Date_of_Birth YearEnrolled

Program
Name program_id CreditPoints YearCommenced

Course
program_id course_id Name CreditPoints YearCommenced
Name : Khalid Jaber Al-Salhi ID: 445013760 Database Assignment

Step 3 : Mapping of Binary 1:1 Relationship Types :

There is No Binary 1:1 Relationship Type.

Step 3 : Result After Step 3 :

Student

GivenNames Surname Student_ID Date_of_Birth YearEnrolled

Program
Name program_id CreditPoints YearCommenced

Course
program_id course_id Name CreditPoints YearCommenced
Name : Khalid Jaber Al-Salhi ID: 445013760 Database Assignment

Step 4 : Mapping of Binary 1:N Relationship Types :

• Choose the relation as the type at the N-side of the relationship.


• Add as a foreign key all of the primary key attribute(s) of 1-side of the relationship.
• Include any simple attributes of the 1:N relationship type

Enrollsin Relationship Type :

Student

GivenNames Surname Student_ID Date_of_Birth YearEnrolled program_id

FK

Program
Name program_id CreditPoints YearCommenced

Contains Relationship Type :

Program
Name program_id CreditPoints YearCommenced

Course
program_id course_id Name CreditPoints YearCommenced Year Semester
Name : Khalid Jaber Al-Salhi ID: 445013760 Database Assignment

Step 4 : Result of Mapping of Binary 1:N Relationship Types :

Student

GivenNames Surname Student_ID Date_of_Birth YearEnrolled program_id

Program
Name program_id CreditPoints YearCommenced

Course
program_id course_id Name CreditPoints YearCommenced Year Semester
Name : Khalid Jaber Al-Salhi ID: 445013760 Database Assignment

Step 5 : Mapping of Binary M:N Relationship Types :

• Create a new relation.


• Add as foreign keys the primary keys of both relations.
• Add any simple attributes of the M:N relationshi or simple components of composite attribute.

Attempts

Student_ID course_id Year Semester Mark Grade


Name : Khalid Jaber Al-Salhi ID: 445013760 Database Assignment

Step 5 : Result of Mapping of Binary M:N Relationship Types :

Student

GivenNames Surname Student_ID Date_of_Birth YearEnrolled program_id

Program
Name program_id CreditPoints YearCommenced

Course
program_id course_id Name CreditPoints YearCommenced Year Semester

Attempts

Student_ID course_id Year Semester Mark Grade


Name : Khalid Jaber Al-Salhi ID: 445013760 Database Assignment

Step 6 : Mapping of Multivalued Attributes :

There is No Multivalued Attributes.

Step 6 : Result After Step 6 :

Student

GivenNames Surname Student_ID Date_of_Birth YearEnrolled program_id

Program
Name program_id CreditPoints YearCommenced

Course
program_id course_id Name CreditPoints YearCommenced Year Semester

Attempts

Student_ID course_id Year Semester Mark Grade


Name : Khalid Jaber Al-Salhi ID: 445013760 Database Assignment

Final Mapping

Student

GivenNames Surname Student_ID Date_of_Birth YearEnrolled program_id

Program
Name program_id CreditPoints YearCommenced

Course
program_id course_id Name CreditPoints YearCommenced Year Semester

Attempts

Student_ID course_id Year Semester Mark Grade

You might also like