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:
In the DRIVERS table, all the drivers in the InstantRide are stored with their name, driving license number and check and rating information:
In the CARS table, all the cars in the InstantRide system are kept with the license plate, model and year:
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:
Task 1:
The InstantRide received some traffic violation tickets from the government. The Legal team of InstantRide requires the travel information of the respective drivers along with corresponding Driving License IDs to proceed further. In addition, the team wants to include the drivers without travel information in the system yet for the completion of driver list. Therefore, you need to return DRIVER_FIRST_NAME, DRIVER_LAST_NAME, DRIVER_DRIVING_LICENSE_ID, TRAVEL_START_TIME, TRAVEL_END_TIME information from the DRIVERS and TRAVELS data connected by LEFT JOIN.
Task 2:
The InstantRide Management team considers setting up a Lost & Found inventory. In order to start the setup, the team requires the detail of users with their travel start and end times. The team wants to track potential list of users who may have forgotten their items on the cars. Therefore, you need to return USER_FIRST_NAME, USER_LAST_NAME, TRAVEL_START_TIME, TRAVEL_END_TIME information from the USERS and TRAVELS tables connected inside a JOIN statement by the USING function and USER_ID field.
Task 3:
The InstantRide Finance team wants to collect the price and discount information with the driver names for each travel in the system. You need to return the TRAVEL_ID, DRIVER_FIRST_NAME, DRIVER_LAST_NAME, TRAVEL_PRICE, and TRAVEL_DISCOUNT information from the TRAVELS and DRIVERS tables combined over DRIVER_ID field with the ON keyword.
Task 4:
The InstantRide Driver Relationship team wants to create groups for drivers according to their ratings such as 3+ or 4+. For instance, a driver with the rating 3.8 will be 3+; whereas a driver with the rating 4.2 will be 4+. You need to return a two column output with DRIVER_ID and DRIVER_RATING which has first FLOOR applied and then CONCAT with + sign for all drivers with a rating greater than 0.
Task 5:
The InstantRide User Satisfaction team are looking forward to creating discounts for the users. However, the team suspects that there could be duplicate users in the system with different emails. Check for the users with their names and surnames for potential duplicates. Therefore, you need to JOIN the USERS table with USERS table and compare for equality of USER_FIRST_NAME and USER_LAST_NAME and difference in USER_ID fields.
Tasks:
Query all drivers with and without travel data.
Query user travel times.
Calculate each user's price and discount information.
Create groups of drivers according to their ratings.
Check for duplicate driver accounts.
Trending nowThis is a popular solution!
Step by stepSolved in 4 steps
- Access Assignment Problem: JMS TechWizards is a local company that provides technical services to several small businesses in the area. The company currently keeps its technicians and clients’ records on papers. The manager requests you to create a database to store the technician and clients’ information. The following table contains the clients’ information. Client Number Client Name Street City State Postal Code Telephone Number Billed Paid Technician Number AM53 Ashton-Mills 216 Rivard Anderson TX 78077 512-555-4070 $315.50 $255.00 22 AR76 The Artshop 722 Fisher Liberty Corner TX 78080 254-555-0200 $535.00 $565.00 23 BE29 Bert's Supply 5752 Maumee Liberty Corner TX 78080 254-555-2024 $229.50 $0.00 23 DE76 D & E Grocery 464 Linnell Anderson TX 78077 512-555-6050 $485.70…arrow_forwardThe idea of the project is to develop a simple Android app with real-time database. you decide your topic, what your app to be about. Four major functions are expected to be available in the app. These functions are Insert, Read, Update, and Delete data. You are required to use Google Firebase to implement the database. The application allows the user to create a new object (Insert) The application allows the user to delete information for an existing object. (Delete) The application allows the user to browse existing information (Read) The application allows the user to update existing object information (Update) Application quality (functionality, design and user interaction, stability …) use Google Firebase to implement the database XXXXXXXXXXXXXXX plz other than (task manger) or (to do list) XXXXXXXXXXXXXXXXarrow_forwardScenario 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: In the DRIVERS table, all the drivers in the InstantRide are stored with their name, driving license number and check and rating information: In the CARS table, all the cars in the InstantRide system are kept with the license plate, model and year: 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…arrow_forward
- Task 1:Create a database Entity and Relationship Diagram (ERD) for the following application:Please include answer with detailed explanationKhair Application: The Application idea: It is a mobile application called (Khair) to help people. This assistance is moral, material. This assistance is also provided by good people in our community. Example to understand the Application idea more: For example, a person urgently needs a medical chair or bed and does not have the ability to purchase what he needs. The medical chair or bed is requested through the application, and whoever has what he requests initiates the request through the application’s messages and determines the meeting place. Application models (page): Login included: login registration login included: user name password New registration included: name E-mail Password phone number date National Identification Number Home page included: Request - applicant name - address - send message Messages list form included: list of…arrow_forwardimport sqlite3 from sqlite3 import Error # Creates connection to sqlite in-memory database def create_connection(): """ Create a connection to in-memory database :return: Connection object """ try: conn = sqlite3.connect(":memory:") return conn except Error as e: print(e) # YOUR CODE HERE # Use sqlite3.connect(":memory:") to create connection object return conn # query to create the table table_sql = """ CREATE TABLE Horses ( id integer PRIMARY KEY NOT NULL, name text, breed text, height real, birthday text ); """ # query to insert data into the table ins_sql = """INSERT INTO Horses VALUES(1,'Babe','Quarter Horse',15.3,'2015-02-10'); """ # query to fetch all data from the table fetch_sql = """SELECT * FROM Horses;""" # creating db connection conn = create_connection() # fetching a cursor from the connection c = conn.cursor() # executing statement to create table c.execute(table_sql) # executing statement to…arrow_forwardHow can you create a form that shows the columns of only a single row of a database in an application?arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education