IT403-3 Questions

Pg. 5

Question ThreeQuestion Three

Question One

Learning Outcome(s):

LO 3 explain the concepts and processes involved in database development.

Consider the following two tables:

Table – EmployeeInformations Table – EmployeeSalary

EmpId

Name

ManagerId

DateOfJoining

121

Ali

321

01/31/2014

321

Raed

986

01/30/2015

421

Khaled

876

27/11/2016

EmpId

Project

Salary

121

P1

8000

321

P2

1000

421

P1

12000




  1. Write a SQL query to find the names of all employees having salary greater than or equal to 5000 and less than or equal 10000?









  1. Write a SQL query to find all employees from the " EmployeeInformations " table, sorted by the " ManagerId " column:






  1. Write a SQL query to find the average salary of all employees






  1. Write a SQL query to find all employee records from EmployeeInformations table who have a salary record in EmployeeSalary table.









Question Two

Learning Outcome(s):

LO 3 explain the concepts and processes involved in database development.

What do you mean by A view in SQL language? Give an example?



Question Three

Learning Outcome(s):

LO 6 create a database application to store and retrieve data.

Explain the role of SQL authorization mechanisms that allow to differentiate among the users of the database as far as the type of access they are permitted on various data values in the database?