Questions that require you to write MySQL views/stored programs/triggers will refer to this Car rental agency...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Questions that require you to write MySQL views/stored programs/triggers will refer to this Car rental agency schema. Please download and use this dump of the tables & data for the schema. (Download the .sql file, open it in the MySQL Workbench, and run the script) Please take a few minutes to understand this schema before proceeding to the actual questions. Customer id INT first_name VARCHAR(40) last_name VARCHAR (40) licence_number VARCHAR(20) street VARCHAR (100) city VARCHAR(50) state VARCHAR (50) zip_code VARCHAR(10) Indexes CarType id INT num ber_of_seats INT daily_rate DECIMAL (10,2) description TEXT Indexes HEI H I I T Car id INT Reservation reservation_id INT customer_id INT car_type_id INT pick_up_date DATE drop_off_date DATE car_id INT Indexes licence_plate_number VARCHAR(10) make VARCHAR (20) model VARCHAR(30) Indexes year_manufactured YEAR type_id INT status TINY INT (1) Consider the Car rental agency schema given to you for this test. You are supposed to already create the databased by downloading the .sql file, opening it in the MySQL Workbench, and running the script. Write a query to create a view named OngoingReservations that contains the reservation ID, IDs and names of the customer (first and last names concatenated) and reservation dates (pick- up and drop-off dates) for all ongoing reservations (even reservations ending on the current date should count). The format (not data) of your output should be similar to the sample shown below. Reservation ID Customer ID Customer name Reservation dates (from - to) Tyrion Lannister 12/07/2018 - 12/10/2018 1 1 Questions that require you to write MySQL views/stored programs/triggers will refer to this Car rental agency schema. Please download and use this dump of the tables & data for the schema. (Download the .sql file, open it in the MySQL Workbench, and run the script) Please take a few minutes to understand this schema before proceeding to the actual questions. Customer id INT first_name VARCHAR(40) last_name VARCHAR (40) licence_number VARCHAR(20) street VARCHAR (100) city VARCHAR(50) state VARCHAR (50) zip_code VARCHAR(10) Indexes CarType id INT num ber_of_seats INT daily_rate DECIMAL (10,2) description TEXT Indexes HEI H I I T Car id INT Reservation reservation_id INT customer_id INT car_type_id INT pick_up_date DATE drop_off_date DATE car_id INT Indexes licence_plate_number VARCHAR(10) make VARCHAR (20) model VARCHAR(30) Indexes year_manufactured YEAR type_id INT status TINY INT (1) Consider the Car rental agency schema given to you for this test. You are supposed to already create the databased by downloading the .sql file, opening it in the MySQL Workbench, and running the script. Write a query to create a view named OngoingReservations that contains the reservation ID, IDs and names of the customer (first and last names concatenated) and reservation dates (pick- up and drop-off dates) for all ongoing reservations (even reservations ending on the current date should count). The format (not data) of your output should be similar to the sample shown below. Reservation ID Customer ID Customer name Reservation dates (from - to) Tyrion Lannister 12/07/2018 - 12/10/2018 1 1
Expert Answer:
Related Book For
Auditing a risk based approach to conducting a quality audit
ISBN: 978-1133939153
9th edition
Authors: Karla Johnstone, Audrey Gramling, Larry Rittenberg
Posted Date:
Students also viewed these databases questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Design a Java class that represents a cache with a fixed size. It should support operations like add, retrieve, and remove, and it should evict the least recently used item when it reaches capacity.
-
A. What is Alpha One's NOPAT? Why does NOPAT differ from the earnings after taxes? B. Estimate the effective before-tax cost of the long-term debt. c. Estimate the effective after-tax cost of the...
-
Consider the following information: direct materials used totaled $124,700; direct labor amounted to $412,000; overhead was computed to be $789,600; Work in Process Inventory on March 1, 2014, was...
-
(a) Complete the structure of the pain-relieving drug ibuprofen on the basis of the fact that ibuprofen is a carboxylic acid that has the molecular formula C13H18O2, X is an isobutyl group, and Y is...
-
(a) Make a list of ways to increase the capacitance of a parallel-plate capacitor. (b) Does Increase quantity of charge stored or Decrease potential difference belong on the list?
-
What are the most important security issues facing companies today? Have these changed in the last five years, and will they continue to change? How should companies prepare themselves for security...
-
What piece of hardware connects a peripheral device like a keyboard or mouse to the system bus? 1 point a device driver a device controller a semaphore a network port
-
Intake of high purine content food is associated with the appearance of - crystals in urine. a. Calcium oxalate b. Ammonium biurate c. Uric acid d. Triple phosphate
-
What is the function of the Office of Science and Technology Policy?
-
Which of the following are interview techniques? a. Kinesic interviewing, polygraph, and statement analysis. b. Polygraph, sworn statement, deposition. c. Deposition, affidavit, sworn statement. d....
-
Critically assess the concept of internal marketing in the context of the services sector. Do you think that marketers have made a useful contribution to the issue of how to engage employees in order...
-
How are market- and firm-specific factors affecting routes to market?
-
While she was under investigation by a grand jury, Martha Stewart penned an e-mail that explained the circumstances that led to the I m Clone scandal. Stewart then dispatched the e-mail to her...
-
Dear Students please calculate the mouse and rat Vobs, Vcorr, and BMR if you know that: B.p=775 Temperature= 18C weight of mouse= 40g weight of rat= 200g Measurement Number Time Required in Seconds...
-
What are the principal differences among asset liquidity management, liability management, and balanced liquidity management?
-
Define the following terms: (a) Simple random sampling, (b) Systematic sampling, (c) Systematic random sampling, (d) Haphazard sampling, (e) Block sampling.
-
MULTIPLE-CHOICE QUESTIONS 1. What is the primary difference between fraud and errors in financial statement reporting? a. The materiality of the misstatement. b. The intent to deceive. c. The level...
-
An auditor has to determine both the reliability and the relevance of potential audit evidence in order to determine that appropriate audit evidence is gathered. a. Explain the difference between...
-
Identify something you own, perhaps even something you still use regularly. a. Give a list of at least six reasons why you might consider replacing the identified item. b. Identify at least two...
-
A company owns a 6-year-old gear hobber that has a book value of \($60,000.\) The present market value of the hobber is \($80,000.Anew\) gear hobber can be purchased for \($450,000.\) Using an...
-
Ten reasons why companies use equipment long after replacements would be justified economically. In many cases, these reasons do not apply just to companies; rather, they apply to us as individuals....
Study smarter with the SolutionInn App