Use MS Access 365 for Inventory Management |
Part 2: Designing Tables and Relationships in MS Access 365 |
1. Introduction to Table Design |
1.1 Role of Tables in Inventory Systems |
Tables are the foundation of any MS Access database. In an inventory management system, tables store all essential data, including: |
1. Product information |
2. Supplier details |
3. Customer records |
4. Inventory transactions |
5. Purchase and sales data |
Every operation in the system hether data entry, reporting, or analysis—relies on properly structured tables. |

|
1.2 Principles of Effective Table Design |
A well-designed table structure ensures: |
1. Data consistency |
2. Reduced redundancy |
3. Efficient querying |
4. Easy maintenance |
Key principles include: |
1. Each table should represent a single entity |
2. Fields should store atomic values (no repeating groups) |
3. Avoid duplicate data |
4. Use appropriate data types |

|
2. Identifying Core Tables |
2.1 Essential Tables in Inventory Management |
A complete inventory system typically includes the following tables: |
1. Products |
2. Categories |
3. Suppliers |
4. Customers |
5. InventoryTransactions |
6. PurchaseOrders |
7. SalesOrders |
8. StockAdjustments |
2.2 Functional Role of Each Table |
1. Products |
Stores product details such as name, price, and stock level. |
2. Categories |
Groups products into logical classifications. |
3. Suppliers |
Contains vendor information. |
4. Customers |
Stores customer data for sales tracking. |
5. InventoryTransactions |
Records all stock movements. |
6. PurchaseOrders |
Tracks incoming stock orders. |
7. SalesOrders |
Tracks outgoing sales. |
8. StockAdjustments |
Handles corrections and manual updates. |

|
3. Designing the Products Table |
3.1 Purpose of the Products Table |
The Products table is central to the system. It contains all items being tracked. |
3.2 Key Fields in the Products Table |
Typical fields include: |
1. ProductID (Primary Key) |
2. ProductName |
3. CategoryID (Foreign Key) |
4. SupplierID (Foreign Key) |
5. UnitPrice |
6. CostPrice |
7. StockQuantity |
8. ReorderLevel |
9. Discontinued (Yes/No) |
3.3 Data Types Selection |
Choosing correct data types is critical: |
1. ProductID AutoNumber |
2. ProductName Short Text |
3. UnitPrice Currency |
4. StockQuantity Number |
5. Discontinued Yes/No |
3.4 Field Properties and Constraints |
Define constraints such as: |
1. Required fields (ProductName must not be empty) |
2. Default values (StockQuantity = 0) |
3. Validation rules (UnitPrice = 0) |

|
4. Designing the Categories Table |
4.1 Purpose |
The Categories table organizes products into logical groups. |
4.2 Key Fields |
1. CategoryID (Primary Key) |
2. CategoryName |
3. Description |
4.3 Benefits of Using Categories |
1. Simplifies reporting |
2. Improves filtering |
3. Enhances organization |

|
5. Designing the Suppliers Table |
5.1 Purpose |
Stores vendor information for procurement. |
5.2 Key Fields |
1. SupplierID (Primary Key) |
2. SupplierName |
3. ContactPerson |
4. Phone |
5. Email |
6. Address |
5.3 Data Integrity Considerations |
1. Ensure unique supplier names |
2. Validate email formats |
3. Use consistent address formatting |

|
6. Designing the Customers Table |
6.1 Purpose |
Tracks buyers for sales transactions. |
6.2 Key Fields |
1. CustomerID (Primary Key) |
2. CustomerName |
3. Phone |
4. Email |
5. Address |
6.3 Optional Enhancements |
1. CustomerType (Retail/Wholesale) |
2. CreditLimit |
3. PaymentTerms |

|
7. Designing the InventoryTransactions Table |
7.1 Purpose |
Tracks every movement of inventory. |
7.2 Key Fields |
1. TransactionID (Primary Key) |
2. ProductID (Foreign Key) |
3. TransactionDate |
4. Quantity |
5. TransactionType (IN/OUT) |
6. ReferenceID (links to orders) |
7. Notes |
7.3 Importance of Transaction Tracking |
Instead of directly modifying stock levels, transactions provide: |
1. Full audit trail |
2. Historical analysis |
3. Error correction capability |

|
8. Designing Purchase Orders Table |
8.1 Purpose |
Manages incoming stock from suppliers. |
8.2 Key Fields |
1. PurchaseOrderID (Primary Key) |
2. SupplierID (Foreign Key) |
3. OrderDate |
4. ExpectedDate |
5. Status |
8.3 Line Items Structure |
Instead of storing multiple products in one record, use a separate table: |
PurchaseOrderDetails |
Fields: |
1. DetailID |
2. PurchaseOrderID |
3. ProductID |
4. Quantity |
5. UnitCost |

|
9. Designing Sales Orders Table |
9.1 Purpose |
Tracks outgoing sales. |
9.2 Key Fields |
1. SalesOrderID (Primary Key) |
2. CustomerID (Foreign Key) |
3. OrderDate |
4. Status |
9.3 Sales Order Details Table |
Fields: |
1. DetailID |
2. SalesOrderID |
3. ProductID |
4. Quantity |
5. UnitPrice |

|
10. Designing Stock Adjustments Table |
10.1 Purpose |
Handles manual corrections such as: |
1. Damaged goods |
2. Inventory discrepancies |
3. Stock audits |
10.2 Key Fields |
1. AdjustmentID |
2. ProductID |
3. AdjustmentDate |
4. QuantityChange |
5. Reason |

|
11. Establishing Relationships |
11.1 Types of Relationships |
1. One-to-One |
2. One-to-Many |
3. Many-to-Many (via junction tables) |
11.2 Common Relationships in Inventory Systems |
1. Categories Products (One-to-Many) |
2. Suppliers Products (One-to-Many) |
3. Products Transactions (One-to-Many) |
4. Orders OrderDetails (One-to-Many) |

|
12. Creating Relationships in MS Access |
12.1 Steps |
1. Open Database Tools |
2. Click Relationships |
3. Add tables |
4. Drag primary key to foreign key |
5. Enable referential integrity |
12.2 Referential Integrity Options |
1. Enforce Referential Integrity |
2. Cascade Update |
3. Cascade Delete |
12.3 Best Practices |
1. Avoid unnecessary cascade deletes |
2. Always enforce integrity where possible |
3. Test relationships carefully |

|
13. Indexing for Performance |
13.1 What is Indexing |
Indexes improve data retrieval speed. |
13.2 Fields to Index |
1. Primary keys (automatic) |
2. Foreign keys |
3. Frequently searched fields |
13.3 Trade-offs |
1. Faster queries |
2. Slightly slower inserts/updates |

|
14. Avoiding Common Design Mistakes |
14.1 Redundant Data |
Do not store the same data in multiple tables. |
14.2 Improper Data Types |
Using text instead of numeric fields leads to errors. |
14.3 Missing Relationships |
Unlinked tables reduce system reliability. |
14.4 Overloaded Tables |
Avoid storing too many unrelated fields in one table. |

|
15. Testing the Table Design |
15.1 Insert Sample Data |
Add: |
1. Sample products |
2. Sample suppliers |
3. Sample transactions |
15.2 Verify Relationships |
Check: |
1. Foreign key constraints |
2. Data consistency |
15.3 Run Basic Queries |
Test: |
1. Product listings |
2. Stock calculations |
3. Transaction history |

|
16. Preparing for Next Phase |
With tables and relationships completed, the system is ready for: |
1. Query creation |
2. Form development |
3. Report generation |
17. Summary of Part 2 |

|
In this section, we covered: |
1. Detailed table design for inventory systems |
2. Field definitions and data types |
3. Relationship creation and enforcement |
4. Indexing and optimization |
5. Common design mistakes and testing |