You are on page 1of 1

Let’s imagine a general store or a supermarket selling database.

Create a blank database in


Microsoft Access with a name of your choice.

Stage 1 – Tables
Create the following tables using Table Design:
Products (ProductName, Category, MeasureUnit, Barcode)
Prices (SettingDate, Barcode, UnitPrice, EndDate)
ReceiptLines (ReceiptNo, LineNo, Barcode, Quantity)
Receipts (ReceiptNo, SaleDate, CashierCode)
Table names are in bold and the field names are between parenthesis.

Stage 2 – Data Integrity


Establish value lists for the fields [Category] and [MeasureUnit].
Set a validation rule for the field [EndDate] to be higher than [SettingDate].
Set an input mask for the field [Barcode] mandatory consisting of 13 digits.
Set an input mask for the field [CashierCode] consisting of 2 mandatory uppercase letters, 3
mandatory “letters or digits” and 4 more optional digits.
Set all fields in ReceiptLines as required.

Stage 3 – Relationships
Set the right primary keys for each above table in order to be ready for a “One-to-One” and
two “One-to-Many” relationships. Set then these relationships from Database Tools.

Bonus Stage – not mandatory


Fill the tables with some random records, manually or using Copy – Paste Append.

Stage 4 – Forms
Create any form using Form Wizard in order to show, append and/or modify data in tables.

Stage 5 – Queries
a) Calculate the full value of every receipt based on the unit prices and the quantities sold.
b) Find how many times each cashier has sold any product at its unit price over 500.
c) Use an update query to apply a 30% discount for products from “clothes” category having
their price end date under 10 days.

Stage 6 – Reports
Create any report using Report Wizard in order to show data from queries and/or tables.

You might also like