23F-A3 (2)

docx

School

Carleton University *

*We aren’t endorsed by this school

Course

3005

Subject

Computer Science

Date

Dec 6, 2023

Type

docx

Pages

2

Uploaded by CountMeerkat3468

Report
COMP 3005 Assignment #3 Due: Oct. 19 @11:59PM Instruction 1. Do the assignments independently. Copying is not allowed. 2. The database for this assignment is the same as in Assignment #1. Do the assignment directly on this document and rename it with your last name + first name and submit to brightspace . Make sure your uploaded file can be opened. 3. You can use any version of Oracle VM or download and install latest version of Oracle from its official website. Part 1 Concepts (20 marks) Explain the following concepts based on the definitions given in the lecture notes. Different answers found online will be marked wrong. 1. Type compatibility (2) 2. Relationally complete (2) 3. Basic relational operators (2) 4. Free variable (2) 5. Bound variable (2) 6. Grouping (2) 7. Aggregate functions (2) 8. Use basic relational operators to represent R1(S#, C#) divideby R2 (S#) (6) Part 2 (80 marks) Given the employees and projects databases the same as in Assignment #1. Employees E# Name Age Manager E1 Adam s 50 E2 Blake 40 E1 E3 Clark 35 E1 E4 David 30 E3 E5 Emily 25 E4 E6 Last 20 E5 Workon E# P# Hours E1 P1 700 E2 P1 300 E2 P2 200 E3 P1 100 E3 P2 200 E3 P3 300 E4 P1 100 E4 P2 200 E4 P3 300 E6 P1 200 E6 P2 300 E6 P3 400 E6 P4 500 Projects P# Name Location P1 CPU B1 P2 GPU B2 P3 GPU B2 P4 SSD B3
Use Query By Example (QBE) to express queries 1,2,3,4,5,6 and use SQL to express all 10 queries. (80) Each QBE query is 5 marks. Each SQL query is 4 marks and the result is 1 mark . Screenshot of both SQL query and running results are needed in order to get the 5 marks. 1) Get the age of Last . 2) Get the name of Last’s manager 3) Get the name of the employee who works on GPU project. 4) Get the name of the employee who does not work on any project. 5) Get the pair of employee name and project name such that the employee works on the project less than 300 hours. 6) Get the name of the employee who works on every project 7) Get the name of the employee who works on every project except SSD. 8) Get the name of the employee who works on every project that Clark works on. 9) Get the name of the employee who works on the same projects that Clark works on. 10) Get the name of the employee who works on more than two projects.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help