menu
bartleby
search
close search
Hit Return to see all results
close solutoin list

Create a view named RESERVATION_CUSTOMER. It consists of the reservation ID, trip ID, trip date, customer number, customer last name, customer first name, and phone number. a. Write and execute the CREATE VIEW command to create the RESERVATION_CUSTOMER view. b. Write and execute the command to retrieve the reservation ID, trip ID, trip date, and customer last name for every reservation in the RESERVATION_CUSTOMER view with a trip date of September 11, 2016. c. Write and execute the query that the DBMS actually executes. d. Does updating the database through this view create any problems? If so, what are they? If not, why not?

BuyFindarrow_forward

A Guide to SQL

9th Edition
Philip J. Pratt
Publisher: Course Technology Ptr
ISBN: 9781111527273
Chapter 7, Problem 2CAT
Textbook Problem
720 views

Create a view named RESERVATION_CUSTOMER. It consists of the reservation ID, trip ID, trip date, customer number, customer last name, customer first name, and phone number.

  1. a. Write and execute the CREATE VIEW command to create the RESERVATION_CUSTOMER view.
  2. b. Write and execute the command to retrieve the reservation ID, trip ID, trip date, and customer last name for every reservation in the RESERVATION_CUSTOMER view with a trip date of September 11, 2016.
  3. c. Write and execute the query that the DBMS actually executes.
  4. d. Does updating the database through this view create any problems? If so, what are they? If not, why not?

Program Plan Intro

a)

 View:

The “VIEW” in the SQL (Structured Query Language) is a virtual table that does not exist physically. It is formed by a SQL statement that links one or more tables.

  • The view is considered as derived table because the data is comes from one or more base tables.
  • It is a logical representation of table; all the operations asked by user on a view are really done on the underlying base table.
  • View provides security to tables in database.

Explanation of Solution

 Query to create view named “RESERVATION_CUSTOMER”:

CREATE VIEW RESERVATION_CUSTOMER AS

SELECT RESERVATION_ID, TRIP_ID, TRIP_DATE, RESERVATION.CUSTOMER_NUM, LAST_NAME,

FIRST_NAME, PHONE

FROM RESERVATION, CUSTOMER

WHERE RESERVATION...

Explanation of Solution

 b)

 Retrieve reservation details using view:

SELECT RESERVATION_ID, TRIP_ID, TRIP_DATE, LAST_NAME

FROM RESERVATION_CUSTOMER

WHERE TRIP_DATE = '9/11/2016';...

Explanation of Solution

 c)

 Retrieve reservation details using DBMS:

SELECT RESERVATION_ID, TRIP_ID, TRIP_DATE, LAST_NAME

FROM RESERVATION, CUSTOMER

WHERE RESERVATION.CUSTOMER_NUM = CUSTOMER...

Explanation of Solution

 d)

 Updating the database through view:

 “Yes”, updating the database through this view create problems...

Still sussing out bartleby?

Check out a sample textbook solution.

See a sample solution

The Solution to Your Study Problems

Bartleby provides explanations to thousands of textbook problems written by our experts, many with advanced degrees!

Get Started

Chapter 7 Solutions

A Guide to SQL
Show all chapter solutions
add
Ch. 7 - Which command deletes an index?Ch. 7 - Does the DBMS or the user make the choice of which...Ch. 7 - Describe the information the DBMS maintains in the...Ch. 7 - The CUSTOMER table contains a foreign key,...Ch. 7 - Which command do you use to obtain information...Ch. 7 - How is the system catalog updated?Ch. 7 - What are integrity constraints?Ch. 7 - How do you specify a general integrity constraint?Ch. 7 - When would you usually specify primary key...Ch. 7 - How do you specify a foreign key in Oracle?Ch. 7 - Use the Internet to find information about...Ch. 7 - Use the Internet to find information about a data...Ch. 7 - Use SQL to make the following changes to the TAL...Ch. 7 - Create a view named ITEM_ORDER. It consists of the...Ch. 7 - Create a view named ORDER_TOTAL. It consists of...Ch. 7 - Write, but do not execute, the commands to grant...Ch. 7 - Write, but do not execute, the command to revoke...Ch. 7 - Perform the following tasks: a. Create an index...Ch. 7 - Delete the index named ITEM_INDEX3.Ch. 7 - Write the commands to obtain the following...Ch. 7 - Add the ORDER_NUM column as a foreign key in the...Ch. 7 - Ensure that the only legal values for the...Ch. 7 - Toys Galore currently has a credit limit of 7,500....Ch. 7 - Use SQL to make the following changes to the...Ch. 7 - Create a view named RESERVATION_CUSTOMER. It...Ch. 7 - Create a view named TRIP_INVENTORY. It consists of...Ch. 7 - Write, but do not execute, the commands to grant...Ch. 7 - Write, but do not execute, the command to revoke...Ch. 7 - Create the following indexes: a. Create an index...Ch. 7 - Delete the index named TRIP_INDEX3.Ch. 7 - Write the commands to obtain the following...Ch. 7 - Add the CUSTOMER_NUM column as a foreign key in...Ch. 7 - Ensure that the only legal values for the TYPE...Ch. 7 - The maximum group size for a trip must be greater...Ch. 7 - Use SQL to make the following changes to the...Ch. 7 - Create a view named CONDO_OWNERS. It consists of...Ch. 7 - Create a view named CONDO_FEES. It consists of two...Ch. 7 - Write, but do not execute, the commands to grant...Ch. 7 - Write, but do not execute, the command to revoke...Ch. 7 - Create the following indexes: a. Create an index...Ch. 7 - Delete the OWNER_INDEX 3 index from the OWNER...Ch. 7 - Write the commands to obtain the following...Ch. 7 - Add the OWNER_NUM column as a foreign key in the...Ch. 7 - Ensure that the only legal values for the BDRMS...Ch. 7 - In Question 9, you added owner number as a foreign...

Additional Engineering Textbook Solutions

Find more solutions based on key concepts
Show solutions add
Describe the purpose of a viscous clutch.

Automotive Technology: A Systems Approach (MindTap Course List)

What is the difference between the slopes of a nonlinear model and a linear model?

Engineering Fundamentals: An Introduction to Engineering (MindTap Course List)

Provide suggestions for reducing input volume.

Systems Analysis and Design (Shelly Cashman Series) (MindTap Course List)

Differentiate between active and passive RFID tags.

Enhanced Discovering Computers 2017 (Shelly Cashman Series) (MindTap Course List)

If your motherboard supports ECC DDR3 memory, can you substitute non-ECC DDR3 memory?

A+ Guide to Hardware (Standalone Book) (MindTap Course List)

How can a hose be checked for leaks?

Welding: Principles and Applications (MindTap Course List)