<PBA Web - Databases - Exercise
ZiBaT => Peter Levinsky => PBA-Database => exercise
Views
And Users
Updated : 2018-03-16

Background


SERVER, p. 176-187 + 189-194

Previous exercises (basis for this exercise) PetersPanSQLexercise1.htm

Views

Assignment 1 Simple View (CustomerTableView1)

Make a simple view of the restaurant tables but without the waiter (for customers - they do not need to know the waiter).

Can you get the information from this view ?

Can you insert a new restaurant table in this view ?

Assignment 2 Another View (CustomerTableView2)

Make another simple view of the restaurant tables at 'windowSite' with all values

.Can you get the information from this view ?

Can you insert a new restaurant table in this view ?

 

Assignment 3 Another View (CustomerTableView3)

Make another simple view of the restaurant tables but only tables at 'windowSite' and only the values of the number of seats.

Can you get the information from this view ?

Can you insert a new restaurant table in this view ?

Assignment 4 A view of booked tables

Make a view, which join the tables 'Restaurant Table', 'Reservation' and 'Booking' and present all the values in the three tables.

Can you get the information from this view ?

Can you insert a new restaurant table in this view ? or a new Booking ?

Can you get all booked tables for a particular day from the view ?

Assignment 5 A view of booked tables2

Make a view, which takes the values from the view (BookedTables1) and present only the values 'Seats, WindowSite and DayAndTime'.

Can you get the information from this view ?

Can you insert a new restaurant table in this view ?

Can you get all booked tables for a particular day from the view ?

 

 

Users

Assignment 6 Create a New User 'Customer'

To let Customers get access to the database, create a user 'customer' without any password.

Try to connect with your new user - hat can you (the user) see af tables etc?

Assignment 7 Create a New User 'CustomerWithProfile'

The restaurant have some customers who come back, so to give these customers better service, create another type of user CustomerWithProfile, where a password is assigned.

Try to connect with your new user - hat can you (the user) see af tables etc?

Assignment 8 Assign Accessability to the User

For the User 'Customer' assign access, so they only can see informationes (ie. select from the tables and views).