0% found this document useful (0 votes)
71 views5 pages

Ics321 HW2 202043000

The document contains details for a database systems homework assignment including: 1) SQL queries about employees, projects, and their relationships. 2) A schema for manufacturers, products, warehouses, and product storage with SQL queries. 3) Requirements for a database to manage campus events including event types, venues, and departments. The student could not create an EER diagram due to computer issues but provided the information in text form instead.
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)
71 views5 pages

Ics321 HW2 202043000

The document contains details for a database systems homework assignment including: 1) SQL queries about employees, projects, and their relationships. 2) A schema for manufacturers, products, warehouses, and product storage with SQL queries. 3) Requirements for a database to manage campus events including event types, venues, and departments. The student could not create an EER diagram due to computer issues but provided the information in text form instead.
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/ 5

Name: Abdulaziz Hatem Alghamdi, ID:202043000

ICS 321: Database Systems (223) Homework # 2 Due: Oct 31, 2023

1. [10 points] Consider the following relations and write the appropriate SQL statements to answer the
queries given below.

i) List the Fast name, last name, and SSN of all employees who works on a project called ‘ProductY’
or ‘ProductZ’ and have dependents

ii) List the names of all projects which have exactly three employees and have no dependents.

iii) What is the degree and cardinality of the relation produced by the cartesian product of
Name: Abdulaziz Hatem Alghamdi, ID:202043000
WORKS_ON and PROJECT.

iv) List the names of employees who work less than 5 hours per week on the ‘Computerization’ project.

v) List the names of employees who work on more than two projects.
Name: Abdulaziz Hatem Alghamdi, ID:202043000
2. [8 points] Given the following schema:
Manufacturer {Name, Street, City, State, Zip, Phone}
Product {PID, Name, Buying_Price, Selling_Price, Size, Manufacturer_Name}
Foreign Key {Manufacturer_Name} references Manufacturer,
Warehouse {Name, Location, City, State, Zip, Space}
Stores {Warehouse_Name, PID, Qty}
Foreign Key {Warehouse_Name} references Warehouse,
Foreign Key {PID} references Product;

Write SQL Queries for the following:

i. Get the name and phone number of the manufacturers in Dammam.

ii. Get the PID and name of the products that are manufactured in Dammam.

iii. Get the PID and name of the products that are stored in warehouses in Jeddah.

iv. Get all pairs of warehouses and manufactures that are located in the same city. List the
warehouse-name and manufacturer-name of each pair of warehouse and manufacturer that are
located in the same city.

3. [22 points] A system is to be created to manage the calendar of campus events.

• Each event has a descriptive name and has a single start date and time (when the event
begins) and ending date and time.
• Each event can be classified as sports, social, religious or academic. Depending on the
classification, specific event information is stored.
• Each event takes place at a specific venue on campus. A venue is a sports area (such as an
athletic field), a lecture hall, a conference hall, or a public space. The venue information
differs depending on the type of venue.
Name: Abdulaziz Hatem Alghamdi, ID:202043000
• Each event is sponsored by an academic department. Each academic department has a person
responsible for the event.

a. Design an EER diagram for the following database. Your diagram should have all the needed
details. You may make any reasonable assumptions but you must state them clearly.

I tried with my computer but every time I tried to make ER diagram it was crashed. I hope it
is understandable.

b. Convert the EER model to a set of relations using EER to Relational mapping rules.
Name: Abdulaziz Hatem Alghamdi, ID:202043000

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy