Answered step by step
Verified Expert Solution
Link Copied!

Question

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 image text in transcribed
image text in transcribed
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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases On The Web Designing And Programming For Network Access

Authors: Patricia Ju

1st Edition

1558515100, 978-1558515109

More Books

Students also viewed these Databases questions

Question

8 .

Answered: 1 week ago