Class 7 - MS ACCESS
Class 7 - MS ACCESS
1. What is a Database?
Definition:
A database is a collection of organized data that can be easily accessed,
managed, and updated. In simple terms, it is like an electronic filing system
where information is stored in a structured manner for easy retrieval.
Components of a Database:
o Tables: A database is made up of tables. Each table contains rows
(records) and columns (fields).
o Fields: These are the columns in a table, each representing a specific
type of data (e.g., Name, Age, Address).
o Records: These are the rows in a table, each representing a single entry
of data (e.g., an individual’s details).
2. Uses of a Database
Storing Information:
Databases are used to store large amounts of information like customer details,
student records, or inventory items.
Organizing Data:
A database helps in organizing data in a way that makes it easy to retrieve,
update, or delete.
Search and Retrieval:
You can easily search for specific data in a database. For example, you can find
all records related to a particular student or customer quickly.
Data Management:
Databases allow you to perform operations like adding new records, modifying
existing records, and removing records.
Security and Backup:
Databases provide ways to secure the data and ensure that it is regularly backed
up, protecting against data loss.
o After creating your database and adding data, save it by clicking on "File"
> "Save".
o You can also save the database with a new name or in a different location
by choosing "Save As".
4. Primary Key
1. When creating a table in Access, choose a field (e.g., StudentID) that will
contain unique values.
2. Right-click the field and select "Primary Key" to make it the primary key.
3. Once set, MS Access will automatically ensure that no two records in this
field have the same value.
5. Querying a Database
What is a Query?
o A Query is a request for data or information from a database. It allows you
to search, filter, and manipulate data in various ways to get the results you
need.
Types of Queries:
o Select Query: Retrieves data from one or more tables. For example, you
can create a query to find all students who have scored more than 80
marks.
o Update Query: Allows you to update existing records in a table. For
example, updating the phone number of a contact.
o Delete Query: Deletes specific records from a table. For example,
deleting records of students who have left the school.
o Append Query: Adds new records to a table from another table.
How to Create a Query in MS Access:
Conclusion:
Quick Tip: Always choose a Primary Key that contains unique values for each record
to ensure the integrity of your data!