Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

phpMyAdmin + SQL. . Part 1:Joins again! 1.Write the SQL Statement to display the guestNo, dateArrive , dateDepart, propertyNo, city, and state for all Bookings.

phpMyAdmin + SQL.

.

Part 1:Joins again!

1.Write the SQL Statement to display the guestNo, dateArrive , dateDepart, propertyNo, city, and state for all Bookings.

2.Paste the results.

3.Write the SQL statement to display the guestNo, firstName, lastName, propertyNo, price,city, and state for all Bookings.

4.Paste the results.

.

Part 2:Views

You notice that you are constantly doing the above 2 joins. You decide to create views to easily have the above available, specifically:

1.Create a view called to BookingDetails which will display the guestNo, dateArrive, dateDepart, propertyNo, city, and state for all Bookings.

2.Paste the results of a Select * from BookingDetails.

3.Create a view called BookingComplete which will display the guestNo, firstName, lastName, propertyNo, price, city, and state for all Bookings.

4.Paste the results of a select * from BookingComplete.

5.Create a view called ExpensiveBooking which will display all the details only in the Booking table for those whose rent is greater than 500.

6.Paste the results select * from ExpensiveBooking.

7.Write the update statement to modify any one of the entries in Booking from a price of 500 to a price of 2000.

8.Paste the results select * from ExpensiveBooking. See what happened!

9.Create a view which will display the guestNo, dateArrive, dateDepart, propertyNo, city, and state for each Booking where the rent is greater than 500. You can name it whatever you want.

10.Paste the results of the view.

11.Create your own view that you feel would be helpful.

12.Paste the results.

13.Explain why you feel this view would be convenient!

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

Step: 3

blur-text-image

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

Database Development For Dummies

Authors: Allen G. Taylor

1st Edition

978-0764507526

More Books

Students also viewed these Databases questions

Question

In an Excel Pivot Table, how is a Fact/Measure Column repeated?

Answered: 1 week ago