Hashan-Samarakkody / SwiftStock-Inventory_Management_System

This repository contains the code for a web-based Inventory Management System developed for the final project in Web Applications Development I. The application is built using PHP and MySQL, designed to help users efficiently manage their inventory items through a comprehensive set of features.
MIT License
4 stars 0 forks source link

Create Database for Inventory Management System #14

Closed Hashan-Samarakkody closed 1 month ago

Hashan-Samarakkody commented 1 month ago

Description:

Our Inventory Management System requires a robust, efficient, and well-structured database to store and manage all necessary data. This database will be the backbone of our application, handling user information, product details, inventory transactions, and order management. We need to design and implement a MySQL database that can accommodate our current needs and allow for future scalability.

Instructions:

  1. Design the database schema:

    • Identify all necessary tables (e.g., Users, Products, Categories, Inventory, Orders)
    • Define relationships between tables
    • Determine primary and foreign keys
    • List all fields for each table with their data types
  2. Add new tables: a. Users:

    • Include fields for id, username, email, password (hashed), full_name(optional), phone number(optional), created_at(optional)
    • Ensure username and email are unique

    b. Inventory:

    • Include fields for id, name, quantity, description, price, category_id (foreign key)

    d. Categories:

    • Include fields for id, name
  3. Implement tables:

    • Write SQL scripts to create each table
    • Include all necessary fields, keys, and constraints
  4. Set up relationships:

    • Implement foreign key constraints
    • Ensure referential integrity
  5. Create indexes:

    • Identify fields that will be frequently searched
    • Create appropriate indexes to optimize query performance
  6. Implement basic data:

    • Create SQL scripts to insert initial data (e.g., admin user, default categories)
  7. Set up user permissions:

    • Create a database user for the application
    • Grant necessary permissions to this user
  8. Document the schema:

    • Create an ER diagram
    • Write a brief description of each table and its purpose
  9. Backup:

    • Create a SQL dump of the database structure
  10. Test:

    • Verify all tables are created correctly
    • Test relationships with sample data
    • Ensure all constraints are working as expected
  11. Version control:

    • Add SQL scripts to the project's version control system
  12. Share:

    • Provide the team with connection details and the ER diagram

Update this issue with progress and any questions that arise during the database creation process.

Hashan-Samarakkody commented 1 month ago

Database has been created image

Hashan-Samarakkody commented 1 month ago

Code is ready to use