Others

How to Design Access Tables and Relationships for Expenses

Anum MushtaqAnum Mushtaq Nov 2, 2026 869 views

Question details

The user needs to construct a relational expense database with properly normalized tables, utilizing primary and foreign keys to avoid data duplication.

How to Design Access Tables and Relationships for Expenses
Product
Microsoft Access
Device & OS
not provided
Scenario
Setting up a database to track expenses across different banks, accounts, categories, and subcategories.
Observed behavior
Establishing a correct relational structure where the Expenses table relies on foreign keys rather than storing redundant text data.
Before you start

Before creating your tables, map out your data hierarchy on paper—identifying banks, accounts, categories, and subcategories—to ensure a logical relational structure.

Solution 1Recommended

Set Up Normalized Tables with Primary and Foreign Keys

Create distinct tables for each data entity to properly normalize the database and prevent redundant entries.

A well-structured relational database prevents data duplication. By creating separate reference tables and linking them with primary and foreign keys, updates to a bank or category name will automatically reflect across all relevant expense records.

1
Create the Banks and Accounts Tables

First, create a 'Banks' table with a 'BankID' field as the Primary Key and a 'BankName' text field. Next, create an 'Accounts' table featuring an 'AccountID' Primary Key, an 'AccountName' text field, and a 'BankID' Foreign Key to link the account to its respective bank.

2
Define Categories and SubCategories

Set up a 'Categories' table using 'CategoryID' as the Primary Key. Then, establish a 'SubCategories' table with 'SubCategoryID' as the Primary Key and include the 'CategoryID' as a Foreign Key to tie each subcategory to a broader category.

3
Build the Main Expenses Table

Create your 'Expenses' table with an 'ExpenseID' Primary Key, alongside standard fields like 'ExpenseDate', 'ExpenseAmount', and 'Description'. Crucially, include only 'AccountID' and 'SubCategoryID' as Foreign Keys. Avoid adding a 'CategoryID' field here, as the chosen subcategory inherently determines the category.

Set Up Normalized Tables with Primary and Foreign Keys
Normalization Complete: By omitting the CategoryID from the Expenses table, you have successfully adhered to database normalization principles and prevented redundant data storage.
Free Microsoft Office alternative

Manage Your Expenses Efficiently with WPS Spreadsheet

While Microsoft Access offers robust relational database capabilities, maintaining simple expense trackers is often much easier in a spreadsheet environment. WPS Office provides a lightweight, entirely free alternative to Microsoft Office, equipped with powerful spreadsheet functions to manage daily expenses without requiring complex database design.

  1. 1. Download WPS Office: Install WPS Office for free from the official website and open WPS Spreadsheet.
  2. 2. Access Expense Templates: Navigate to the Templates gallery and search for 'Expense Tracker' to find a pre-formatted template that fits your needs.
  3. 3. Start Tracking: Input your daily transactions effortlessly using familiar spreadsheet tools without needing to configure complex primary and foreign keys.
Free and lightweight Microsoft Office alternativeSeamless compatibility with Microsoft Excel (.xlsx) formatsRich library of pre-made expense tracking templatesFamiliar user interface with zero learning curve
microsoft office alternative - wps office

Frequently Asked Questions

Why shouldn't I add a CategoryID field directly to the Expenses table?

Including the CategoryID in the Expenses table creates redundant data. Because a SubCategory is always mapped to a specific Category in the SubCategories table, storing both in the Expenses table violates database normalization rules and can lead to inconsistent data updates.

Should I use a multi-table query as the data source for my expense entry form?

No, binding an entry form directly to a multi-table query is not recommended as it can cause data-locking issues and update anomalies. It is much safer to bind the form directly to the main Expenses table and use combo boxes or list controls to pull in text descriptions from related foreign key tables.

How do I display text names in my form but store ID numbers in the table?

When designing your form, use the Combo Box Wizard to create the entry fields for your Foreign Keys. The wizard allows you to select a lookup table (such as Accounts), display a descriptive text column (AccountName) to the user, and bind the hidden ID column (AccountID) to the underlying field in your Expenses table.