Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Consider the following relational database for a company. There are four tables

ID: 3577760 • Letter: C

Question

Consider the following relational database for a company. There are four tables (shown be- low). The tables represent the following entities: Employee a record for each current and former employee with: name, address & public ID (called UID). Security a record containing each employee's public ID and secure ID. Payroll secure ID, salary, position, and department for each current employee. Vehicle a record for each vehicle registered with the parking office. An employee may register more than one vehicle with the office or may not have any vehicles registered. Employee Payroll Name UID Address SID Salary Position Dept. John 101 100 Elm St. 1 30000 AA2 Stat Saran 102 200 Maple Ave 2 37000 MS1 Math Susan 201 100 Chestnut St. 3 40000 AA1 Stat Dave 202 102 Fir Dr Security Vehicle UID SID UID Make Model License 101 101 Toyota Matrix 2RPM888 102 2 101 Honda Accord 2RPM777 201 201 Ford Fiesta 2RPM666 202 201 Ford Explorer 2RPM555 201 Subaru Forester 2RBY4 47 (a) write a SELECT statement to retrieve the secure ID and department of all employees earning less than $35,000. b) statement to retrieve the public ID and number of vehicles registered write a SELECT with any employee who has a vehicle registered with the parking office.

Explanation / Answer

Write a SELECT statement to retrieve the secure ID and department of all employees earning
less than $35000.
SELECT SID as "Secure ID", dept as "Department" FROM Payroll WHERE Salary < 35000;

Write a SELECT statement to retrieve the public ID and number of vehicles registered with
any employee who has a vehicle registered with the parking office.
SELECT UID, count(*) FROM Vehicle GROUP BY UID;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote