Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Using a query, create a database named GTUC_HR_DBASE -save query as database_query 2. Use a query to create a staff table. Details are as

1. Using a query, create a database named GTUC_HR_DBASE -save query as database_query

2. Use a query to create a staff table. Details are as follows

Staff {StaffNo varchar[5] - PRIMARY KEY, Surname varchar[30], Firstname varchar[30], DOB date, Net_Salary money, Department_name varchar[30]}

Save query as staff_table

2. Use a query to create a Projects table. Details are as follows

Projects {Project_ID varchar

[3] PRIMARY KEY, Project_title, start_Date date, Project_Cost money} Save query as Projects_table

4.

Assumption: A staff member can be assigned to only one project and a project may have one or more staff members assigned to it.

Use the assumption to create foreign keys between the tables and create relationships between the tables; generate a database diagram saved as diagram.

Take a snapshot of the diagram and paste in the practicals snapshot word file.

5. Enter four records each into the two tables using your own data. Take snapshots of the two tables with data and paste in the practicals snapshots word file.

6. Create a query to retrieve the number of staff in the organisation. Save query as staff _number_query

7. Create a query to display the total sum of net_salaries of employees. Save query as sum_quey

8. Create a query to display the project with the highest project cost. Query details: Project_title, project_cost. Save query as cost_query

9. Create a query to displaying the ff details of staff members {Staff_ID, Staff full name, net salary}. The query result should be in ascending order of net salaries. Save query as staff salaries_query

10. Create a query to display the total number of staff in each department. Query details: [department], [No of Staff]. Save query as department number_query

11. Create a query to display the list of staff whose firstnames begin with A or whose surnames end with son. Query details: [staff_no, Surname]

Save query as A staff_query

13. Create a query to display the list of staff whose net salary is between 10,000 and 20,000 Save query as salary range_query

14. Create a query to retrieve staff and project information. Query details: [staff_ID], [project_title], [start_date]

Save query as staff project_query

15. Create a query to display the staff member with the highest salary. Query details: [StaffID], [Surname], [Net-salary]

Save query as highest salary_query

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

Understanding Oracle APEX 5 Application Development

Authors: Edward Sciore

2nd Edition

1484209893, 9781484209899