Skip to content

FajlaRabby24/Database-Design-SQL-Queries

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

11 Commits
ย 
ย 
ย 
ย 

Repository files navigation

Vehicle Rental System โ€” Database Design & SQL Queries

This repository contains a database design and SQL query assignment for a Vehicle Rental System. The goal of this assignment is to demonstrate a solid understanding of:

  • Relational database structure and schema design
  • Entity Relationship Diagrams (ERD)
  • Advanced SQL querying with joins, exists conditions, grouping, and filters

You will also explore real-world constraints such as availability of vehicles and relational linkages between users, bookings, and vehicles. :contentReference[oaicite:1]{index=1}


๐Ÿ› ๏ธ Features & Scope

This project includes the following components:

๐Ÿ”น ERD (Entity Relationship Diagram)

A conceptual diagram that connects the main entities of the system:

Table Primary Role
Users Stores customers and admin info
Vehicles Manages vehicle inventory
Bookings Tracks rental agreements

The relationships are represented as:

  • One-to-Many: Users โ†’ Bookings
  • Many-to-One: Bookings โ†’ Vehicles
    (NB: Logical One-to-One between a booking, its user, and vehicle) :contentReference[oaicite:2]{index=2}

๐Ÿ“ SQL Queries & Results

๐Ÿš€ Whatโ€™s Included

  1. INNER JOIN โ€” Get booking info with user + vehicle details
  2. NOT EXISTS โ€” Find vehicles that were never booked
  3. WHERE clause โ€” List all available vehicles of a specific type
  4. GROUP BY + HAVING โ€” Vehicles having more than 2 bookings :contentReference[oaicite:3]{index=3}

๐Ÿ“Œ These queries are also provided in queries.sql inside this repository.


About

Vehicle Rental System - Database Design & SQL Queries

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors