Assignment: Fundamentals of Databases
Question One
Consider the following two tables:
Table - EmployeeInformations
EmpId
|
Name
|
ManagerId
|
DateOfJoining
|
121
|
Ali
|
321
|
01/31/2014
|
321
|
Raed
|
986
|
01/30/2015
|
421
|
Khaled
|
876
|
27/11/2016
|
Table - EmployeeSalary
EmpId
|
Project
|
Project
|
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?
2. Write a SQL query to findall employees from the " EmployeeInformations " table, sorted by the " ManagerId " column:
3. Write a SQL query to findthe average salary of all employees.
4. Write a SQL query to find all employee records from EmployeeInformations table who have a salary record in EmployeeSalary table.
Question Two
What do you mean by A view in SQL language? Give an example?
Question Three
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?
Format your assignment according to the following formatting requirements:
1. The answer should be typed, double spaced, using Times New Roman font (size 12), with one-inch margins on all sides.
2. The response also includes a cover page containing the title of the assignment, the student's name, the course title, and the date. The cover page is not included in the required page length.
3. Also include a reference page. The Citations and references should follow APA format. The reference page is not included in the required page length.