You are on page 1of 16

Microsoft Access

Class XII
What is Datebase?
A database is a collection of ​information​ that is organized so that it can be easily accessed, managed
and updated. The collected information could be in any number of formats (electronic, printed,
graphic, audio, statistical, combinations). There are physical (paper/print) and electronic databases.
Benefits of using database?
● Data Sharing Is Improved In The Organization
● Improvement In Data Security
● Effective Data Integration
● Database Management Systems Minimize Data Inconsistency
● Increase In Productivity Of The End User
How could you personally benefit from using database?
● Better Access To Data
● Quick Decision Making
● For education, ​from elementary schools to colleges, educational institutions use databases to
keep track of students, grades, transfers, transcripts and other student data
● The database also has a role in household and family management
How could a company benefit from using database?
● The business world depends on databases 24 hours a day, seven days a week.
● Better Access To Data
● Each time you make a purchase and the sales clerk asks for your address or ZIP code, your
information is kept and stored on a customer database. These collections of data are used to
send mailings of special offers, discounts and other deals.
How many parts or object of database kindly define each?
1. List the names of the Tables in the database.
I. Customers
II. Events
2. List the name of Queries in the database.
I. Unconfirmed Events
II. Upcoming events
3. List the name of Forms in the database.
I. Customers
II. Events
4. List the name of Reports in the database.
I. Unconfirmed Events
II. Upcoming Events
1. File Tab
2. Quick Access Toolbar
3. Ribbon
4. Window Control
5. Navigation Pane
6. Navigation Buttons
7. Filter Indicator
8. Search Box
9. Document Pane
10. Document Tab
11. Status Bar
Objective: ​Student will be able to understand which fields with it’s suitable types.
Practical 1
1. Create a new database with the name of studentsinfo.
2. Define Grno as a Primary Key in Table.
3. Create table in design view follow given below details.
Fieldname Data type Description
Grno
Sname
Fname
Address
Phone
DOB
NIC

Print Screen
Objective: ​Student will be able to understand how to insert and delete field in table.
Practical 2
1. Reopen save file
2. Open table in design view
3. Add field DOA, Gender, Class, Email after Phone field
4. Delete field phone
5. Take a print of updated table
Fieldname Data type Description
Grno
Sname
Fname
Address

Phone
DOB
NIC

Print Screen
Practical 3
Objective: ​Student will be able to understand how to create more than one table in access.
1. Create a table with the name of FeeRecord
2. Follow practical 1 steps
Fieldname Data type Description
Grno
English
Urdu
Math
Science
SSt
Islamiyat
Computer
Practical 4
Objective: ​Student will be able to understand how to create relationship between two tables.
1. Create relationship between these tables with understanding

Practical 5
Objective: ​Student will be able to understand how to insert and delete records in table.
1. Run table and insert 25 records of students in both tables
2. Delete records which have Grno 105 and 120
Practical 6
Objective: ​Student will be able to understand how to search and sorting records of table.
1. Find and Replace record which have Grno 102 with updated information
2. Sort Sname in Ascending Order

Practical 7
Objective: ​Student will be able to understand how to search and sorting records of table.
1. Find and Replace record which have Grno 102 with updated information
2. Sort Sname in Ascending Order
Practical 8
Objective: ​Student will be able to understand how to apply query in access
1. Calculate the marks of students by the help of query.
2. Calculate the per% of students by the help of query.

Select, Action, Parameter and Aggregate:


Queries are very useful tools when it comes to databases and they are often called by the user
through a form. They can be used to search for and grab data from one or more of your tables,
perform certain actions on the database and even carryout a variety of calculations depending on
your needs.
Luckily for us, Microsoft Access allows for many types of queries, some of the main ones being select,
action, parameter and aggregate queries. They can be thought of as just another part of your
database – essentially an object like a table or a macro.
When it comes time to build a query for your database, you have two ways to go about creating it.
1. Either use the Query Wizard that Microsoft Access provides for you, or
2. Create your own queries from scratch.
Now for a closer look at the query types:
Select Query
The select query is the simplest type of query and because of that, it is also the most commonly used
one in Microsoft Access databases. It can be used to select and display data from either one table or a
series of them depending on what is needed.
In the end, it is the user-determined criteria that tells the database what the selection is to be based
on. After the select query is called, it creates a "virtual" table where the data can be changed, but at
no more than one record at a time.
Action Query
When the action query is called, the database undergoes a specific action depending on what was
specified in the query itself. This can include such things as creating new tables, deleting rows from
existing ones and updating records or creating entirely new ones.
Action queries are very popular in data management because they allow for many records to be
changed at one time instead of only single records like in a select query.
Four kinds of action queries are:
1. Append Query​ – takes the set results of a query and "appends" (or adds) them to an existing
table.
2. Delete Query​ – deletes all records in an underlying table from the set results of a query.
3. Make Table Query​ – as the name suggests, it creates a table based on the set results of a query.
4. Update Query​ – allows for one or more field in your table to be updated.
Parameter Query
In Microsoft Access, a parameter query works with other types of queries to get whatever results you
are after. This is because, when using this type of query, you are able to pass a parameter to a
different query, such as an action or a select query. It can either be a value or a condition and will
essentially tell the other query specifically what you want it to do.
It is often chosen because it allows for a dialog box where the end user can enter whatever parameter
value they wish each time the query is run. The parameter query is just a modified select query.
Aggregate Query
A special type of query is known as an ​aggregate query​. It can work on other queries (such as
selection, action or parameter) just like the parameter query does, but instead of passing a parameter
to another query it totals up the items by selected groups.
It essentially creates a summation of any selected attribute in your table. This can be further
generated into statistical amounts such as averages and standard deviation, just to name a couple.
The SQL aggregate functions available to Microsoft Access are:
▪ Sum
▪ Avg
▪ Min
▪ Max
▪ First
▪ Last
▪ Group By
▪ Count
▪ StDev
▪ Var
▪ Expression
▪ Where
Note - Queries don’t actually run while you are in datasheet mode, because it is essentially a preview
of the application.
Practical 9
Objective: ​Student will be able to understand how to create a form by using form wizard.
1. Use Studentinfo & FeeRecord table
2. Create a form by using form wizard option.

Practical 10
Objective: ​Student will be able to understand how to edit created form by using form in design view
1. Open form in design view and apply change color scheme of form.
Practical 11
Objective: ​Student will be able to understand how to create report.
1. Create report using query1 by wizard
2. Open it at design view and add header and footer

Practical 12
Objective: ​Student will be able to understand how to create report.
1. Create report using query1 by wizard
2. Open it at design view and add header and footer