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

Lab 5- ER to SQL Mapping

The document outlines the guidelines and requirements for Graded Assignment 5 in the EECE 433 Database Management Systems course, focusing on ER to SQL Mapping. Students are instructed to complete the assignment using ERDPlus and PostgreSQL, ensuring originality and adherence to academic integrity policies. Deliverables include a single Word file containing ER diagrams, relational schemas, and SQL queries, with specific instructions on formatting and submission.

Uploaded by

sobohalaa90
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)
16 views

Lab 5- ER to SQL Mapping

The document outlines the guidelines and requirements for Graded Assignment 5 in the EECE 433 Database Management Systems course, focusing on ER to SQL Mapping. Students are instructed to complete the assignment using ERDPlus and PostgreSQL, ensuring originality and adherence to academic integrity policies. Deliverables include a single Word file containing ER diagrams, relational schemas, and SQL queries, with specific instructions on formatting and submission.

Uploaded by

sobohalaa90
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/ 2

Department of Electrical and Computer Engineering

EECE 433 Database Management Systems


Spring 2025

Class Instructor: Dr. Imad Moukadem, Lab Instructor: M. Zaher Kanafani


Graduate Assistant: Miss Maria Slim

Graded Assignment 5 – ER to SQL Mapping

Part of this programming assignment will be presented to the lab instructor during the lab.
It has to be submitted to Moodle by next week.

General Rules:
• Cheating and Copying: Any form of cheating or copying from other students' work will result in a zero
grade for all involved students, regardless of who copied from whom. Each assignment must be entirely
unique.
• The instructor will explain to all students what is required, and give some useful hints.
• You will have assignments to be presented and graded during the lab. In case the student did not finish,
he/she will be graded on the finished part.
• Sometimes the lab will span two weeks, a first part will be presented in the first lab session.
• You can ask questions during the lab, regarding what to do, not how to do.
• You can make use of your notes, and any information online including chatGPT and Google.
• You can use your laptops, or the available desktops.
• Please refer to the Student Code of Conduct, all relevant university policies, and the course syllabus for
further penalties related to academic offenses.
• Students that have accommodation letters should contact us as soon as possible.
• Lab attendance is mandatory, any absentee will have a zero for any missing lab.
• In case you have a valid excuse to miss a lab, please present it before the lab for the instructor approval.

Deliverables:
• You are requested to submit a single Word file with the solution for this assignment.
• For parts A and B, use ERDPlus.com to chart the diagrams.
• For the other parts, copy and paste the solutions of your queries from PostgreSQL DBMS. Don’t write the
queries without testing them.
• Add these parts into a single word file, and submit it.
o Use the snipping tool for parts A and B.
o Copy/ Paste the queries from PostgreSQL query tool for parts C and D.

Be sure to have installed PostgreSQL, check https://www.postgresql.org/download/

Page 1 of 2
Assignment:

Given the above ER Diagram:


A. Draw the above ER Diagram using ERDPlus, you can use either the Min-Max notation, or Crow foot
notation.

B. Using also ERDPlus, give the relational schema by applying the mapping rules.
a. Indicate the name of each generated table and its attributes.
b. Underline the PKs.
c. Dot underline the FKs or indicate it within parentheses, use arrows to point to the
corresponding PK.

C. Implement the database tables in PostgreSQL DBMS. Write the necessary database SQL DDL queries,
(create table) needed to create the relations.
a. Add the necessary Key constraints: foreign keys and primary keys.
b. Use varchar(10) for all the IDs.
c. Dob is a date, insuredPrice is an integer, all others are strings. Use varchar type for them.
d. Only Description in Courses can be null. All other fields are not null.
e. Information is a multivalued attribute containing all possible personal information of a student.
Be sure to write your own SQL statements and not use any automatic generating tool.
Use the general user you created previously, not postgres.

D. Write the SQL queries for the following:


a. Insert in all tables with at least 2 rows for each. Use meaningful data.
b. Increase the insured price by 20% for all relatives except sons and daughters.
c. Delete the teacher having ID=’TA002’ and his/her dependents.
d. List all course names for student having ID=’ST004’.
e. Find teacher names having dependents.
f. Find teacher names not having any dependent.

Page 2 of 2

You might also like