Small Electronics DB Schema
Budget: ₹600 – ₹1,500 INR
I need a straightforward relational database that lets a local shop track its small-electronics inventory. Here’s what I’m after:
• A single SQL script that creates three tables—Products, Suppliers, and Orders—with exactly these columns:
– Products(ProductID, ProductName, Category, Price, StockQuantity)
– Suppliers(SupplierID, SupplierName, ContactPerson, PhoneNo)
– Orders(OrderID, ProductID, SupplierID, OrderDate, QuantityOrdered, Cost)
• Primary keys for each table and the necessary foreign-key links (Products ↔ Orders, Suppliers ↔ Orders) so ProductID remains unique—the detail I care about most.
• Two sample queries that demonstrate typical use:
1. List every product whose StockQuantity is below 10.
2. Return all products that fall under a category I supply at runtime.
• A simple SELECT statement that produces a printable report with ProductID, ProductName, SupplierName, OrderDate, QuantityOrdered, and Cost—all in one joined result.
I’m flexible on the DBMS; feel free to write for MySQL, PostgreSQL, or SQLite as long as the syntax is standard SQL and clearly commented. I want an access .accdb file.
Deliverables
1. The .sql file ready to run.
2. A brief README explaining how to execute the script and test the queries.
Keep the solution lean and easy to understand—this is for a small shop, so no heavy frameworks or GUIs are required.
• A single SQL script that creates three tables—Products, Suppliers, and Orders—with exactly these columns:
– Products(ProductID, ProductName, Category, Price, StockQuantity)
– Suppliers(SupplierID, SupplierName, ContactPerson, PhoneNo)
– Orders(OrderID, ProductID, SupplierID, OrderDate, QuantityOrdered, Cost)
• Primary keys for each table and the necessary foreign-key links (Products ↔ Orders, Suppliers ↔ Orders) so ProductID remains unique—the detail I care about most.
• Two sample queries that demonstrate typical use:
1. List every product whose StockQuantity is below 10.
2. Return all products that fall under a category I supply at runtime.
• A simple SELECT statement that produces a printable report with ProductID, ProductName, SupplierName, OrderDate, QuantityOrdered, and Cost—all in one joined result.
I’m flexible on the DBMS; feel free to write for MySQL, PostgreSQL, or SQLite as long as the syntax is standard SQL and clearly commented. I want an access .accdb file.
Deliverables
1. The .sql file ready to run.
2. A brief README explaining how to execute the script and test the queries.
Keep the solution lean and easy to understand—this is for a small shop, so no heavy frameworks or GUIs are required.