MS Access Lecture 03
MS Access Lecture 03
MS Access Lecture 03
Topic : Query
Apply and Run Query
Introduction to MS Access
Database: arrangement of data to retrieve
and understand easily.
Viewing information
Terminology
◦ Database
◦ Database Management system
◦ Table
◦ Record
◦ Field
Pages 20 and 21
Database Objects
Table: stores data in the form of columns and
rows
Query: uses to filter and sorting out the data
Forms: Customize screen to view data
Reports: Table ,query or Form in a printable
way.
MS Access Window
Page No 26 and 27 to be
read
MS Access 2007
Starting MS Access
Creating Database : Two ways
◦ Using a template
◦ Using blank Database
Pages 23 and 24 to be read
Data Type used in MS Access
Page 27 to be read
Text: stores alphanumeric Product ID: iuy789
numbers. Address: H.no A-90 survey 478
Maximum 255 Character Karachi
Auto Number: stores integer S.No
Generates automatically ID numbers
Increasing and decreasing order
Memo: For lengthy and details text Definition, description notes
Page 27
Primary key
Primary key is a field in a table which
uniquely identifies each row/record in a
database table.
Primary keys must contain unique values.
A table can have only one primary key, which
Tab: Design
Group: Tools
Option: Primary key
How to Choose a Primary Key
Good primary keys are usually short and
include all numbers.
Avoid using special characters or a
Page 39
To raise a query
Click on
create tab
Click on design
query option
Click on add
option
Click on add
option
Design
Grid
Result
MS Access Practical
Task to be performed
Open Blank database
Choose name of the database
Open Datasheet view
Create 7 fields
Field name ( S.no, EmpID, Name, Office Area, Salary,
Joining date , Email ID)
Set data type
Apply primary key
Enter 10 records
Design and run Query ( Salary, Area, EmpID)
Save the table and query