Colonial Adventure Tours Case p 145_146.docx - Chapter 4 Lesson 5 Database Management Colonial Adventure Tours Case p 145\/146 1 Create a view named

Colonial Adventure Tours Case p 145_146.docx - Chapter 4...

This preview shows page 1 - 2 out of 3 pages.

Lesson 5 Database Management Chapter 4 Colonial Adventure Tours Case - p 145/146 1. Create a view named NHTrips. It consists of the trip ID, trip name, start location, distance, maximum group size, type, and season for every trip located in New Hampshire (NH). Display the data in the view. CREATE VIEW NHTrips AS SELECT TripID, TripName, StartLocation, Distance, MaxGrpSize, Type, Season FROM Trip WHERE State = 'NH' SELECT * FROM NHtrips; 2. Create a view named Hiking. It consists of the trip ID, trip name, start location, state, distance, maximum group, size, and season for every hiking trip. Display the data in the view. CREATE VIEW Hiking AS SELECT TripID, TripName, StartLocation, State, Distance, MaxGrpSize FROM Trip WHERE Type=”Season” SELECT * FROM Hiking; 3. Create a view named ReservationCustomer. It consists of the reservation ID, trip ID, trip date, customer number, customer last name, customer first name, and phone number. Display the data in the view . CREATE VIEW ReservationCustomer as SELECT Reservation.ReservationID, TripID, TripDate, Customer.CustomerNum, LastName, FirstName, Phone FROM Reservation, Customer WHERE Reservation.CustomerNum = Customer.CustomerNum SELECT * FROM ReservationCustomer; 4. Create the following indexes. If it necessary to name the index in your DBMS, use the indicated name.
Image of page 1
Image of page 2

You've reached the end of your free preview.

Want to read all 3 pages?

  • Fall '16
  • skkska
  • Foreign key

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes