Question
QUESTION 5 Consider the following relational schema for a company: country(countryID, countryName, RegionID) employee(employeeID, firstName, lastName, email, phoneNo, hireDate, salary, jobID, managerID, departmentID) job(jobID, jobTitle,
QUESTION 5 Consider the following relational schema for a company: country(countryID, countryName, RegionID) employee(employeeID, firstName, lastName, email, phoneNo, hireDate, salary, jobID, managerID, departmentID) job(jobID, jobTitle, minSalary, maxSalary) locations(locationID, address, countryID) department(depatmentID, departmentName, managerID, locationID) region(regionID, regionName) The primary keys are underlined. The foreign keys are highlighted in italics. Each region has many countries, while each country has many (company) locations. Each location has many departments and each department has many employees working in it. Many employees can work under each job title. Write SQL queries to answer the following:
(a) Write a query to display the full name and hire date for all employees who were hired in the year 2012.
(b) Write a query to get the number of employees with the same job.
(c) Write a query to get the average salary for all departments employing more than 20 employees
(d) Retrieve the name and address of all employees who work for the Research department
(e) Retrieve all employees in the Human Resources Department whose salary is between 25,000 and 30,000
PART TWO (a) Compare the main traits of relational database management systems with those of object orientated database management systems.
(b) Describe what a distributed database system is. Include in your answer the possible reasons why such a database would be of use. A distributed database can be defined as a single logical database that is spread physically across computers in multiple locations that are connected by a data communications link. They should not be confused with decentralized databases which are collections of independent databases on non-networked computers
(c) List and briefly explain three advantages and three disadvantages of the Distributed Database Systems.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started