Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question: 4 (25 marks) (a) Consider a 'Project database with three tables as given below 1.Job - captures job details job_code job_desc 501 | Programmer

image text in transcribed
image text in transcribed
Question: 4 (25 marks) (a) Consider a 'Project database with three tables as given below 1.Job - captures job details job_code job_desc 501 | Programmer 502 | System Analyst 583 i Database Designer | job_chg_hr 35.75 96.75 125.00 2. Employee - captures employee details emp_num i emp_name i emp_hiredate i job_code 101 ! John | 2000-11-08 502 102 i David | 1989-07-12 501 103 i June | 1996-01-09 503 104 Anne i 1993-02-10 501 105 | Smith i 1987-01-05 501 3. Project - captures project details proj_num proj_name 15 ! Evergreen 18 Amber Wave 2 Rolling Tide 5 | Starlight i proj_value l emp_num 10000.000 103 20000.500 105 240000.650 102 i 210000.150 101 Based on the tables given above, answer the following questions i) Write SQL syntax to 1) Create table 'Employee' with all necessary constraints. 2) Also write an SQL syntax to set the initial value of the column (emp_num) to 101 (emp_num is auto_increment) 1) Write an SQL syntax to 1) Modify the table employee' and add an attribute 'emp_gender char(1) 2) Also write an SQL syntax to rename the attribute 'emp_gender' to 'gender' for the employee' table. 3) Finally, write an SQL syntax to remove the attribute 'gender' from 'employee' table ii) Write an SQL statement which shows project name, employee name and job description of all the employee as below PROJECTNAME | EMPLOYEENAME | JOBDESCRIPTION Evergreen June Database Designer Amber Wave Smith Programmer Rolling Tide David I Programmer Starlight i John System Analyst iv) Write an SQL statement which shows the employee name not assigned to any project V) Write an SQL statement that shows the employee names with their job description as given below job desc | EMPLOYEE Programmer Smith, David, Anne System Analyst John Database Designer | June vi) Write an SQL statement to 1) remove the table 'Employee'. 2) remove the database 'project'. 3) change the name of the table 'Job' to 'Job_Details'. vii) Write an SQL statement to 1) find the total project value of all the projects 2) find the total number of employees earning 35.75 per hour (21 Marks)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Derive expressions for the rates of forward and reverse reactions?

Answered: 1 week ago

Question

Write an expression for half-life and explain it with a diagram.

Answered: 1 week ago

Question

What do you mean by underwriting of shares ?

Answered: 1 week ago

Question

Define "Rights Issue".

Answered: 1 week ago

Question

What are Decision Trees?

Answered: 1 week ago

Question

What is meant by the Term Glass Ceiling?

Answered: 1 week ago