Scenario and Database Model: InstantRide InstantRide is the new ride sharing application in the city and...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Scenario and Database Model: InstantRide InstantRide is the new ride sharing application in the city and it has just started its operations. With the help of the InstantRide mobile application, the users request a ride with their location. Drivers and cars are assigned to the request; and then the driver picks up the user to ride their requested location. Information for the users, drivers and cars are stored in the database as well as the travel transactions. In the USERS table, information for the users are stored with their first name, last name and email: USER ID 3001 3002 3003 3004 3005 3006 3007 3008 USER FIRST NAME Jack Ryan Nursin Sarah Bobby Randy Jose Nursin USERS Table USER LAST NAME Cons VIMA Frie Grmn Clark Troms USER EMAIL @mal.com calgama.com nata@gmail.com spricemal.com bprmn@mail.com cork@mal.com thomas@mail.com nyman@mail.com In the DRIVERS table, all the drivers in the InstantRide are stored with their name, driving license number and check and rating information: DRIVER ID 2001 2002 2003 2004 CAR ID 1001 1002 DRIVER FIRST NAME DRIVERS Table 1003 Willie 1004 Justin Anthony Ece DRIVER_LAST_NAME DRIVER DRIVING LICENSE_ID CARS Table Butler Howard Walker Yilmaz CAR PLATE BB-542-AB BB-883-EE B8-451-ZN 1874501 BB-189-MM 1953853 1735487 1734747 CAR MODEL In the CARS table, all the cars in the Instant Ride system are kept with the license plate, model and year: TOYOTA PRIUS TESLA MODEL 3 TOYOTA AURIS DRIVER START DATE MERCEDES E200 2022-09-12 2022-09-09 2022-09-15 2022-08-15 DRIVER DRIVING LICENSE CHECKED 1 1 1 1 CAR_YEAR 2020 2021 2021 DRIVER RATING 2021 44 4.8 3.5 0.0 Finally, the transactions of the rides are stored in the TRAVELS table. For each travel, start and end time with location are stored. In addition, the involved driver, car and user are listed for each drive. Price and discount information are also available in the database: information are also available in the database: TRAVEL ID 5001 5002 5003 5004 5005 5006 5007 5006 5009 5010 TRAVEL START TIME 2022-10-01 01:04:55 2022-10-01 06:57:33 2022-10-01 13:35:20 2022-10-02 08:44:48 2022-10-02 16:38:54 2022-10-03 19:12:14 2022-10-03 16:06:36 2022-10-03 17:17:12 2022-10-03 21:1608 2022-10-03 23:21:40 TRAVEL_END_TIME 2022-10-01 04:14:19 TRAVELS Table 2022-10-01 06:12:33 2022-10-01 13:45:10 2022-10-02 09:15:28 2022-10-02 1648:10 2022-10-03 19:23:45 2022-10-03 16:08:56 2022-10-03 17:37:42 2022-10-03 21:26:18 2022-10-03 23:39:10 TRAVEL START LOCATION 9614 York Road 47 Church Street 2 Windsor Road 9060 Mill Lane 2 Queensway 50 Main Road 39 Park Road 37 The Drive 77 Mill Road 16 Church Road TRAVEL END LOCATION 84 Church Lane 60 High Street 95 West Street 27 Main Road 24 Mill Lane 93 Broadway 91 West Street 17 Stanley Road 724 Springfield Road 30 North Road TRAVEL PRICE 1544 20.56 12:32 3049 11.15 1461 4.41 25.12 13.55 25.62 DRIVER ID 2001 2001 2002 2003 2001 2003 2002 2001 2001 2000 CAR ID USER ID TRAVEL_DISCOUNT 1003 1003 1001 1002 1003 1002 1004 1003 1003 1002 3005 3006 3002 3001 3007 3007 3003 3001 3005 3000 NULL NULL NULL 013 NULL 0.10 014 0.25 NULL 0.20 You are assigned as the database administrator to collect and manage transactional data of the Instant Ride operations. Your main task is to create SQL scripts to help other teams to retrieve the requested data. In the following activities, you will create the scripts, run against the database and send the result to the corresponding teams. Grading After you have completed a problem and clicked the Run Query button, mark the task as complete. Checks will run to verify your work. Task 5: The Developers team also wants you to ensure that emails are converted to lowercase after an update operation. Currently, new insertions are guaranteed to have lowercase emails, but there is no such guarantee for legacy emails. Therefore, the team wants to ensure that emails are being retained in a lowercase irrespective of any changes in the database. Create a new TRIGGER called email_update for the USERS table that runs before an UPDATE operation. Task Create a TRIGGER to run on the USERS table before any UPDATE operation. Scenario and Database Model: InstantRide InstantRide is the new ride sharing application in the city and it has just started its operations. With the help of the InstantRide mobile application, the users request a ride with their location. Drivers and cars are assigned to the request; and then the driver picks up the user to ride their requested location. Information for the users, drivers and cars are stored in the database as well as the travel transactions. In the USERS table, information for the users are stored with their first name, last name and email: USER ID 3001 3002 3003 3004 3005 3006 3007 3008 USER FIRST NAME Jack Ryan Nursin Sarah Bobby Randy Jose Nursin USERS Table USER LAST NAME Cons VIMA Frie Grmn Clark Troms USER EMAIL @mal.com calgama.com nata@gmail.com spricemal.com bprmn@mail.com cork@mal.com thomas@mail.com nyman@mail.com In the DRIVERS table, all the drivers in the InstantRide are stored with their name, driving license number and check and rating information: DRIVER ID 2001 2002 2003 2004 CAR ID 1001 1002 DRIVER FIRST NAME DRIVERS Table 1003 Willie 1004 Justin Anthony Ece DRIVER_LAST_NAME DRIVER DRIVING LICENSE_ID CARS Table Butler Howard Walker Yilmaz CAR PLATE BB-542-AB BB-883-EE B8-451-ZN 1874501 BB-189-MM 1953853 1735487 1734747 CAR MODEL In the CARS table, all the cars in the Instant Ride system are kept with the license plate, model and year: TOYOTA PRIUS TESLA MODEL 3 TOYOTA AURIS DRIVER START DATE MERCEDES E200 2022-09-12 2022-09-09 2022-09-15 2022-08-15 DRIVER DRIVING LICENSE CHECKED 1 1 1 1 CAR_YEAR 2020 2021 2021 DRIVER RATING 2021 44 4.8 3.5 0.0 Finally, the transactions of the rides are stored in the TRAVELS table. For each travel, start and end time with location are stored. In addition, the involved driver, car and user are listed for each drive. Price and discount information are also available in the database: information are also available in the database: TRAVEL ID 5001 5002 5003 5004 5005 5006 5007 5006 5009 5010 TRAVEL START TIME 2022-10-01 01:04:55 2022-10-01 06:57:33 2022-10-01 13:35:20 2022-10-02 08:44:48 2022-10-02 16:38:54 2022-10-03 19:12:14 2022-10-03 16:06:36 2022-10-03 17:17:12 2022-10-03 21:1608 2022-10-03 23:21:40 TRAVEL_END_TIME 2022-10-01 04:14:19 TRAVELS Table 2022-10-01 06:12:33 2022-10-01 13:45:10 2022-10-02 09:15:28 2022-10-02 1648:10 2022-10-03 19:23:45 2022-10-03 16:08:56 2022-10-03 17:37:42 2022-10-03 21:26:18 2022-10-03 23:39:10 TRAVEL START LOCATION 9614 York Road 47 Church Street 2 Windsor Road 9060 Mill Lane 2 Queensway 50 Main Road 39 Park Road 37 The Drive 77 Mill Road 16 Church Road TRAVEL END LOCATION 84 Church Lane 60 High Street 95 West Street 27 Main Road 24 Mill Lane 93 Broadway 91 West Street 17 Stanley Road 724 Springfield Road 30 North Road TRAVEL PRICE 1544 20.56 12:32 3049 11.15 1461 4.41 25.12 13.55 25.62 DRIVER ID 2001 2001 2002 2003 2001 2003 2002 2001 2001 2000 CAR ID USER ID TRAVEL_DISCOUNT 1003 1003 1001 1002 1003 1002 1004 1003 1003 1002 3005 3006 3002 3001 3007 3007 3003 3001 3005 3000 NULL NULL NULL 013 NULL 0.10 014 0.25 NULL 0.20 You are assigned as the database administrator to collect and manage transactional data of the Instant Ride operations. Your main task is to create SQL scripts to help other teams to retrieve the requested data. In the following activities, you will create the scripts, run against the database and send the result to the corresponding teams. Grading After you have completed a problem and clicked the Run Query button, mark the task as complete. Checks will run to verify your work. Task 5: The Developers team also wants you to ensure that emails are converted to lowercase after an update operation. Currently, new insertions are guaranteed to have lowercase emails, but there is no such guarantee for legacy emails. Therefore, the team wants to ensure that emails are being retained in a lowercase irrespective of any changes in the database. Create a new TRIGGER called email_update for the USERS table that runs before an UPDATE operation. Task Create a TRIGGER to run on the USERS table before any UPDATE operation.
Expert Answer:
Answer rating: 100% (QA)
Task V The Developers team also wants you to ensure tha... View the full answer
Related Book For
Project Management The Managerial Process
ISBN: 9781260570434
8th Edition
Authors: Eric W Larson, Clifford F. Gray
Posted Date:
Students also viewed these databases questions
-
a. Why is it important to have a good credit score? List at least 3 reasons. b. List the 5 factors that influence your credit score. c. What is a credit reporting bureau? (You may need to do some...
-
Consider the job you currently have in criminal justice or would like to have in the future. How might learning various budgetary approaches make you valuable to a criminal justice employer?
-
In the field of industrial organization, economists study the strategic behavior of firms under alternative market structures and regulatory policies. One such market structure is known as an...
-
Compensation survey data collected in July 2018 shows the average annual salary for Accountant II is $62,300.00 (rounded). With an aging rate of +2.3%, calculate the market value for an Accountant II...
-
A pressure cooker (closed tank) contains water at 200 F with the liquid volume being 1/10 of the vapor volume. It is heated until the pressure reaches 300 lbf/in.2. Find the final temperature. Has...
-
Yazoo Inc. is a U.S. firm that has substantial international business in Japan and has cash inflows in Japanese yen. The spot rate of the yen today is $.01. The yen exchange rate was $.008 three...
-
Priming is required in a (a) gear pump (b) screw pump (c) reciprocating pump (d) centrifugal pump
-
Registration at Southern University has always been a time of emotion, commotion, and lines. Students must move among four stations to complete the trying semiannual process. Last semesters...
-
Retained Earnings Date May 31 Dividends Date PR Debit Account Number 318 Credit Salaries Expense Account Number 622 Balance Date PR Debit Credit Balance G2 83,000 May 31 G2 41,500 PR Debit Account...
-
Which series has the highest beta. BraveNewCoin Liquid Index for Bitcoin 1D BNC Trading Brave Ne Yellow Green Blue Orange
-
- 2 {( 125)(16)* 2-3 (ii) {(x)3 10
-
Solve the following Problem 6-6 Jerry wants to withdraw $2,000 per year for the next three years starting in one year. If the bank pays interest annually at 3%, how much must he put in today so...
-
Question 1: Identify and describe the core group performance factors Question 2: Describe the difference between formal and informal groups and give a specific example of each. Describe...
-
St. Johns Paul College of Engineering received the following fees from the students. Tuition fees $10,000 Library fees $500 Special fees $1,000 The college paid $2,000 in examination fees to the...
-
In an MBA college having 480 students, each student had to choose 3 out of 5 subjects namely Brand Management (BM), Digital Marketing (DM), Retail Marketing (RM), Consumer Behaviour (CM) and Market...
-
The balance in the Unrealized Gains and Losses on Available-for-sale Securities account, since the investment was purchased, would appear in what financial points?
-
Advantages & Disadvantages of limited company
-
You are a Loan Officer with an Investment Bank. Today you need to set your lending parameters. They are: LTV: 55% 10 Year T-Bill: TBD Rate Markup: 300 Basis Points Term: 30 Years Amortization: 30...
-
Use the cultural dimensions listed in Figure 3.5 to assess the culture of your school. Instead of employees, consider students, and instead of management, use faculty. For example, member identity...
-
What effect do you think 360-degree reviews have on the culture of an organization?
-
How does having a product vision and using Scrum rituals help teams manage tension and conflict?
-
Birth weights in the United States are normally distributed with a mean (in grams) of 3420 g and a standard deviation of 495 g. If you graph this normal distribution, the area to the right of 4000 g...
-
Is the distribution of those digits a normal distribution? Why or why not?
-
Many states have lotteries that involve the random selection of digits 0, 1, 2, ,
Study smarter with the SolutionInn App