Database Programming Using Oracle 11g – CS405
Semester: Fall 2019
Lectures Covered : 01-07
Total Marks: 20
Due Date: 14/11/2019
Students will be able to learn:
• Entity Relationship Diagram
• Structured Query Language
• How to write SQL Statement
Please read the following instructions carefully before submitting assignment:
It should be clear that your assignment will not get any credit if:
The assignment is submitted after due date.
The assignment is submitted via email.
The assignment is copied from Internet or from any other student.
The submitted assignment does not open or file is corrupt.
It is in some format other than .doc/docx.
Note: All types of plagiarism are strictly prohibited.
For any query about the assignment, contact at
Question no 1
You are required to draw Entity Relationship Diagram of the following scenario to show how you would track this information. Show entity names, primary keys, attributes for each entity, relationships between the entities and cardinality.
“A shipping company named ABC shippers keeps up-to-date information upon the processing and current location of each shipped item. For record keeping, following product information is stored: product name, product ID and quantity. Products are made up of many components and each component can be supplied by one or more suppliers. The following component information is stored in databases for record keeping: component ID, name, description, suppliers, and products in which they are used.”
Keep the following assumptions in mind while drawing ERD
I. A supplier can exist without providing components.
II. A component does not have to be associated with a supplier.
III. A component does not have to be associated with a product. Not all components are used in products.
IV. A product cannot exist without components.
Question no 2
Consider the following table and its attributes:
Employee (emp_id, emp_name, designation, phone_no, address, joining_date, salary, department)
You are required to use this table to write SQL statements for the following cases:
a) Display the name and annual salary of all employees.
b) Display the name of all employees whose name is at least 4 characters long.
c) Display the name and department of the employees who earns the maximum salary.
d) Display data for all employees who earn between 10000 and 20000.
e) Count no. of employees working in each department.