🗃️ Databases

Databases & MS Access

⏱ 3 hr3 topicsInteractive
🎯 By the end: You can explain what a DBMS is, identify the Access objects and data types, create a table with a primary key, edit records, and set up a relationship between tables.

A database stores related information in an organised way so it can be searched and updated easily. A DBMS (Database Management System) like MS Access is the software that manages it. This chapter introduces databases and Access.

1Databases, DBMS & Access objects

Storing data in plain files (a flat file) causes problems as it grows — duplicated data, mistakes, hard to search. A DBMS solves these:

Flat fileDBMS (e.g. MS Access)
Data duplicated & inconsistentStored once, kept consistent
Hard to search/sortEasy queries & sorting
No central securityControlled access & backups

The four Access objects

ObjectUsed for
TableStores the actual data (rows & columns)
QueryAsks questions / extracts specific data
FormA friendly screen for entering data
ReportA formatted printout of data
Key points
  • A DBMS stores data once, keeps it consistent, and makes searching/sorting easy (unlike flat files).
  • MS Access has four objects: Tables (store data), Queries (ask questions), Forms (enter data), Reports (print data).
  • The Table is where the actual data lives; the others work with it.

2Data types, tables & the primary key

Each column (field) in a table has a data type:

Data typeHolds
Text / Short TextWords (name, city)
NumberNumbers for calculation
Memo / Long TextLong descriptions
Date/TimeDates and times
AutoNumberA unique number Access fills in automatically
Yes/NoTrue/false values

Creating a table

  • Design View — you define each field's name & data type first (the proper way).
  • Datasheet View — you type data straight into a grid.
A primary key is a field that uniquely identifies each record (like a roll number). It can't be blank or repeated — it stops duplicate records.
Key points
  • Access data types: Text, Number, Memo, Date/Time, AutoNumber, Yes/No.
  • Tables are made in Design View (define fields & types) or Datasheet View (type data in a grid).
  • A primary key uniquely identifies each record (no blanks, no duplicates).

3Records & relationships

A record is one complete row (one student's full details). You can add, edit and delete records in the datasheet.

Relationships between tables

The power of a relational database is linking tables. Two common relationship types:

RelationshipMeansExample
One-to-OneOne record links to exactly one record in the other tableOne person → one Aadhaar number
One-to-ManyOne record links to many records in the other tableOne class → many students
Relationships use keys: the primary key of one table appears in another (as a foreign key) to link them. This avoids storing the same data twice.
Key points
  • A record is one complete row; you can add, edit and delete records.
  • One-to-One links one record to exactly one other; One-to-Many links one record to many (one class → many students).
  • Relationships link tables using keys, so data isn't stored twice.

★ Practical: build a Student database

In MS Access (or any database tool):

  1. Create a Student table in Design View with fields Roll (Number), Name (Text), Class (Text), DOB (Date/Time).
  2. Set Roll as the primary key.
  3. Add five records, then edit one and delete one.
  4. Name a table that could have a One-to-Many relationship with Student.

Ready for the chapter test?

Answer 5 questions. Score 60% or more to mark this chapter complete.

Start the test →

💡 Log in to save your progress and earn the certificate.