Skip to content

Sandra1me/MySQL-Inventory-Management-Database

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Inventory Management Database (MySQL)

A relational database project built in MySQL to manage products, categories, and suppliers.

Project Overview

This database simulates a basic inventory system where:

  • Each product belongs to a category
  • Each product is supplied by a supplier
  • Stock levels and pricing are tracked
  • Analytical queries provide business insights

Database Structure

The project consists of three main tables:

categories

  • Stores product categories (e.g., Electronics, Gaming)

suppliers

  • Stores supplier information (name, phone, country)

products

  • Stores product data:
    • Name
    • Price
    • Stock
    • Category (foreign key)
    • Supplier (foreign key)

Relationships

  • products.id_category → categories.id_category
  • products.id_supplier → suppliers.id_supplier

Installation

  1. Open MySQL Workbench (or any MySQL client)
  2. Run the schema file: schema.sql;
  3. Insert data: data.sql;
  4. Run analysis queries: queries.sql;

Usage

The project includes a set of queries to analyze inventory data.

Basic Queries

  • View products with category and supplier
  • Search products by category
  • Search products by supplier

Basic Queries

  • View products with category and supplier
  • Search products by category
  • Search products by supplier

Aggregations

  • Total number of products
  • Products per category
  • Minimum, maximum, and average price

Inventory Insights

  • Product with highest / lowest stock
  • Average price by category
  • Supplier with most products

Business-Oriented Queries

  • Total inventory value by category (price × stock)
  • Products with low stock
  • Average price by supplier

Possible Improvements

  • Add constraints (NOT NULL, CHECK)
  • Implement triggers for stock updates
  • Create views for common queries
  • Add stored procedures for business logic
  • Expand dataset with more realistic data

Contributing

Pull requests are welcome.

For major changes, please open an issue first to discuss what you would like to improve.

License

This project is open source and available under the MIT License.

About

A relational database project built in MySQL to manage products, categories, and suppliers.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors