Lesson 11 of 50 – Creating Tables in MS Access
22%

Creating Tables in MS Access

A table is one of the most important objects in Microsoft Access. It stores data in rows and columns. In this lesson, you will learn how to create tables, define fields, select data types, and enter records.

1. What Is a Table?

A table is a database object used to store related information. Each table contains fields and records.

  • Field: A column in a table.
  • Record: A row containing related values.
  • Cell: The intersection of a row and a column.

Example: Students Table

StudentID StudentName Course Mobile
101 Rahul Kumar ADCA 9876543210
102 Priya Kumari Tally Prime 9876543211
103 Amit Kumar Web Development 9876543212

In this example, StudentID, StudentName, Course, and Mobile are fields. Each student's information forms one record.

2. Methods of Creating Tables

You can create tables in different ways:

Method 1: Table

Use the Table command to create a table quickly and enter records in Datasheet View.

Method 2: Table Design

Use Table Design to define field names, data types, field properties, and primary keys before entering data.

Method 3: Import or Link External Data

Access can create or populate tables using supported external data sources, such as Excel files or text files.

3. Create a Table Using Datasheet View

  1. Open Microsoft Access.
  2. Open an existing database or create a blank database.
  3. Click the Create tab.
  4. Select Table.
  5. Access creates a new table in Datasheet View.
  6. Enter data into the available columns.
  7. Use Click to Add to add additional fields, where available.
  8. Save the table with a meaningful name, such as Students.

Access may assign a default field such as ID. You can rename fields and adjust the structure as needed.

4. Create a Table Using Design View

  1. Open your database.
  2. Click the Create tab.
  3. Select Table Design.
  4. Enter a field name in the Field Name column.
  5. Select a suitable Data Type.
  6. Add a description if required.
  7. Set a primary key where appropriate.
  8. Save the table as Students.

Example table design:

Field Name Data Type Purpose
StudentID AutoNumber Unique student identifier
StudentName Short Text Student's name
Mobile Short Text Mobile number
Course Short Text Course name
AdmissionDate Date/Time Date of admission

5. Understanding Field Names

A field name identifies the type of information stored in a column. Good field names make a database easier to understand and maintain.

Examples of Good Field Names
  • StudentID
  • StudentName
  • CourseName
  • AdmissionDate
  • FeesPaid
Tips for Naming Fields
  • Use clear and meaningful names.
  • Avoid duplicate field names within a table.
  • Avoid confusing names such as Field1 or Data2.
  • Use consistent naming conventions.
  • Avoid reserved words and unnecessary special characters.

6. Choosing the Correct Data Type

A data type determines what kind of value a field can store and which operations can be performed on that value.

Data Type Use Example
Short Text Names and short text values Rahul Kumar
Long Text Long descriptions or notes Student address details
Number Numeric values used in calculations Quantity
Date/Time Dates and times 11/10/2026
Currency Money values ₹5,000
AutoNumber Automatically generated unique values 101, 102, 103
Yes/No True/false values Paid: Yes
Hyperlink Web or other supported links https://example.com
Attachment Files attached to records Supporting document

Important: Mobile numbers should generally use Short Text, not Number, because they are identifiers and may contain leading zeros or a country code.

7. What Is a Primary Key?

A primary key is a field, or combination of fields, that uniquely identifies every record in a table.

Example

In a Students table, StudentID can be the primary key because each student has a different ID.

  • A primary key must contain unique values.
  • A primary key cannot contain Null values.
  • Only one primary key can be defined per table, although it may contain multiple fields.
How to Set a Primary Key
  1. Open the table in Design View.
  2. Select the field you want to use as the primary key.
  3. Click the Primary Key command on the Ribbon.
  4. Save the table.

8. Saving a Table

  1. Finish defining the table structure.
  2. Click Save or press Ctrl + S.
  3. Enter a meaningful table name.
  4. Click OK or confirm the save operation.
  5. Open the saved table from the Navigation Pane.

Use descriptive names such as Students, Courses, Employees, or Payments instead of generic names.

9. Common Mistakes While Creating Tables

  • Choosing the wrong data type.
  • Using unclear field names.
  • Forgetting to save the table.
  • Not setting a primary key when one is needed.
  • Storing several unrelated values in one field.
  • Using Number for phone numbers.
  • Creating duplicate records without a suitable unique identifier.

Plan the fields before creating a table. A good table structure makes queries, forms, and reports easier to build.

10. Practical Assignment

Create a Students table in Microsoft Access.

  1. Create a blank database named InstituteDB.
  2. Create a table using Table Design.
  3. Add StudentID with the AutoNumber data type.
  4. Set StudentID as the primary key.
  5. Add StudentName with Short Text.
  6. Add Mobile with Short Text.
  7. Add Course with Short Text.
  8. Add AdmissionDate with Date/Time.
  9. Save the table as Students.
  10. Enter at least five sample student records.
  11. Reopen the table and verify the records.

11. Revision Questions

  1. What is a table in MS Access?
  2. What is the difference between a field and a record?
  3. Write two methods of creating tables.
  4. What is Table Design used for?
  5. What is a data type?
  6. Which data type is suitable for a mobile number?
  7. What is a primary key?
  8. How do you save a table?
  9. Why should field names be meaningful?
  10. Write five common field names used in a student database.

🧠 Quick Quiz

1. What does a row in a table represent?




2. Which data type is generally suitable for a mobile number?




3. What is the main purpose of a primary key?