The document describes a relational schema and database design for a bike rental management system. It includes entity relationship diagrams and tables for shops, bikes, users, reservations, payments and accessories. It also analyzes the design in Boyce-Codd normal form to ensure tables are properly normalized.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
152 views7 pages
Bike Rental Management System
The document describes a relational schema and database design for a bike rental management system. It includes entity relationship diagrams and tables for shops, bikes, users, reservations, payments and accessories. It also analyzes the design in Boyce-Codd normal form to ensure tables are properly normalized.
o BCNF is the advance version of 3NF. It is stricter than 3NF.
o A table is in BCNF if every functional dependency X → Y, X is the super key of the table. o For BCNF, the table should be in 3NF, and for every FD, LHS is super key.
state_name, city, state, pin_code, numer_of_vehicles) Rental_Location_id is a super key so it is in bcnf Vehicle(Registration_number, Status, mileage, price_per_day, disable_friendly, category, color, model, year, shop_id, insurance_id) Registration_number is a super key so it is in bcnf User_details(Email, DOB, License_No, phone, name, state, city, pin_code) Email is a super key so it is in bcnf Vehicle_description(Category, Category_description) Category is a super key so it is in bcnf Insurance(Insurance_ID, Insurance_type, Insurance_amount, Insurance_start_date, Insurance_end_date) Insurance_ID is a super key so it is in bcnf Payment_details(Payment_ID, Payment_method, total_amount_paid. Payment_ID is a super key so it is in bcnf Coupon_details(Coupon_code, Start_date, end_date, discount_percentage) Coupon_code is a super key so it is in bcnf Reservation_details(Reservation_ID,Start_date,end_date, rental_amount, status, email, payment_id, security_amountr, insurance_id, coupon_code) Reservation_ID is a super key so it is in bcnf Accessories(Accessory_ID, amount, type, reservation_id) Accessory_ID is a super key so it is in bcnf
DDL SCRIPT: create schema bike_rental;
set search_path to bike_rental;
CREATE TABLE RENTAL_LOCATION
( Shop_ID INT PRIMARY KEY, Shop_Name VARCHAR(20), Customer_rating INT , Phone CHAR(10), Email VARCHAR(25), Street_Name VARCHAR(40), State CHAR(10) , PIN_Code CHAR(6) City CHAR(20) );