Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Use SQL to make the following changes to Colonial Adventure Tours database (figures 1-4 though 1-8 pictures below) after each change, execute an appropriate query
Use SQL to make the following changes to Colonial Adventure Tours database (figures 1-4 though 1-8 pictures below) after each change, execute an appropriate query to show that the change was made correctly. If directed to do so by your instructor use the information provided with chapter 3 exercise to print your output or save it to a document, for any exercises that use commands not supported by your version of SQL, write the command to accomplish the task.
Chapter 7 state havin Write and execute the command to retrieve the state and units for each b. more than 10 trips. c. Write and execute the query d. Does updating the database through this view create any problems? It sc that the DBMS actually executes. so, what are they? If not, why not? a. User Rodriquez must be able to retrieve data from the TRIP table. b. Users Gomez and Liston must be able to add new reservations and cus c. Users Andrews and Zimmer must be able to change the price of d. All users must be able to retrieve the trip name, start location, distance e. User Golden must be able to add and delete guides. 4. Write, but do not execute, the commands to grant the following privileges: database any trip. User Andrews must be able to create an index for the TRIP table. table. User Golden must have all privileges on the TRIP, GUIDE, and TRIP f. 9 Users Andrews and Golden must be able to change the structure of the CUSTOMES h. tables 5. Write, but do not execute, the command to revoke all privileges from user Andrews 6. Create the following indexes: a. Create an index named TRIP_INDEX1 on the TRIP NAME column in the TRIP table. b. Create an index named TRIP_INDEX2 on the TYPE column in the TRIP table c. Create an index named TRIP INDEX3 on the LAST_NAME and FIRST_NAME columns in the CUSTOMER table. 7. Delete the index named TRIP INDEX3 8. Write the commands to obtain the following information from the system catalog. Do not execute these commands unless your instructor asks you to do so. a. List every column in the GUIDE table and its associated data type. b. List every table that contains a column named TRIP ID. c. List the table name, column name, and data type for the columns named TRIP ID, TRIP_NAME, and TYPE. Order the results by table name within column name. (That is, column name is the major sort key and table name is the minor sort key.) 9. Add the CUSTOMER NUM column as a foreign key in the RESERVATION table. 10. Ensure that the only legal values for the TYPE column in the TRIP table are Biking Hiking, or Paddling he maximum group size for a trip must be greater than one. Use the Intemet to the CHECK clause, determine how to add this constraint to the TRIP table, and then the SQL command to make this change to the TRIP table. Be sure to cite your reterences write Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started