23F-A1 (1)

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 #1 Due: Sept. 27@11:59PM Instruction 1. Do the assignments independently. Copying is not allowed. 2. First replace Last in the Employee table with your own last name. If your last name is not shown correctly in the result, you will get 0 for the assignment. 3. Do this assignment directly on this document and rename it with your last + first name and submit to brightspace . Scanned handwritten documents won’t be accepted. Make sure your uploaded file can be opened. 4. You need to use either O penstack or install Oracle VM on your personal computing running intel chips. Macbooks with M1 chips cannot use Oracle VM. Detail about how to install and use Oracle VM can be found in the file Oracle-VM2023.docx. 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. The explanation should be complete; i.e, it does not contain any concept not explained here. Each concept is 2 marks. 1. Data 2. Domain 3. Attribute 4. Key 5. Primary Key 6. Key integrity constraints 7. Entity Integrity Constraint 8. Referential Integrity Constraint 9. Data Definition Language (DDL) 10. Query Language (QL) Part 2 (80 marks) Given the following employee and project databases with three relations. Use Oracle DBMS to create, populate and query this database. Test your statements on Oracle DBMS and take necessary screenshots to show your statements executed successfully. Copy and paste the corresponding SQL statements into this assignment. 1. Use SQL Data Definition Language to create the database. You should properly define primary keys and foreign keys with other 8 unique integrity constraints of different kinds. You can use check more than once. Boldface every integrity constraints. (10) 2. Use SQL Data Manipulation Language to populate the database with the data given in the tables. (10) 3. Use Relational Algebra (ALG) to express the following queries based on the above database. Submit your ALG expressions for each query as well as the query result. Each query is 4 marks and the result is 2 marks (60)
4. Use Relational Algebra (ALG) to express the following queries based on the above database. Submit your ALG expressions for each query as well as the query result. Each query is 4 marks and the result is 2 marks (60) 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. 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
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