Unit 3: Tables and Data Types

1. What is a Data Type?

A data type defines the kind of data that can be stored in a field.

For example: - A student's name contains text. - A student's date of birth contains a date. - A student's marks contain a number.

Therefore, we should select the correct data type for each field.

2. What are the Common Data Types in MS Access?

Data Type Use Example
Short Text Stores text and numbers that are treated as text. Even if numbers are entered in a text field, they are treated as text. Rahul, Ranchi, 9999999999
Number Stores numerical values. 10, 85, 2500
Date/Time Stores dates and times. 15/08/2011, 10:30 AM
Currency Stores monetary values. Currency is useful for Fees, Salary, Price, Expenses, etc. ₹2500
AutoNumber Automatically generates unique numbers whenever a new record is added. 1, 2, 3, 4
Yes/No Stores two possible values. Yes/No

NB: Choose the correct data type according to the type of information stored in the field.

3. What is Design View?

Design View is used to create or modify the structure of a table.

In Design View, we specify: - Field Name - Data Type - Description - Set various Field Properties

4. How to create a Table in Design View?

NB: We will study Primary Key in greater detail in Unit 4.

5. What are Field Properties?

Field properties appear in the lower part of the Table Design View. They control how data is stored, displayed, or entered in a field.

Property Use
Field Size Defines the maximum number of characters or digits that can be stored in a field. (1 to 255)
Format Controls how data appears when displayed or printed. For example, dates can be displayed in different formats.
Input Mask Provides a pattern for data entry to ensure consistency.
Caption Sets an alternate name for the field label shown in forms or reports instead of the field name.
Example: Field Name: Student_Name → Caption: Student Name
Default Value Automatically inserts a preset value when a new record is created.
Example: Country = India
Validation Rule Specifies a condition that the entered data must satisfy.
Example: >= 0
Validation Text Displays a custom message when data violates the validation rule.
Required When set to Yes, a value must be entered in the field.
Allow Zero Length Permits empty strings (Yes/No).

6. Why should a Table be given a meaningful name?

Meaningful names such as Students, Teachers, Fees, etc. make the database easier to understand and manage.

We must avoid names such as Table1, Table2, etc.