Microsoft Access uses different database objects to store, retrieve, enter, and present information. The four main objects are Tables, Queries, Forms, and Reports. Access also supports macros and modules for automation and programming.
Database objects are the components used to organize, manage, and work with information in a database.
For example, a student management database can use tables to store student details, queries to search for students, forms to enter information, and reports to print fee records.
Macros and modules can also be used to automate tasks and add programming functionality.
A table stores data in rows and columns. Each row is a record, and each column is a field.
| StudentID | Name | Course | Fees |
|---|---|---|---|
| 101 | Rahul | ADCA | 10000 |
| 102 | Priya | Tally Prime | 4000 |
| 103 | Amit | Web Development | 12000 |
Example: A Students table stores student IDs, names, courses, and other student information.
A query retrieves, filters, sorts, calculates, or modifies data according to specified conditions.
Examples:
Queries can use data from one or more related tables.
A form provides a convenient interface for entering, viewing, and editing database records.
Examples of forms:
Forms can include text boxes, buttons, drop-down lists, labels, and other controls.
A report presents database information in a structured format suitable for viewing or printing.
Examples of reports:
Reports can organize information using headings, grouping, sorting, and calculated totals.
A macro is an Access object that can automate certain tasks without requiring you to write a complete VBA program.
Examples:
The actions available depend on the macro type and the database environment.
Modules contain Visual Basic for Applications (VBA) code used to build more advanced database functionality.
VBA can help automate tasks, validate information, respond to events, and perform custom calculations.
Modules are useful when built-in Access features and macros do not meet all the application's requirements.
| Object | Main Purpose | Example |
|---|---|---|
| Table | Stores data | Students |
| Query | Retrieves or processes data | Pending Fees |
| Form | Provides an interface for working with records | Admission Form |
| Report | Formats information for presentation | Fee Report |
| Macro | Automates tasks | Open a Form |
| Module | Contains VBA code | Custom Validation |
Database objects often work together to complete a task. For example, a student management system may work as follows:
Imagine you are creating a database for a computer institute. You could create these objects:
Task: Identify the database objects you would use.
Question 1: Which object stores data in rows and columns?
Question 2: Which object presents information in a formatted layout?
Question 3: Which object can automate tasks using built-in actions?