Answered step by step
Verified Expert Solution
Question
00
1 Approved Answer
Please help for the database Write SQL (Total 50 marks. There are ten (10) questions with five (5) marks for each correct answer.) 2. Consider
Please help for the database Write SQL (Total 50 marks. There are ten (10) questions with five (5) marks for each correct answer.) 2. Consider the following seven relations for the DreamHome example: Branch (branchNo street, city, postcode) Staff (staffNo, fName, IName, position, sex, DOB, salary, branchNo) PropertyForRent (propertyNo, street, city, postcode, type, rooms, rent, ownerNo, staffNo, branchNo) Client (clientNo, fName, IName, telNo, prefType, maxRent) PrivateOwner (ownerNo, fName, IName, address, telNo) Viewing (elientNo, propertyNo, viewDate, comment) Registration (clientNo, branchNo, staffNo, dateJoined) Write SQL queries to perform the following commands: (1) List full details of all branches (2) List all staff with a salary between 10000 and 25000. (3) List the details of all viewings where a comment has not been supplied. (4) Find all owners with the string 'London' in their addresses. (5) Find the total number of all branches. (6) Find the number of staff working in each branch. (7) Give all staff a 5% pay increase. (8) Create a view of the properties details viewed by client CR56. (9) Give the user Director the privilege UPDATE on column salary of the Staff table. (10) Give all users the privilege SELECT on staff who work at branch office B005
Please help for the database
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered 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