Question
Database Design. Bikes4All is a small bike rental store located in Chicago. They provide different types of bikes for rent on an hourly basis. Based
Database Design. Bikes4All is a small bike rental store located in Chicago. They provide different types of bikes for rent on an hourly basis. Based on the information given below, create a database schema (e.g., Student(ID, name, dept name, tot cred)) that can be implemented to help Bikes4All track bike rentals to its customers. Bikes4All owns different types of bikes, and they have numerous bikes of each type. For example, the store may have 15 bikes of the type Tandem Bicycle, and 40 bikes of the type Electric Bicycle. This implies that Tandem Bicycle would be one BikeType, and each of the 15 tandem bikes would be a Bike. Each bike can be rented many times over its lifetime; each and 1 every bike rental must be recorded. A single customer can rent multiple bikes at one time. Your database schema should include the following entities: Customer: Every customer has a unique integer ID, first name, last name, street, city, state, zip. BikeType: Every bike type a unique integer ID, along with a description and rental price per hour. Bike: Every bike a unique integer ID, a type, and the year put into service. Your schema must be able to support each of these scenarios: Customer X rents a single bike for an expected duration of N hours (e.g. 0.5 for 30 minutes; 1 for 1 hour). The date and time of the rental start is recorded in the format e.g., 2019-01-18 16:45:00. When the bike is returned, the customer is charged the amount based on the actual return time. Customer Y rents N bikes, each for a duration of N hours. The date and time of the rental start is recorded in the format e.g., 2019-01-18 16:45:00. When the bikes are returned, the customer is charged the amount based on the actual return time. For a Customer Z, Bikes4All can retrieve a complete history of every bike they have ever rented, along with when it was rented and for how long (actual duration). Given Bike B, retrieve a complete history of every rental of B. Someone calls on the phone and asks if Bikes4All has N bikes (of possibly different types) available to rent. Is bike B rented? Does customer C currently have a rental? To address these scenarios, you will need to add one or more entities to your schema; you may also need to add attributes to the existing entities of Customer, BikeType, and Bike. Do not forget to highlight the primary and foreign keys. Please list all assumptions, as correctness depends on that.
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