MS Access Notes and Question
MS Access Notes and Question
2.1 Scenario
ABC Supermarket wants a database to manage sales transactions. The database should
store customer details, product inventory, employee information, and sales records.
Customers Table
CustomerID | FirstName | LastName | City | Phone
Products Table
ProductID | ProductName | Category | Price (KSh) | StockQuantity
Orders Table
OrderID | CustomerID | ProductID | OrderDate | Quantity | TotalPrice (KSh)
Employees Table
EmployeeID | FirstName | LastName | Role | Phone
2.3 Questions
1. Database Design (Tables & Relationships)
- Identify the Primary Keys for each table.
- Set up Relationships between the tables, ensuring Referential Integrity.
2. Queries
(a) Select Query: Retrieve all orders placed in January 2025.
(b) Update Query: Increase the price of all grocery products by 5%.
(c) Delete Query: Remove customers from Nairobi who haven't placed an order in the last 6
months.
(d) SQL Query: List the top 2 best-selling products based on total quantity sold.
3. Forms
- Design a Customer Entry Form with a Combo Box for selecting the city.
- Include a Submit Button that saves the record.
4. Reports
- Generate a Monthly Sales Report showing total revenue per product.
- Group the report by Product Category and sort it by total sales.
Final Task
Build this database in MS Access and answer the following:
1. What criteria did you use in your Select Query for January 2025 orders?
2. How did you ensure only 'Grocery' products were affected in your Update Query?
3. How does your VBA script trigger a warning for low stock?
4. How did you optimize database security and performance?