The document provides an overview of database management systems and Microsoft Access. It defines a DBMS as software that defines, manipulates, retrieves and manages data in a database. It discusses the key concepts of tables, queries, forms and reports. It explains how Access is used to create, open and manage database objects like tables and queries. It provides guidance on setting up a new blank Access database and creating tables by defining fields and setting field properties.
3. CONCEPT
OVERVIEW
Every organization maintains
data pertaining to its business,
activities, employees and other
related information.
This data needs to be maintained in
such a manner that it can be readily
available and can be presented easily
in desired formats. The data also
needs to be updated regularly.
Earlier this was done manually by
maintaining records in various files.
However, in this one problem arose,
i.e., if an information was to be
updated, it had to be done separately
in all the related files.
Therefore, the need arose for
having such a data collection
system where control of
information was centralized. This
led to the designing of databases.
4. DATA AND INFORMATION
DATA
• Data is the plural form of the word
“datum” which refers to a collection of raw
facts.
• Therefore, data are the raw materials of
information processing.
5. DATA AND INFORMATION
INFORMATION
• Once the data is manipulated and processed
according to the certain requirements, they form a
desired output with some purpose.
• These resultant facts are known as information.
• Therefore, information is the most critical resource
of an organization. Data becomes information when
you understand what it means.
Data
Processing
Information
6. ELECTRONIC DATABASE
•Definition:
Electronic database refers to an organized collection of
data stored on a computer in such a way that it’s contents
(data) can easily be accessed, updated and queried upon
with the help of a software program.
8. TABLE: THE
BUILDING BLOCKS
OF DATABASE
Table is the basic element of
the database.
Table is a set of information
about a particular subject.
Table has records in it, each related to the
subject of the table.
Each record is made up of fields, which
contain specific information about the thing
in record represents.
10. DATABASE MANAGEMENT SYSTEM
Database management
system helps to maintain a
centralized control over the
data. It involves creating,
modifying, deleting and
adding data in files.
The software that allows you
to perform these functions is
known as database
management system DBMS
software. Some popular
DBMS software are
Microsoft Access, Microsoft
SQL server and Oracle.
Database management
system can be defined as a
collection of programs that
enables you to store, modify
and extract information from
a database.
11. WORKING OF DATABASE MANAGEMENT SYSTEM
•DBMS provides a centralized control over data. A database system maintains a
centralized database, i.e. all the data kept at one place and any application that
requires the data can access it from this central location. Any application can
share data from the central location. Though sometimes it may be necessary to
duplicate the data i.e.com intern multiple copies of the data, the redundancy can
be controlled as the DBMS is aware of the multiple copies and updates them
regularly.
12. Central Location
Data File
Data File
Data File
USER
USER
DBMS
Application
Prog-1
Application
Prog-1
How Database Management System Works?
13. ADVANTAGES
OF DBMS
Provides in organized way of storing
data
Facilitates quick and efficient retrieval
of information
Reduces data redundancy
Improves the consistency of data
Allows sharing of data
14. RELATIONAL DATABASE MANAGEMENT SYSTEM
• A relational database is a special type of database where data is stored in
several separate but linked tables.
• The software system which is used to create, maintain and query a relational
database is called relational database management system.
Some popular dbms software are Microsoft access, Microsoft sql server 7.0, oracle
7.0, etc.
15. THE FOUR BASIC OBJECTS OF RDBMS ARE:
1. TABLE
•A Table is an object which stores data in Row & Column format to
store data.
•A Table is usually related to other tables in the database file.
•Each column must have Unique name
•We can also define Primary Key in a table.
16. 2. QUERY
• Queries answer a question by selecting and sorting and filtering data based on search criteria.
• Queries show a selection of data based on criteria (limitations) you provide.
• Queries can pull from one or more related Tables and other Queries.
• Types of Query can be SELECT, INSERT, UPDATE, DELETE.
3. FORM
• A form is a database object that you can use to create a user interface for a database
application.
• Forms help you to display live data from the table. It mainly used to ease the process
of data entry or editing.
17. 4. REPORT
•A report is an object in desktop databases primarily used for
formatting, calculating, printing, and summarizing selected
data.
•You can even customize the report's look and feel.
18. MICROSOFT ACCESS.
• Microsoft Access is a relational database management system
(RDBMS) which comes as an integral part of the MS Office
Suite of applications.
• It is a powerful GUI based RDBMS. It helps you create
customized databases for self-use or for use by small and
medium sized businesses.
• It provides numerous easy-to-use features, including the ability
to quickly locate information, add, delete, modify records, sort
records, analyze data, and produce professional-looking reports.
19. ADVANTAGES
OF
MICROSOFT
ACCESS
Duplicate data is minimized.
Information is more accurate, reliable
and consistent.
Information can be shared among
several users.
Information retrieval is faster and
easier
20. HOW TO OPEN MS ACCESS.
• On the desktop, scroll to the right.
• Click Microsoft Access 2013/2016.
OR,
• Go to the search button and type Access.
• Click Microsoft Access 2013/2016.
• (If you are using an older version of Windows such as Windows 7, Click on the Start button>All
programs>Microsoft Office | Microsoft Access 2013.)
22. On entering Access you are presented with a screen showing available templates, which have been
designed to help you to create your own databases. You can search for the templates at office.com. You
can also either create a new blank database (without help) or open an existing one.
Blank
Database
Templates
23. WORKING WITH YOUR ACCESS ENVIRONMENT.
• RIBBON
Access 2013 uses a tabbed Ribbon system instead of traditional main menus. The Ribbon
contains multiple tabs, each with several groups of commands. You will use these tabs to perform
the most common tasks in Access.
• QUICK ACCESS TOOLBAR
The Quick access toolbar, located above the Ribbon, lets you access common commands
no matter which you tab you are on. By default, it shows the save, undo and repeat commands.
24. CONTINUE …………
• BACKSTAGE VIEW
Backstage view gives you various options for saving, opening, and printing
your database.
• NAVIGATION PANE
The navigation pane is a list containing every object in your database. It is
designed to help you manage all of your objects. For easier viewing, the objects
are organized into groups by type. You can open, rename and delete objects using the
Navigation pane.
25. ACCESS ENVIRONMENT
Each tab is
divided
into
groups.
Click this
arrow for
more group
and
commands.
Click a tab to see
more commands
Contextual tabs will
appear when certain
items are selected.
26. CREATING A DESKTOP DATABASE
A desktop database table holds your data and is stored on your local computer or
network. The data is displayed in rows (horizontal layout), with each row
including a list of column of field names (vertical layout) like a worksheet.
Each field in the table can be of a different data type, depending on the data to be
held. Strong data in the correct field type is important because you can take
advantage of special feature in the database.
A database normally consists of more than one table, having the tables correctly
related to another will save you a lot of subsequent work. An individual tool in
access is the lookup wizard, which can automatically build the required
relationship between the table.
27. HOW TO CREATE A BLANK
DATABASE IN MS ACCESS
•Click blank database
•Type a name for your database.
•Select a file location in which to
save the database.
•Finally, click create.
28. WORKING WITH OBJECTS
Object Description
Tables Tables are the primary building blocks of the access database. Tables
are collections of records with similar data.
Queries Queries allow you to select specific data from one or more tables. You
use a query to clearly see and work with specific information.
Forms Forms are used to display records on screen to make them easier to
enter new records and to make changes to existing records.
Reports Reports are used to present processed data in an organized format
specially designed for printing.
Macros Macros automate common Access database tasks, such as opening and
printing tables, forms and reports.
Modules Modules are programs written in the Visual Basic language.
Pages Data Access Pages(DAP) are Web pages that allow you to view and
work with data that is stored in ana access database on the internet.
29. HOW TO OPEN, SAVE AND CLOSE AN OBJECT
• TO OPEN AN OBJECT
➢In the navigation pane, locate and double click the desired object.
➢The object will appear as a tab in the Document tabs bar.
• TO SAVE A NEW OBJECT
➢ Select the object you want to save by clicking its tab in the Document tabs bar.
➢ Click the save command on the Quick Access toolbar or press Ctrl + S on your keyboard. The
first time you save an object, you will be prompted to name it. Enter the desired object and then
click OK.
➢The object will be saved. Click the save command again to save any changes to the object.
30. CONTINUE ………
• TO CLOSE AN OBJECT
➢ Select the object you want to close, then click close button (X) on the right of the
Document tabs bar.
➢ If there are any unsaved changes to the object, you will be prompted to save it. Select
Yes to save, No to close it without saving your changes, and Cancel to leave the object
open.
31. UNDERSTANDING THE TABLE
•Tables are the core database objects whose purpose is to store information.
•The purpose of every other database object is to interact in some manner with one
or more tables.
•An Access database can contain thousands of tables, and the number of records
each table can contain is limited more by the storage space.
•Design view and layout, you are the two most commonly used ways to create a
table.
32. USING THE TABLE DESIGN VIEW
•The Table Design View window allows you to create tables on your own in order to
have complete control over the field names, data types and field properties.
•It consists of a design grid where you define each field to include in the table.
•You can set primary keys, data-entry rules, validations and other controls.
•The Table Design View window is divided into two panes:
➢ Field Grid pane
➢ Field properties area
33. THE FIELD GRID PANE
The Field Grid pane is used for entering field names, data types and their descriptions.
1. FIELD NAME:
• A field name is used to identify the data stored in the field.
• A field name should be descriptive of the contents of the data to be entered in the field.
• It can be up to 64 characters long and can consist of letters, numbers, spaces, and special
characters, except a period, an exclamation point, and accent grave(~), and brackets([ ]).
• You cannot start a field name with space.
34. CONTINUATION……
2. DATA TYPE:
• The data type determines the kind of data that can be entered into the field. Access uses
the data type to ensure that kind that the right kind of data is entered in a field.
• It is important to choose the right data type for a field before you start entering data in
the table.
• You can change a data type after the field contains data, but if the data types are not
compatible, such as a text entry in a field whose data type accept numbers only, you may
lose data.
35. Data Type Storage Size What It Holds
Short Text 0-255 characters Alphanumeric data (names, titles, etc.)
Long Text(memo) Up to about 1 gigabyte Large amounts of alphanumeric data: sentences and paragraphs
Number 1,2,4,8,or 16 bytes Numeric data
Date/Time 8 bytes Dates and Times
Currency 8 bytes Monetary data, stored with 4 decimal places of precision.
Auto number 4 bytes(16 bytes for Replication ID) Unique value generated by Access for each new record.
Yes/No 1 byte Boolean (true / false) data; Access stores the numeric value zero (0) or false, and -1
for true.
OLE object Up to about 2 GB Pictures, graphs, or other ActiveX objects from another Windows-based application.
Hyperlink Up to 8,192(each part of a Hyperlink data type
can contain up to 2048 characters)
A link address to a document or file on the Internet, on an intranet, on a Local Area
Network(LAN), or on your local computer.
Attachment Up to 2 GB You can attach files such as pictures, documents, spreadsheets, or charts.
Calculated Short text data type result can have up to 243
characters. Long text, number, yes/no and
Date/Time should match their respective data
types.
You can create an expression that uses data from one or more fields.
Lookup Wizard Dependent on the data type of the lookup field. Displays either a list of values that is retrieved from a table or query, or a set of
values that you specified when you created the field.
36. CONTINUATION ON FIELD GRID PLANE:
3. FIELD DESCRIPTION:
• Field description helps you to remember the use and purpose of a particular field.
• It is very useful in large projects where several people may be working on the same database. This
field is, however, optional.
4. THE FIELD PROPERTIES AREA:
• The field properties are the attributes that describe and define a field.
• Each type of field has a particular set of properties.
• Setting field properties enhances the way your table works. Some of the more commonly used
properties and their functions are described in the next page:
37. Field Property Description
Field Size Specifies the maximum number of characters allowed in the field.
Format Specifies how data displays in a table and prints
Input Mask Defines a standard pattern for the appearance of all data entered in a field
Caption Used when you want to display an alternate name for the field to explain the field name
Default value Automatically enters the specified value in the field
Validation Rule Specifies an expression that checks for invalid data
Validation Text Displays the message if the entered data fails the validity rule. Default is none
Required Specifies whether or not a value must be entered in the field
Allow Zero Length Specifies whether or not an entry containing no character is valid
Indexed Create an index for the primary key, speeds up sorting and searching
Unicode Compression Indicate whether you want Access to save space if only plain text is entered
IME Mode Input Method Editor-settings applies only if you are using East Asian languages.
IME Sentence Mode Settings apply to the Japanese language only
Smart Tags Adds additional functionality to the field that you’d normally have to open another program to do
Text Align Aligns the data in a field the left, center, right or distributed( spread across the data cell)
39. STEPS:
• Click the create tab
• Click Table design
• Type a name in the field name column for each field you want.
• In the data type drop-down list, select a data type for each field.
• Click save.
• Provide a name for the table and click ok.
• If you have not created a primary key, you will be prompted to add a key. Click yes to
add a primary key.
• After saving your table, the new id primary key is added to the table.
• The table now appears in the navigation pane.
40. CHOOSING FIELD SIZE PROPERTIES
•The field size property is used to set the maximum size for the
text or number data that can be entered in the field.
•The default field size for a field with a data type of text is 50
characters.
•You can change this size to an amount anywhere in the range
of 0 to 255 characters.
41. CONTINUE…..
• THE FIELD SIZE FOR NUMERIC DATA TELLS
YOU THE RANGE AND HOW MANY BYTES
WILL IT TAKE FOR STORAGE. THE OPTIONS
ARE:
Byte between 1 and 255
Integer between -32,768 and 32,768
Long integer between roughly -2 billion and 2
billion
Single Stores single precision floating
point numbers between -
3.4×1038
to +3.4×1038
Double Stores double precision floating
point numbers between -
1.797×10308 and +1.797×10308
Replication ID Which is used to store a globally
unique identifier {guid}
Decimal Makes the precision and scale
properties available to control
number entries
42. CHANGING THE FIELD PROPERTIES
Design View
Field
Properties
Field Size
General
Pane
Save Button
Navigatio
n Pane
43. STEPS:
• In the navigation pane, right click the table that you want to change field properties for.
• Select design view in the shortcut menu
• Click the field you want to change.
• In the field properties general pane, click in the field size property box
• For a text field, enter a value between 1 and 255
• For a number field, refer to the previous table and pick an option from the drop-down
list.
• Click the save button on the quick access toolbar
• Close table design view.
45. TEXT AND MEMO FIELDS
• Text and memo fields use the same format settings, some of which are placeholders
that apply to individual characters and other settings affecting the entire entry. Text
and memo data types can use any of these four symbols:
Symbol Effect
@ Indicates a character or a space is
required.
& Indicates a character or a space is
optional
< Converts all characters to
lowercase
> Converts all characters to
uppercase
47. FORMATS AND EFFECTS FOR NUMBER DATA TYPES
Setting Effect
General Displays number as entered.
Number Default for number fields.
Currency Displays number with currency symbols and thousands separator. Negative
values appear in parenthesis. Default is two decimal places.
Euro Displays number with Euro currency symbol and thousands separator.
Negative values appear in parenthesis. Default is two decimal places.
Fixed Displays at least one digit. Default is two decimal places.
Standard Displays thousands separator. Default is two decimal places.
Percent Displays value multiplied by 100 with added percent sign. Default is two
decimal places.
Scientific Uses scientific notation with exponents.
48. SYMBOLS AND EFFECTS
Symbol Effect
. (period) Indicates the decimal point that separates the parts of a
number.
, (comma) Used as a thousand's separator.
0 A digit placeholder that displays a digit if one is there or,
if none are there, displays zero.
# A digit placeholder that displays a digit if one is there or,
if none are there, closes the adjoining digits.
$ Displays a dollar sign.
% Value is multiplied by 100 and a percent sign is added.
50. FORMATS FOR DATE/TIME DATA TYPES:
Setting Description
General Date (Default) Combination of short date and long-
time settings.
Long Date Uses long date regional setting.
Medium Date 06-Nov-20
Short Date Uses short date regional setting
Long Date 12:00:00 PM
Medium Time 12:00 PM
Short Time 15:30
51. CUSTOM FORMATTING AVAILABLE FOR DATE/TIME
VALUES:
Symbol Description
: (colon) Time separator as set in the Regional Settings Properties
dialog box.
/ Date separator
dd Day of the month in two digits (01 to 31)
dddd Full weekend name (Sunday through Saturday)
mm Month in two digits (01 to 12)
yy Last two digits of the year (01 to 99)
yyyy Full year (0100 to 9999)
hh,mm,ss Hour, minute, or second in two digits (01 to 23, 01 to 59)
am/pm 12-hour clock with two-character uppercase or lowercase
designators.
52. YES/NO FIELDS
Access automatically
displays a default check
box control when you
specify a Yes/No data type.
Any format settings you
make or ignored with this
choice. Access provides
three predefined formats
for displaying Yes/No ,
On/Off or True/False.
Formats for
Yes/No Data
Types.
53. DEFINING INPUT MASKS
• An input mask is a field property that determines what data can be entered in the
field, how the data looks, and the format in which it is stored.
• An input mask consists of three parts, separated by semicolons.
• The first part defines the mask string using mask definition characters and embedded
fixed data.
• The optional second part indicates whether you want the formatting characters stored
in the field in the database.
• The optional third part defines the single character that Access uses as a placeholder
to indicate positions where data can be entered. The default placeholder character is
an underscore ( _ )
54. INPUT MASK CHARACTERS
Character Description
0 Required digit (0 through 9)
9 Optional digit or space.
# Optional digit or space; blank position are converted to
spaces; plus and minus; signs are allowed.
L Required letter (A through Z)
? Optional letter (A through Z)
A Required letter or digit
a Optional letter or digit
& Required character (any kind) or a space
C Optional character (any kind) or a space
< All characters that follow are converted to lowercase.
> All characters that follow are converted to uppercase.
! Characters typed into the mask fill at from left to right.
Character that follows is displayed as a literal character.
Password Creates a password entry box.
55. HOW TO DEFINE INPUT MASKS
Input Mask Wizard
Build button
56. STEPS:
• Click the Build button (…) at the right of the field’s Input Mask property. The first Input
Mask Wizard dialog box opens where you can select from a list of ten predesigned input
masks appropriate for commonly used fields.
• After selecting the mask, click next to move to the second dialog box. In this dialog box,
you can make any necessary changes to the mask, such as changing the placeholder
that displays as fill-in blanks (the default is an underline character), and then click
Next.
• Choose to store the literal characters with data, if desired.
• Click Finish to close the wizard.
57. CAPTION:
The caption field property is used when you want to display an alternate
name for the field to explain the field name.
A caption can contain up to 255 characters, in any combination of
letters, numbers, special characters and spaces.
The new caption also appears in queries and replaces text in the field
labels attached to controls in repot and form designs .
The field names remain the same; only the labels show the new caption
text.
59. DEFAULT VALUE
• The default value property is used to specify a value that is automatically entered in a
field when a new record is created.
• When users add a record to the table, they can either accept this value or enter
another value. It is commonly used when there are a lot of the same value. This saves
time while entering data.
61. VALIDATION, VALIDATION RULE AND VALIDITY
• The process of examining the data that has been entered against conditions That
you have provided is called validation.
• A validation rule is the condition that should be satisfied by the data.
• A validity check is set by entering an expression to describe acceptable values.
• Also, a validation text is the error message that is displayed if the data is invalid.
62. VALIDATING NUMBERS
Expression Description
< 100 The value must be less than 100
> 0 The value must be greater than 0
< > 45 The value can be anything except
45
< = 50 the value must be less than or
equal to 50
Between 0 and 50 the value must be between 0 and
50
63. VALIDATING DATES
Expression Description
< # 1/30/2009 # The date occurs before January 30, 2009
< # 1/30/2009 6:30 PM # The date occurs after/on January 30, 2009 after 6:30 PM
< = # 1/30/2009 # The date occurs before/on January 30, 2009
> = # 1/30/2009 # The date occurs after/on January 30, 2009
> DATE ( ) The date occurs after the current date.
< DATE ( ) The date occurs yesterday or before the current date.
> NOW ( ) The date occurs today after the current time or any day
in future.
< NOW ( ) The date occurs today before the current time or any day
in past.
64. VALIDATING TEXT
Expression Description
Like “R*” The * represents zero or more characters. It checks
that the value starts with R or r, followed by a series
of zero or more characters.
Like “*ed” It checks weather text ends with characters “ed”
Like “? ? ? ADB” The ? represents a number. It accepts a text that
ends with ADB.
Like “# # # ADB” The # represents a number. It accepts a text that
ends with ADB and is preceded by three numbers.
Like “[AE]? ? ?” It accepts 4 characters, and the first character is
either A or E.
65. REQUIRING AN ENTRY
• The required properties specifies whether a value is required in a field. If the property is
set to “Yes” for a field, you must enter a value in that field and value can't be zero.
Is data entry
required?
66. STEPS: FIELD VALIDATION RULE
• Display the table in Design view.
• Select the field name in the upper pane of the design window, and then click validation
rule in the field properties pane.
• Click the (…) button at the right end of the validation rule box to open the expression
builder, or type an expression and press ENTER.
• In the validation textbox, enter the message you want to display when the rule is
broken.
68. ALLOW ZERO LENGTH STRING
• A zero-length string is a string that contains no characters.
• The Allow zero length property, when set to yes, permits zero-length strings.
• This property is available only to Text, Memo and Hyperlink fields.
Allow Zero Length?
69. PREVENTING DUPLICATES
• The indexed property field is used To set a field as an index. The yes (no duplicates)
setting for the indexed property indicates that the information in the field will be
indexed for faster searching, and that duplicate values are not allowed.
Allow duplicates?
70. DEFINING A PRIMARY KEY FIELD
• A primary key Is a field that uniquely identifies each record.
• Most tables have at least one field that is selected as the primary key.
• The data in the primary key field must be unique for each record. (i.e. it cannot be
repeated)
71. STEPS: DESIGNATING A FIELD AS PRIMARY KEY
• Right click the table in the Navigation Pane.
• Select design view.
• Select one or more fields.
• Click primary key.
• Click save.
72. DESIGNATING A FIELD OR FIELDS AS PRIMARY KEY
Design
view
Primary
key
Designated as
Primary key
73. STEPS: CREATING A TABLE IN LAYOUT VIEW
• Click the Create tab.
• Click Table.
• Click the Click to add dropdown list.
• Select the data type.
• Replace the default caption “Field1” with a name for the field.
• Click save.
• Provide a name for the table and click OK.
74. CREATING A TABLE IN LAYOUT VIEW
Click to add
dropdown list
Create tab
Default
caption
Table
Data Types
75. RELATIONSHIP BETWEEN TABLES
• A relationship plays a very important role in the database design.
• It is formed by linking matching fields of two tables.
• The relationships effectively join tables to form one large table.
• This avoids having to repeatedly enter the same data, therefore, saving time and
reducing data entry errors.
76. POSSIBLE RELATIONSHIPS BETWEEN
RELATED ENTITIES OR TABLE
• One-to-One (1:1)
In a one-to-one relationship, each record in table a can have only one matching record in
table B, and each record in table B can have only one matching record in table A.
-------------------------------------------------------------------------------------------------------------
• One-to-Many (1:m)
One-to-Many Relationship is the most common type of relationship. In a one-to-many
relationship, record in table a can have many matching records in table B but a record in
table B has only one matching record in table A.
77. CONTINUATION:
• Many-to-Many (m:m)
In a many to many relationship, or record in table a can have many matching records in
table B, and a record in table B can have many matching records in table A. This type of
relationship is only possible by defining a third table also called a junction table whose
primary key consists of two fields-the foreign keys from both tables A&B.
Relationship between
Tables.
78. CREATING RELATIONSHIPS BY USING THE LOOKUP
WIZARD
• In the table design view, move to a blank line in the data type column and select the lookup wizard in the dropdown list.
• Select the option to look up values from another table or query.
• Select the table from which you will look up a value and click next.
• Select both the field value to save in the new field and the field value to display in the list. Click next, on the following screen
select any fields for sorting and click next.
• Choose whether to show or hide the key column. Click next.
• Type a name for the lookup field.
• Select the enable data integrity checkbox to make sure that the list of Students and Contacts that refer to the Students is
always consistent.
• Choose the restrict delete option to prevent students from being ad deleted when they are referenced by a contact.
• Click finish.
• Click yes to save your changes.
80. VIEWING RELATIONSHIPS
• Click the database tools tab.
• Click relationships.
• Double click a relationship line to display and/or change the relationship.
Database
Tools
Relationships
81. DELETING RELATIONSHIPS
• Click the relationship line, which will become a thicker to indicate that it has been
selected
• Press the delete key and click yes to delete the relationship.
Delete
relationship
82. UNDERSTANDING REFERENTIAL INTEGRITY
• Referential integrity is a set of rules used by access to ensure that the relationships
between tables are valid and that the related data is not accidentally changed or
deleted. The rules include the following:
1. A record in a primary table cannot be deleted if matching records exist in a related
table.
2. A primary key value cannot be changed in the primary table is the record has related
records.
83. REFERENTIAL INTEGRITY
• Double click on the relationship line between two tables. The edit relationships dialog
box will open.
• Click on the enforce referential integrity checkbox.
• Mark either or both additional checkboxes as desired.
Click on cascade update related fields to automatically change entries on the “many” side
if an entry changes on the “one” side.
Click on cascade delete related files to automatically delete entire records from the table
on the “many” side is the related entry in the table on the “one” side is deleted.
• Then click on OK .
85. SORTING DATA
• Sorting data often helps you find specific information quickly. In access, you can
sort data in ascending order (A to Z or 0 to 9 ) or descending order (Z to A or 9 to 0 ).
You can sort all records in a table by a single field or you can select adjacent
columns or sort by more than one field.
Steps are as follows:
• Select a field in the cell you wish to sort by.
• Click the home tab on the ribbon and locate the sort and filter group.
• Sort the field by selecting the ascending or descending command.
• The table will now be sorted by the selected field.
• To save the new sort click the save command on the Quick Access Toolbar.
87. FILTERING RECORDS
• Filtering is a restriction you place on records in the open data sheet or form to quickly
isolate and display a subset of records.
Steps are as follows:
• Click the drop-down arrow next to the field you want to filter by,
• A dropdown menu with the checklist will appear . Only checked items will be included
in the filtered results,
• select and deselect items one at a time or select all to include every item in the filter,
• Click OK. The filter will be applied.
89. EXTRACTING INFORMATION WITH QUERIES
A query is a request for data results, for an action on data, or for both. Using a query
makes it easier to view, add, delete, or change data in your access database. Some other
reasons for using queries are listed below:
• Find specific data quickly by filtering on specific criteria,
• Calculate or summarize data,
• Automate data management tasks, such as a reviewing the most current data on a
recurring basis.
The five different types of queries are described in the table of the next slide:
90. Query Type Description
Selected query used to select and display data from either one table or
a series of them depending on what is needed.
Crosstab query Summarizes large amounts of data in an easy-to-read,
row-and-column format.
Parameter query Displays a dialog box prompting you for information,
such as criteria for locating data.
Action query Add chains or delete data. Each task has a specific
type of action query.
SQL query Created using SQL (Structured Query Language, an
advanced programming language used in Access.
91. DESCRIPTION ON THE TYPES OF ACTION QUERY
Action Query Types Description
Append Query take this set results of a query and “appends” (or
adds) then to an existing table.
Delete Query delete all records in an underlying table from the
set results of a query.
Make Table Query as the name suggests, it creates a table based on
the set results of a query.
Update Query allows for one or more field in your table to be
updated.
92. USING THE SIMPLE QUERY WIZARD
• In the create tab, in the Queries group, click Query wizard.
• In the new query dialog box, click simple query wizard, and then click OK.
• Under Tables/Queries, click the table that has the data that you want to use. In this
case, click (For example: Table: Grade). Note that a query can also use another query
as a record source.
• Under available fields, double click the desire fields and click Next.
• Name the query as per your choice, and then click Finish.
94. USING A QUERY IN DESIGN VIEW
• Select create tab on the ribbon and locate the queries group.
• Click the query design command.
• Access will switch to query design view. In the Show Table dialogue box that appears,
Select the table you want to run a query on.
• Click add, then click close.
• Double click a field to add it to the query building plane below.
• Click save and view in datasheet view. You will be given a table where only the selected
fields are shown.
96. ADDING SELECTION CRITERIA IN QUERIES
• The selection criteria in queries are expressions defining a condition that must be met
for the record to be included in the subset. an expression is a combination of symbols,
values, identifiers and operators used for many purposes.
The given criteria is >=405 in Obtained
marks.
>=405
The values which is >=405 are only
shown.
97. USING WILD CARD PATTERNS
• Wildcards offer a way of setting criteria based on patterns or partial words rather than
exact matches. some wildcards with their description are in the table below:
To specify a wildcard pattern, into the pattern in the criteria row of the field column in
which you want to search.
Wild card Description
? replaces a single character
* replaces several characters
# replaces a single desert
98. USING OPERATORS
• Arithmetic operators: Logical Operators:
Operator Description Example
+ Addition = Total + 3
- Subtraction = Total - 3
* Multiplication = Total * 3
/ Division = Total / 3
Integer
division
= Total 3
Mod Modular
division
= Total mod 3
Operator Description Example
AND both
conditions
are true
>=10 AND
<=100
OR either
condition is
true
“Books” OR
“Pencil”
NOT not true NOT like “A”
99. CONTINUATION...
• Comparison Operators: Operator Description Example
= Equals =Books or =“Books”
> Greater than >7/15/06 or <#7/15/06#
< Less than <1000
>= Greater than or equal to >=20
<= Less than or equal to <=20
<> Not equal to <>“KTM”
BETWEEN Between two BETWEEN 100
AND values, inclusive AND 600
IN Included in a set of values IN (“Dang”, “Jhapa”)
IS NULL Field is empty Is Null
IS NOT NULL Field is not empty Is Not Null
“ ” Zero-length string =“ ”
LIKE matches a pattern LIKE C* or Like “C*”
100. SORTING QUERY FIELDS
• Open the query in Datasheet view.
• On the home tab, find ascending and descending.
• Click on ascending to sort in ascending order and vice versa.
Sort by
Ascending
Sort by
Descending
.
101. PERFORMING CALCULATIONS IN A QUERY
• A calculated field displays the results of a calculation in a query. You can perform a
variety of calculation in queries. You can create your own calculation or use one of
Access’s seven predefined calculations called functions:
Function Calculates
SUM Total of the values in a field.
AVG average of the values in a field.
COUNT Counts number of values,
excluding empty cells in a field for
all records
MIN Lowest value in a field.
MAX Highest value in a field.
STDEV A measure of the dispersion of a
frequency distribution.
VAR Square of the standard deviation.
102. UPDATE QUERY
• Update query is a type of query that are used to change one or more field values in
many records at once.
Operator Expression Result
CURRENCY [Cost]*0.05 Increases cost
value by 5%.
DATE #8/25/09# Changes the value
to August 5, 2009.
TEXT “Completed” Changes the value
to completed.
YES/NO Yes Used with criteria,
changes a specific
No values to Yes.
103. APPEND QUERY
• Start with a select query including
your table, select the fields to be used
in the new table, and then click
append.
• Select the table into which to append
the data.
• Click OK.
• Use the drop-down list of available
fields to match up any fields where the
names are different. Where the names
are the same, the field and append to
rows will be matched.
104. DELETE QUERY
• Delete query the type of query that allows you to delete data from a table either by
specifying filtering criteria or by using data in other tables or queries to limit the data
that is being deleted.
Steps:
o Start with a select query including your table and click delete.
o Select a field to filter the data.
o Type the filter criteria.
o Click run.
o Click yes.
105. MAKE TABLE QUERY
• Click The Create tab.
• Click Query Design.
• Add your tables and fields to the query grid.
• Click Make Table.
• Type a name for your new table.
• Click OK. Before clicking the Run button, you can click View to review the data that will
be created in the new table and then return to design view to execute the query by
clicking the Run button.
• Click Run to execute the action query.
• Click Yes to create your new table.
107. CROSSTAB QUERY WITH QUERY WIZARD
• Click the Create Tab.
• Click Query Wizard.
• In the New Query popup window, click Crosstab Query Wizard.
• Click OK.
• In the Crosstab Query Wizard, click Queries.
• Select a query and click Next.
• Select one or more columns to act as row heading and click Next.
• Select one column to act as the new column heading and click Next.
• Select the column to summarize.
• Select the calculation type to use and click Next.
• Type a name for the query and click Finish.
• Select design view.
• In the query Column Heading property field, type a fixed set of headings.
109. UNDERSTANDING FORMS
A form is a database object used primarily to display records on screen, to make it easier
to enter new records and to make changes to the existing records. Depending on the
needs, you can create form in three different ways:
• The form tools make attractive forms with the click of the mouse,
• The form wizard asks some questions and then creates an attractive form based on
your answers,
• The form design and blank form buttons let you start with a blank form and build from
the ground up.
110. USE THE FORM TOOL IF:
1. You want all Fields in the selected table or query to appear on the form.
2. You don't want control over the type of style that is applied to the form.
3. In the Navigation Pane, select the table you want to use to create a form. You do not
need to open the table.
4. Select the Create Tab, look at the Forms group and click the Form command.
5. Your form be created and opened in layout view.
111.
112. USING THE FORM WIZARD IF:
• You want to select specific fields for your form.
• You want to select fields from more than one table a query.
• You want to choose from a list of layouts for your form.
• Open your database file.
• Click the create tab on the ribbon. Several button groups appear on the ribbon, including the Forms
group.
• Click the form wizard button. The form wizard appears.
Form
Wizard
113. CONTINUATION...
• Using the Tables/Queries drop-down menu, select the source of the form’s fields:
✓Click the down arrow to list the database's tables and queries.
✓Select the table or query that contains the fields you want to view with this form.
• Select the fields you want.
• After you’ve selected all the fields you want to include on your for, click next.
• Choose one of the following layouts and then click next: (Layouts explained in the next
slide)
• Enter a descriptive title in the What Title Do You Want for Your Form?
• Click finish to open the form in form view. Your new form appears on the screen.
114. LAYOUTS: Layouts Description
Columnar Records are soon one at a time.
Tabular Multiple records are shown at the
same time with an attractive style
applied to the form.
Datasheet Multiple records are shown at the
same time in a rather attractive
spreadsheet-like way.
Justified Arranges the fields on the form in a
tidy block of rows that have
pronounced left and right margins.
115. UNDERSTANDING REPORTS
• Report is an access database object that presents information in a printed format.
• It is a summary of the data are contained in one or more tables or queries.
• It will often provide answers about the information in your database such as the yearly
sales for a specific product are the payroll data for particular week our month.
116. USE THE REPORT BUTTON:
The report button creates a simple report that lists the records in the selected table or
query in a columnar format.
• Open the table or query you want to use in your report.
• Select the Create tab on the ribbon. Locate the reports group, then click the report
command.
Report
118. CONTINUATION...
• Click the Save button on the Quick Access toolbar. Access saves the report unless you
are saving for the first time. If you are saving for the first time, the Save As dialog box
appears.
• Type the name you want to give you report.
• Click OK. Access saves the report. You can now access the report by using the
Navigation Pane.
119. USING THE REPORT WIZARD
• On the Create tab in the Reports group, click Report Wizard. The wizard starts.
Report
Wizard
120. CONTINUATION…
• From the Tables/Queries drop-down List, select the (or query) to base the report on.
• Move the fields to include on the report from Available Fields list box to the Selected
Fields list box. To do so, double-click a field named move it or highlight the field name
and click >. To move all fields at once, click >>.
• Click Next >.
• To group records on the report by a particular field, highlight the field in the list box
and click >.
• Add more grouping levels if desired. You can use the arrows to change the order of the
grouping levels if needed.
• When you finish defining how you want records grouped, click Next >.
121. CONTINUATION…
• In the first dropdown list, select the field to sort records by. By default, records will be
sorted in ascending order by the field you select. If you want to sort in descending
order, click the Ascending button to change its label to “Descending”.
• You can specify up to four levels of sorting. When you finish specifying sorting options,
click Next >.
• In the Layout field, Select the format of the report. Your options are “Stepped”, “Block”
and “Outline”.
• In the Orientation field, Select whether to layout the report in portrait or landscape
mode.
• If you want all fields to fit on a single page, ensure the adjust the field width so all
fields fit on a page checkbox is marked.
122. CONTINUATION…
• Click Next >.
Enter a title for the report.
Select an option for the view you want to open the report in. Your options are:
1. Preview the report and,
2. Modify the report’s design.
• Click finish. The report loads in the view you selected.