HEXCO · Polytechnic · NC Accountancy

Business Computing and Digital Literacy: Databases

Learning Outcome 5 of 6

Free HEXCO NC Accountancy notes on Databases, learning outcome 5 of 6 in Business Computing and Digital Literacy. Data communication, file management, word processing, spreadsheets, databases and multimedia. Semester 1, module 310/22/M04.

Here we learn how to create a database and table, add and delete fields and records, choose data types, update data, and generate and print queries and reports, using Microsoft Access as the example.

A business keeps large lists of customers, suppliers, products and employees, and a database stores these lists in an organised way so that any information can be found, sorted and reported quickly.

5.1 Creating and Editing a Database

A database is an organised collection of related data stored so that it can be easily searched, updated and reported on.

In Access, data is stored in tables, where each row is a record about one item and each column is a field holding one type of detail.

Database Terms

The example below shows a Customers table. Each record is one customer, each field is one detail, such as Town, and the primary key (CustomerID) is a field whose value is unique for every record, so no two customers can be confused.

Loading Access and Creating a New Database

Click Start, type 'Access' and open it, then choose Blank database, type a file name such as 'Customers.accdb', choose where to save it and click Create. Unlike Word and Excel, Access saves the file before any data is entered, and then saves each record automatically as you move off it. A new table opens; switch to Design View (Home, View) to set up its fields, saving the table with a name such as 'Customers'.

Adding and Deleting Fields

In Design View, type a field name in the next empty row, choose its data type, and add a description if needed. To set the primary key, select the field and click Primary Key. To delete a field, select its row and click Delete Rows, remembering that all data in that field is lost. Field names should be short and clear, such as 'Phone', and each field should hold only one item of data.

Data Types

The data type decides what kind of data a field can hold, which prevents wrong entries and lets Access calculate and sort correctly.

Data typeUsed for
Short Text Text up to 255 characters.Names, addresses, phone numbers and codes, which are not calculated.
Long Text Longer text.Notes, comments and descriptions.
Number Numeric values.Quantities and other numbers used in calculations.
Currency Money values.Prices, balances and credit limits, accurate to the cent.
Date/Time Dates and times.Order dates, dates of birth and payment dates.
AutoNumber A number added automatically.Unique IDs, often used as the primary key.
Yes/No One of two values.Fields such as Paid or VAT registered.

Adding, Deleting and Updating Records

Switch to Datasheet View to work with records. To add a record, type in the blank row marked with a star (*) at the bottom, or click New on the Home tab. To delete a record, select it by clicking the grey box at its left and press Delete, then confirm; deleted records cannot be recovered. To update a field, click in it and type the new value; the change is saved when you move to another record. Find (Ctrl + F) locates a record quickly, and Replace updates many records at once.

Printing Finished Documents

To print a table, open it, choose File, Print, Print Preview to check the layout, set orientation and margins, then click Print. Tables often print poorly, so reports are usually used for printed output.

5.2 Generating Queries

A query asks the database a question and shows only the records and fields that answer it.

The original table is not changed, so the same data can be looked at in many ways.

Creating a Query

A query is a request for data that meets stated conditions. Choose Create, Query Design, add the table, and double-click the relevant fields to add them to the grid. In the Criteria row, type the condition, then click Run to see the results. For example, to list customers in Harare, add CustomerName, Town and Phone, and type "Harare" in the Criteria row under Town.

Using Criteria and Sorting

Criteria can use comparison operators, such as >2000 for credit limits above $2,000, Between 1/1/2026 And 31/3/2026 for a date range, **Like "M*" for names starting with M, and And or Or to combine conditions. The Sort row arranges the results in ascending or descending order. Untick Show for fields used only for criteria. Only the relevant fields** should be included, so the results are clear.

Saving and Printing Queries

Save the query with Ctrl + S and a meaningful name, such as 'qryHarareCustomers'. It then appears in the navigation pane and can be run again at any time, always showing up-to-date data. To print, open the query and choose File, Print, or use it as the source for a report.

5.3 Generating Reports

A report presents data from a table or query in a neat, printable format.

Reports can group, total and format data in ways that tables cannot.

Creating a Report

Select the table or query, then choose Create, Report for an instant report, or Report Wizard to choose the fields, grouping (such as by Town), sort order, summary options such as sums and averages, and layout. The report has a report header with the title, page header with column headings, a detail section with the records, and page and report footers with page numbers and totals. Layout View and Design View are used to adjust it.

Choosing the Orientation

Use portrait orientation for reports with a few narrow columns, such as a phone list, and landscape for reports with many columns, such as a full stock list. Set it under Page Setup, Landscape or in the Report Wizard, and check the Print Preview so that no columns spill onto a second page.

Printing Reports

Open the report in Print Preview, check the layout and the number of pages, adjust margins if needed, and click Print. Reports can also be exported to PDF using External Data, PDF or XPS, so they can be emailed. Because a report is linked to its table or query, printing it again later always shows the latest data.

All Business Computing and Digital Literacy learning outcomes

  1. Learning Outcome 1: Data Communication, Networks and the Internet
  2. Learning Outcome 2: Operating a Computer and Managing Files
  3. Learning Outcome 3: Word Processing
  4. Learning Outcome 4: Spreadsheets
  5. Learning Outcome 5: Databases
  6. Learning Outcome 6: Multimedia Presentations