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

Watchers

Forks

Releases

No releases published

Packages

No packages published