Car rental and fleet database schema

A vehicle rental schema: branches, vehicle classes versus the individual cars behind them, a per-branch availability calendar, reservations and signed agreements, mileage and fuel, damage inspections with photos, protection add-ons and one-way fees.

Car Rental ER diagram

Car rental and fleet database schema n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 locations idBIGINT codeVARCHAR nameVARCHAR address_line1VARCHAR cityVARCHAR country_codeCHAR timezoneVARCHAR phoneVARCHAR is_airportBOOLEAN opens_atTIME closes_atTIME is_activeBOOLEAN vehicle_classes idBIGINT acriss_codeCHAR nameVARCHAR example_modelsVARCHAR transmissionVARCHAR doorsTINYINT seatsTINYINT large_bagsTINYINT has_air_condition…BOOLEAN base_daily_rate_m…INTEGER currency_codeCHAR min_driver_ageTINYINT vehicles idBIGINT class_idBIGINT home_location_idBIGINT current_location_…BIGINT vinVARCHAR plateVARCHAR makeVARCHAR modelVARCHAR model_yearYEAR colourVARCHAR fuel_typeVARCHAR tank_capacity_lit…DECIMAL odometer_kmINTEGER statusVARCHAR acquired_onDATE sold_onDATE class_availability location_idBIGINT class_idBIGINT available_onDATE cars_availableSMALLINT cars_reservedSMALLINT daily_rate_minorINTEGER currency_codeCHAR is_closedBOOLEAN updated_atDATETIME customers idBIGINT emailVARCHAR full_nameVARCHAR phoneVARCHAR date_of_birthDATE licence_numberVARCHAR licence_country_c…CHAR licence_expires_onDATE loyalty_numberVARCHAR created_atDATETIME reservations idBIGINT confirmation_codeVARCHAR customer_idBIGINT class_idBIGINT pickup_location_idBIGINT return_location_idBIGINT pickup_atDATETIME return_atDATETIME rental_daysSMALLINT quoted_daily_rate…INTEGER one_way_fee_minorINTEGER estimated_total_m…INTEGER currency_codeCHAR statusVARCHAR created_atDATETIME cancelled_atDATETIME rentals idBIGINT agreement_numberVARCHAR reservation_idBIGINT vehicle_idBIGINT customer_idBIGINT pickup_location_idBIGINT return_location_idBIGINT picked_up_atDATETIME due_back_atDATETIME returned_atDATETIME odometer_outINTEGER odometer_inINTEGER included_kmINTEGER excess_km_rate_mi…INTEGER fuel_out_eighthsTINYINT fuel_in_eighthsTINYINT fuel_charge_minorINTEGER one_way_fee_minorINTEGER subtotal_minorINTEGER taxes_minorINTEGER total_minorINTEGER currency_codeCHAR statusVARCHAR inspections idBIGINT rental_idBIGINT vehicle_idBIGINT kindVARCHAR performed_atDATETIME performed_byVARCHAR odometer_kmINTEGER fuel_level_eighthsTINYINT cleanlinessVARCHAR notesTEXT signature_refVARCHAR damages idBIGINT vehicle_idBIGINT reported_inspecti…BIGINT first_seen_inspec…BIGINT charged_rental_idBIGINT panelVARCHAR damage_typeVARCHAR severityVARCHAR estimated_repair_…INTEGER currency_codeCHAR statusVARCHAR created_atDATETIME damage_photos idBIGINT damage_idBIGINT storage_keyVARCHAR taken_atDATETIME captionVARCHAR is_primaryBOOLEAN protection_products idBIGINT codeVARCHAR nameVARCHAR descriptionTEXT kindVARCHAR daily_price_minorINTEGER currency_codeCHAR excess_reduction_…INTEGER is_activeBOOLEAN rental_protections rental_idBIGINT product_idBIGINT daily_price_minorINTEGER daysSMALLINT total_minorINTEGER currency_codeCHAR accepted_atDATETIME one_way_fees idBIGINT pickup_location_idBIGINT return_location_idBIGINT class_idBIGINT is_allowedBOOLEAN fee_minorINTEGER currency_codeCHAR effective_fromDATE effective_toDATE

Related database schemas