0% found this document useful (0 votes)
251 views72 pages

Data Manipulation-MS Access

The document provides information about databases and importing data into Microsoft Access. It defines what a database is and compares paper-based and computer-based databases. Computer-based databases have advantages like being able to easily search, sort, edit and generate reports from vast amounts of stored data. The key concepts of tables, fields, records and data types are explained. Steps for importing a CSV file into Access are outlined, emphasizing the importance of checking data types and formats match the imported data.

Uploaded by

jamshidha 123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
251 views72 pages

Data Manipulation-MS Access

The document provides information about databases and importing data into Microsoft Access. It defines what a database is and compares paper-based and computer-based databases. Computer-based databases have advantages like being able to easily search, sort, edit and generate reports from vast amounts of stored data. The key concepts of tables, fields, records and data types are explained. Steps for importing a CSV file into Access are outlined, emphasizing the importance of checking data types and formats match the imported data.

Uploaded by

jamshidha 123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 72

Learning Objective : To learn the basic concepts of

databases using MS-Access

Databases-MS Access

Keywords :
Database, File, Table, Field, Record

Success Criteria
-To understand what a database is.

-To learn some of the key words associated with the databases.

-To be able to analyse the advantages of Database systems.


https://edu.gcfglobal.org/en/access/introducti
on-to-databases/1/
Examples of Databases
FIELDS
FIELDS
Records
Fields and Records
Tables
Let us Summarise….
5 mins
Plenary:
Attempt the quiz and self evaluate on what you have learnt
today

https://wordwall.net/play/27085/429/207
ICT IGCSE
Databases (Access)
A database is a collection of data or information stored in a logical format.
Chapter 18: Data Manipulation (Access)

Paper Based Database:


• Before computer based databases became available data would be kept on
paper and stored in filing cabinets.
• A typical example would be a doctors surgery use of a paper based
database. Each patient would have their information stored in a folder
which would be kept in a filing cabinet.
Disadvantages:
• Difficult to search and sort information.
• Takes up physical storage place.
• Difficult to make copies or edit data.

Computer Based Database:


• Allows for information to be organized in such a way that a computer
program can quickly select specific pieces of data.
• An example of a Database package is Microsoft Access.
• A computer base database is made up of tables, records and fields.
Advantages:
• Using specific criteria data can be easily found.
• Requires no physical storage space and can contain vast amount of
data.
• Easier to edit and create copies of data.
• Reports can be easily generated based on specific records.
WWW.YAHMAD.CO.UK
ICT IGCSE
Databases (Access)
Database Structure - Table Table:
• A table in database will be created to store
Chapter 18: Data Manipulation (Access)

specific pieces of data (A number of records).


• First of all the suitable field names will have to
be created.
• Fields will contain specific data for a record.
Fields:
Contain Example:
specific Data • A customer sales database will contain many
data records.
Types
for • Each customer in the database will be know
each as a record.
record • Fields wills store specific data for each
customer (e.g. Customer Name).

Data Types:
• Will contain specific types of data for each field.
Creating a Table: • Once the data type has been selected then only that
View >> Design View specific type of data can be entered into that field.
• Example: Data and Time will only allow for a data to
be entered.

WWW.YAHMAD.CO.UK
ICT IGCSE
Databases (Access)
Database Structure: Data Types, Fields & Records
Chapter 18: Data Manipulation (Access)

Fields: Contain specific data for each record

Each Movie is a record in


this table.

6 Records Shown

WWW.YAHMAD.CO.UK
ICT IGCSE
Databases (Access)
In a typical database exam question you will be asked to import a CSV file into a suitable
database package (Microsoft Access).
Chapter 18: Data Manipulation (Access)

Tip:

Double check the data types.


They have to be correct or you
may get import errors.

Primary Key: This will be the unique field for each record. The VIN will be
the primary key as each car will have a unique VIN.

WWW.YAHMAD.CO.UK
ICT IGCSE
Databases (Access)
Importing CSV Tip: Always check the currency and the format
of the date.
£ - Pounds
Chapter 18: Data Manipulation (Access)

01-Jan-2016

Tip: Always check data types when importing CSV File. If you do not then you run the risk of
getting import errors.

Tip: If it asks for decimal places Tip: You can then format the number in design view. If a
then during the import leave the number is not showing to a certain decimal value then
data type as double. you can set the format to standard.
ICT IGCSE
Databases (Access)
Importing CSV
Chapter 18: Data Manipulation (Access)

1) Click on External Data Tab and select Text File.


2) Browse and Select the CSV File.
3) Click OK
4) Click on Advanced and check the format of the date so it is set to DMY. Then click Ok and Next.

WWW.YAHMAD.CO.UK
ICT IGCSE
Databases (Access)
Importing CSV 5) Click on First Row Contains Field
Names and then click on advanced.
Chapter 18: Data Manipulation (Access)

6)Double check all the data types.


You would normally always have to
5 change the Boolean field.

7)Select the Primary Key or let


6 Access choose. If you have a unique
data for each record in a field then
select this as your primary key.

8)Click on Next then Finnish to


import the CSV file.
7

8
ICT IGCSE
Databases (Access)
In this exam question you have to first create the table 1
(Including Fields & Data Types) and then import the CSV file.
2
Chapter 18: Data Manipulation (Access)

When importing
the CSV file you
have to append a
copy of the records
to the table you
created.

WWW.YAHMAD.CO.UK
ICT IGCSE
Databases (Access)
Print Screen Evidence
Chapter 18: Data Manipulation (Access)

Tip: When you print screen your data types ensure you also show the formats.
Don’t crop the bottom part off.

WWW.YAHMAD.CO.UK
ICT IGCSE
Databases (Access)
Formatting
Chapter 18: Data Manipulation (Access)

Euro

Dollar

Pound
WWW.YAHMAD.CO.UK
Activity 11.1

15mins
ICT IGCSE
Databases (Access)
Relationship Database
Chapter 18: Data Manipulation (Access)

A 'relational' database is one that


contains two or more tables of data,
connected by key fields.

Teacher Students The 'One' side is usually the primary key


(Primary Key) (Foreign Key)
The 'Many' side is usually the foreign key

A relational database has more than one table and the tables are linked using key fields.
Advantages:
• Teacher details only need to be entered once into the database.
• Mistakes are less likely to happen when entering data if it already exists.
• Avoids duplicating data.
• Data can be accessed using key fields (Primary and Foreign Keys).
• Queries and reports can be created using data (fields) from a number of tables which
have a
relationship.
WWW.YAHMAD.CO.UK
ICT IGCSE
Databases (Access)
Relationship Database
Chapter 18: Data Manipulation (Access)

Click the Enforce Referential Integrity.


Ensures no orphan records.

Tip: The same


data should
appear in both
fields

WWW.YAHMAD.CO.UK
ICT IGCSE
Databases (Access)
Relationship Database
Chapter 18: Data Manipulation (Access)

There are
more books

WWW.YAHMAD.CO.UK
ICT IGCSE
Databases (Access)
Relationship Database
Chapter 18: Data Manipulation (Access)

1 2

3 4 1) Close the tables


2) Click on Database Tools
>> Relationships
3) Link the Key Fields
4) Select Inforce
Referential integrity and
click ok.
ICT IGCSE
Databases (Access)

You will be asked to either add, edit or delete


1 data. In this example you are asked to update
Chapter 18: Data Manipulation (Access)

3 records.
The best way to update an existing record is to
use the filter tool and search by the Primary
2 Key (VIN).
1) Select the VIN Field >> Text Filters >>
Equals.
2) Type in the Primary Key (377C15423003)
and press Ok.
3 3) Update the record according to the
details
on the exam paper.
Discount Applied: 10
Date Sold: 06/05/2012
Sales Person: Algier
4 Sold: Yes

4) Clear the text filter and repeat the same


process with the next two records.

WWW.YAHMAD.CO.UK
Starter Task:
5mins

• Import any of the csv files(Customer,


student, teacher, order etc.) to your access
database and get ready to learn DATABASE
QUERY
Lesson Objectives:

• Be able to search and select data in Access


database.
• Be able to understand different search
criteria.
• Be able to perform searches using Single
Query .
• Be able to perform multiple Query from
one table.
Manipulate Data: How to perform
searches using DATABASE QUERY

• You can search for data in Access


using a Query.

• Each Query is created, saved and


can be used again later.
• How to search and select data –
Simple Query Wizard
Task2:
5 mins

• Create a simple query using any


one of the table imported.
• Place screenshot in ‘Simple Query-
Task2’ Assignment in Google
Classroom
Be able to understand different
search criteria
Task3:Word Wall 5 mins

• https://
wordwall.net/resource/27385377
Search Criteria - Database Queries Quick Fire Questions
Search Criteria - Database Queries Quick Fire Questions
Task3: 7 mins

• Make your own search criteria-Simple


Query and Multiple Query(In
pairs).Post your Query in Padlet wall
• The other group will place screenshots
in Padlet wall
• https://
padlet.com/jomcyjohn1/l2qgsl0psatyo
pb1
Past Paper Question Completion

Pages 367-371 Tasks 18a,18b,18c,18d

Introduction to Data Entry Form


ICT IGCSE
Databases (Access)
DATA ENTRY FORMS
A Data entry form is used to enter new records into a database table. The form is a more user
friendly way to enter new records.

On-screen forms should:


• Appropriate spacing for each field.
• Screen filled/not too much white space.
• Clearly defined input area for each field.
• An easy to read font/font size.
• A sensible font colour/background colour.
• Drop down lists and tick boxes.
• No overlapping of items.
• Navigation aids
Tick boxes/radio buttons Drop down lists to
to enter choices choose an option Buttons:
• Go forward or
backwards
• Add, Save and
delete records

WWW.YAHMAD.CO.UK
ICT IGCSE
Databases (Access)
DATA ENTRY FORMS
Create Drop Down Menu

1. Go to Design View 3. Select I will type in the values that I want.

4. Type in the values for the drop


down list.

2. Select Lookup Wizard for the field


you would like to add the drop down
to.
5. Select Limit to List
ICT IGCSE
Databases (Access)
DATA ENTRY FORMS
Drop Down Menu Evidence

Evidence 1:
Limit to List Box Ticked

Evidence 2: Evidence 3:
Print screen of LOOKUP Dropdown Menu

Evidence of
Validation

WWW.YAHMAD.CO.UK
ICT IGCSE
Databases (Access)
DATA ENTRY FORMS
Create Data Entry Form 1. Go to Create >> Form Wizard
Chapter 18: Data Manipulation (Access)

2. Select the correct table and then all fields. 3. Click on Next >> Finish

Table Include suitable name

Fields

WWW.YAHMAD.CO.UK
ICT IGCSE
Databases (Access)
DATA ENTRY FORMS
Create Data Entry Form Navigation Options
Chapter 18: Data Manipulation (Access)

In design view
you can format
the appearance
of the Form.

You can also add


navigation aids
(buttons)

WWW.YAHMAD.CO.UK
ICT IGCSE
DATA ENTRY FORMS
Databases (Access)
When you are in Form View you can add or navigate through the existing records using the buttons. In
the exam you could be instructed to add a new record using the form.

Evidence:
You could be asked to print screen
the form showing the new record
has been added.

WWW.YAHMAD.CO.UK
Lesson Objectives

• What are reports and how it can be


generated in MS Access
• Reports from single table(Create Report
Option)
• Reports from Multiple Tables using (Report
Wizard)
DATABASE REPORTS

• Reports are documents that gives


information about an investigation or a
piece of research.

• If you want to present the data to some


others, MS Access allows to make
professional reports.
ICT IGCSE
Databases (Access)
Tip: When you are creating a report ensure you have identified all query and reports
tasks.
Chapter 18: Data Manipulation (Access)

Search Criteria: When creating the query only


select the fields stated.
However you may have to insert additional
fields later to complete your search. These
fields must not be shown.

Report Title: Name the query as the report


title.

Query Report
• Selecting Fields • Sort
• Search criteria • Page orientation
• Calculated run-time field + formatting • Report header/footer
• Calculation (Count, Sum, Max & Min)
• Labels for formulas
• Show labels in full

WWW.YAHMAD.CO.UK
ICT IGCSE
Databases (Access)
Annotating Exam Paper
Chapter 18: Data Manipulation (Access)

1) Write the Run Time Formula


2) Identify the search criteria
3) Identify Keywords
WWW.YAHMAD.CO.UK
ICT IGCSE
Databases (Access)
Query Task 1: Select Fields
Chapter 18: Data Manipulation (Access)

1. Create >> Query Wizard


2. Select Fields
1. You may select fields from
different tables in a
relationship database.

WWW.YAHMAD.CO.UK
ICT IGCSE
Databases (Access)
Query Task 2: Name your Query as the Report Title.
Chapter 18: Data Manipulation (Access)

Flat File Database: Query name will


automatically appear at the top of the report.

Relationship Database: Report title will


have to be re-entered in report wizard.

WWW.YAHMAD.CO.UK
ICT IGCSE
Databases (Access)
Query Task: Search Criteria
Chapter 18: Data Manipulation (Access)

Build_ Year: >31/12/2010 or >=01/01/2011


Length: <=40

Type: Water, Residential: Yes


Duration: <=12
Location: Not “Scotland”

WWW.YAHMAD.CO.UK
ICT IGCSE
Databases (Access)
Query – Search Criteria Tip: You can search
by a field and
Tip: Extend the
Chapter 18: Data Manipulation (Access)

then hide it.


tables just in case
Before hiding it
you may need to
check to see if the
select and use
search criteria has
another field.
worked.

Tip: Always check the number of records after


you have typed in one search criteria.
The number of records should reduce every time
you type in a search criteria.

WWW.YAHMAD.CO.UK
ICT IGCSE
Databases (Access)
Query – Search Criteria
Wild Card – Sometimes a field may contain more than
Chapter 18: Data Manipulation (Access)

one word. To find something specific you need to write a


wildcard search.

Like “*Channing Tatum *”


Between Between 01/01/2010 And 02/02/2012
Between 100 And 150
Or North Sea Or Irish Sea
Not Not “Horror”
<90 Less than <90
>90 More than >90
>=90 More than and equal to >=90
37* Fields starts with 37
Only field containing
*37 Fields Ends with 37 Channing Tatum are
shown
WWW.YAHMAD.CO.UK
ICT IGCSE
Databases (Access)
Calculated Run Time Formulas in the Query
Chapter 18: Data Manipulation (Access)

Calculated Run time is used when we have to calculate specific values Enter New Calculated
using data from existing fields. Run Time Field here

New Stock Level:[Current Stock]+5 Number of


Books Added
Name of new Required Field in to Stock
field Square Brackets

In Design View using


the Property Sheet
the formatting can be
set for the new field.
WWW.YAHMAD.CO.UK
ICT IGCSE
Databases (Access)
Calculated Run Time Formulas in the Query
Chapter 18: Data Manipulation (Access)

Total_Berths:[Sleeps]+[Crew]

Daily_Cost:[Course_Cost]/[Duration]

Delivered_Price:[Cost_Price]+200

WWW.YAHMAD.CO.UK
ICT IGCSE
Databases (Access)
Report – Sort & Page Orientation
Chapter 18: Data Manipulation (Access)

Remember to put the fields in Report Wizard:


to the correct order after the • If there are two sorts in the report
SORT. then you would do it in the report
wizard.
• You can also set the page orientation in the
report wizard.
WWW.YAHMAD.CO.UK
ICT IGCSE
Databases (Access)
Report – Show Labels and fit to a single page wide
Chapter 18: Data Manipulation (Access)

1) Make sure Report title is the same as the Report Header


2) Format the report in Layout View making sure al field names and data is visible.

Page Footer/Header: Report Footer/Header:


Anything information Anything information
will appear each printed will appear on only the
page either in the first (header) or last
(header) or (footer) of page (footer) of the
the report. report.

WWW.YAHMAD.CO.UK
ICT IGCSE
Databases (Access)
Report – Show Labels and fit to a single page wide
Chapter 18: Data Manipulation (Access)

• In layout view adjust the column widths to ensure all data


is shown.
• Press Shift to select the Field Name and Data so you can
adjust both pieces of data at the same time.

WWW.YAHMAD.CO.UK
ICT IGCSE
Databases (Access)
Formulas in the Report
Chapter 18: Data Manipulation (Access)

We can use a number of formula in the report to calculate


values from fields including: Sum, Average, Count, Max, Min
etc. You need to ensure you are in layout view.

Function Tool

Selected
Fields

In Design View you can add a label for your


calculation. Make sue formula is in Report footer.
ICT IGCSE
Databases (Access)
Formulas in the Report
Chapter 18: Data Manipulation (Access)

In Design View you can also add your candidate details.


ICT IGCSE
Databases (Access)
Labels Create the query first for your
labels using the specified fields
and search criteria.
Chapter 18: Data Manipulation (Access)

1. Select the labels icon.


2.Select the dimensions and
the number across (2).
3.Write in the heading, Field
names and select the field
data.
4.In design view can you
format the label.

3 4
1

Field Names are displayed


ICT IGCSE
Databases (Access)
Labels 2016 March
Chapter 18: Data Manipulation (Access)

Search Criteria

*engineer* Field is hidden

20 records found
ICT IGCSE
Databases (Access)
Labels 2016 March
Chapter 18: Data Manipulation (Access)

No fields
names are
displayed

WWW.YAHMAD.CO.UK
ICT IGCSE
Databases (Access)
Labels 2016 March
Chapter 18: Data Manipulation (Access)

Adjust the label


size to ensure you
fit 8 labels per
page
WWW.YAHMAD.CO.UK
ICT IGCSE
Databases (Access)
Summery Query 4
Chapter 18: Data Manipulation (Access)

You can also enter search criteria


into the summery query

On most occasions a summery


query will ask for calculation
and a count. One of the fields
1 3 will contain numerical values
which can be calculated.

Calculate Total Value of records

2 Count

Number of Records
ICT IGCSE
Databases (Access)
Extracting Data
Tip: To extract a query
or report you have to
Chapter 18: Data Manipulation (Access)

right click and select the


export option.
You may be required to
export into Excel to
create a graph.
……few
EXAM TIPS…..
DATABASE FORMS

You might also like