MICROSOFT ACCESS NOTES
MICROSOFT ACCESS NOTES
Microsoft Access is a relational database management system (RDBMS) that is part of the
Microsoft Office suite. It enables you to build database applications by combining data storage
(tables) with user-friendly objects like forms and reports. Access’s integrated environment
allows even beginners to create powerful applications without the overhead of a full client-server
system.
Databases are structured repositories of data designed to support efficient data storage and
retrieval. Unlike spreadsheets, which are ideal for ad hoc analysis, an RDBMS like Access stores
data in a normalized, interconnected manner. This setup minimizes redundancy and ensures that
updates occur in a single place, automatically propagating to related data.
Types of Databases
1. Relational Databases (RDBMS) – Stores data in structured tables with rows and
columns. Uses SQL. (e.g., MySQL, PostgreSQL, Oracle, SQL Server)
2. NoSQL Databases – Designed for unstructured or semi-structured data, allowing
flexibility in storage. (e.g., MongoDB, Cassandra, Redis)
3. Hierarchical Databases – Organizes data in a tree-like structure with parent-child
relationships. (e.g., IBM Information Management System - IMS)
Access is better suited for projects that require robust data management and relational integrity,
while Excel excels (no pun intended) at flexible, ad hoc analysis.
4. Advantages and Disadvantages: Access vs. Excel
Learning Curve:
• More complex than Excel; designing relationships and writing SQL or VBA requires
training.
Scalability Limitations:
• As a file-based system, Access is best for small to medium projects and may struggle
with high concurrency.
Limited Data Visualization:
• Compared to Excel, its charting and graphical capabilities are less advanced.
Excel’s Role:
Excel is advantageous for:
Ensure that Access is installed (as part of Microsoft Office 365 or Office Professional). To
launch:
The Ribbon: Groups commands into tabs such as Home, Create, External Data, and
Database Tools.
Navigation Pane: Displays all objects (tables, queries, forms, etc.) for easy access.
Datasheet and Design Views: Datasheet view lets you enter and view data like a
spreadsheet, while Design view is used for configuring object structure.
Status Bar: Offers quick details (e.g., record counts, view modes).
From a Template: Quickly set up common database types (contacts, inventory, etc.).
Blank Database: Start with a clean slate by choosing “Blank Database” and naming your
file (typically saved with an .accdb extension).
Tables are the foundation of any Access database. When designing tables:
Define Fields: Assign clear names and select appropriate data types (e.g., Short Text for
names, Number for quantities).
Set Primary Keys: Ensure each record is uniquely identified (often using an
AutoNumber field).
Plan Your Structure: Sketch your tables on paper first to map out the relationships and
ensure minimal redundancy.
Normalization: Organize data into multiple related tables so that each piece of data is
stored only once.
Advantages: Reduces storage needs, minimizes inconsistencies, and simplifies updates.
Example: Instead of storing a customer’s address in every order record, store it once in a
Customers table and link orders via a CustomerID.
It occurs when the same piece of information is stored multiple times, leading to inefficiency,
increased storage usage, and potential inconsistencies.
Example of Redundancy
🔴 Problem: The department location is repeated for every employee in the same department.
Employees Table
Employee ID Name Department ID
Departments Table
Department ID Department Location
✅ Benefits of Normalization:
Referential integrity is a key feature of relational databases that ensures the relationships
between tables remain consistent.
Definition: When a table includes a foreign key (a field that links to a primary key in
another table), referential integrity ensures that every foreign key value matches an
existing primary key value.
Benefits: Prevents orphan records (e.g., an order without a valid customer) and ensures
that updates or deletions are consistently applied across related tables.
Implementation: In Access, you enforce referential integrity in the Relationships
window by checking the “Enforce Referential Integrity” box when establishing links.
Data entry can be done directly in Datasheet view, which resembles a spreadsheet, or via custom
forms:
Join Tables: Use the Relationships window to drag and drop fields (usually primary and
foreign keys) between tables.
Types of Joins: Inner joins (only matching records) or outer joins (all records from one
table, with matching records from another).
Maintaining Integrity: Combine with referential integrity rules to automatically update
or prevent deletion of related records.
Once you master basic queries, you can explore more advanced topics:
Forms are the interface for users to interact with your database:
Form Creation: Use the Form Wizard for a quick start or design your own in Design
view.
Controls: Add text boxes, drop-down lists, and buttons for navigation and actions.
Validation: Embed validation rules to ensure correct data is entered.
17. Creating and Customizing Reports
Report Wizard: A step-by-step tool for generating reports based on tables or queries.
Design View: Customize layouts, add headers/footers, and adjust grouping and sorting
options.
Use Cases: Useful for creating invoices, summaries, and dashboards that compile data
from multiple sources.
Macros: Use the Macro Builder to automate routine tasks such as opening forms,
running queries, or navigating records.
VBA: For more complex tasks, the Visual Basic for Applications editor lets you write
custom code to handle events and processes beyond macro capabilities.
Import Data: Bring in data from Excel, text files, XML, or SharePoint using the
External Data tab.
Export Data: Send data from Access to Excel or other formats for further analysis or
reporting.
Linking Data: Instead of importing, you can link to external data sources so that the data
remains current.
Compact & Repair: Regularly optimize your database to prevent file bloat and maintain
performance.
Backups: Frequently back up your database, especially before major changes.
Splitting the Database: For multi-user environments, split the database into a back-end
(tables) and a front-end (forms, queries, reports) to improve performance and security.
Suitable Use Cases: