SlideShare ist ein Scribd-Unternehmen logo
1 von 123
Downloaden Sie, um offline zu lesen
DATABASE MANAGEMENT
SYSTEM
By: Sarun Poudel
DEFINITION
•A database management
system (DBMS) is a
software package designed
to define, manipulate,
retrieve and manage data
in a database.
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.
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.
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
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.
IMPORTANCE
OF
ELECTRONIC
DATABASE.
The limitless capacity to store data.
Speed
Accuracy
Efficiency with which you can retrieve
data.
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.
Fields
Records
Employee Master Table
A MODEL OF A TABLE
Emp No. Dept No. Address.
E01 D01 New Road
E02 D02 Phritivi Chowk
E03 D03 Surkhet Road
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.
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.
Central Location
Data File
Data File
Data File
USER
USER
DBMS
Application
Prog-1
Application
Prog-1
How Database Management System Works?
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
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.
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.
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.
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.
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.
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
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.)
OPENING MS ACCESS
Click
Here.
Or
Click
Here.
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
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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.
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.
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.
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:
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)
CREATING A TABLE:
Table Design
Field Name
Data Type Description
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.
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.
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
CHANGING THE FIELD PROPERTIES
Design View
Field
Properties
Field Size
General
Pane
Save Button
Navigatio
n Pane
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.
SETTING FORMAT PROPERTIES
Format
Properties
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
NUMBER AND CURRENCY FIELDS
Formats for Number Data
Types
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.
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.
DATE/TIME FIELDS
Formats for Date/Time Data
Types
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
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.
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.
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 ( _ )
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.
HOW TO DEFINE INPUT MASKS
Input Mask Wizard
Build button
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.
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.
INCLUDING A CAPTION
Original
Caption
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.
SETTING A DEFAULT VALUE
Default Value
= “CA”
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.
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
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.
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.
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?
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.
FIELD VALIDATION RULE
Validation
Rule Validation
Text.
Doesn’t satisfy the
rule.
Expression
Builder.
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?
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?
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)
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.
DESIGNATING A FIELD OR FIELDS AS PRIMARY KEY
Design
view
Primary
key
Designated as
Primary key
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.
CREATING A TABLE IN LAYOUT VIEW
Click to add
dropdown list
Create tab
Default
caption
Table
Data Types
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.
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.
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.
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.
Drop down list
Lookup
Wizard
Table Design
View
VIEWING RELATIONSHIPS
• Click the database tools tab.
• Click relationships.
• Double click a relationship line to display and/or change the relationship.
Database
Tools
Relationships
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
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.
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 .
Edit
Relationships
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.
Descending
command
Ascending
command
Home
tab
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.
Drop-down
Menu Filter
options
Reena and Rohan are filtered.
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:
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.
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.
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.
Query Wizard
Simple Query
Wizard
Available
Fields
Selected
Fields
Query Name
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.
Query Design
Selected Fields
Chosen
Table
Create
Tab
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.
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
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”
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*”
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
.
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.
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.
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.
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.
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.
Query Design
Run
Tables
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.
Query Wizard
Click
Here
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.
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.
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
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.
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.
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.
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
CONTINUATION...
• Access will create a new report based on your object.
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.
USING THE REPORT WIZARD
• On the Create tab in the Reports group, click Report Wizard. The wizard starts.
Report
Wizard
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 >.
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.
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.
Submitted To: Mr. Roshan Maharjan

Weitere ähnliche Inhalte

Was ist angesagt?

PPT On MS-Access 2007 | Full Concepts |
PPT On MS-Access 2007 | Full Concepts |PPT On MS-Access 2007 | Full Concepts |
PPT On MS-Access 2007 | Full Concepts |Umesh Kumar
 
Introduction to microsoft access
Introduction to microsoft accessIntroduction to microsoft access
Introduction to microsoft accessHardik Patel
 
Class viii ch-2 log on to access
Class  viii ch-2 log on to accessClass  viii ch-2 log on to access
Class viii ch-2 log on to accessjessandy
 
Access lesson 03 Creating Queries
Access lesson 03 Creating QueriesAccess lesson 03 Creating Queries
Access lesson 03 Creating QueriesAram SE
 
Class viii ch-4 working with queries
Class  viii ch-4 working with queriesClass  viii ch-4 working with queries
Class viii ch-4 working with queriesjessandy
 
Ms Access ppt
Ms Access pptMs Access ppt
Ms Access pptanuj
 
Microsoft access
Microsoft accessMicrosoft access
Microsoft accessReshmiSV
 
Charts in EXCEL
Charts in EXCELCharts in EXCEL
Charts in EXCELpkottke
 
Ms excel basic about Data, graph and pivot table
Ms excel basic about Data, graph and pivot table Ms excel basic about Data, graph and pivot table
Ms excel basic about Data, graph and pivot table Alomgir Hossain
 
Ms excel ppt presentation
Ms excel ppt presentationMs excel ppt presentation
Ms excel ppt presentationvethics
 
Access lesson 04 Creating and Modifying Forms
Access lesson 04 Creating and Modifying FormsAccess lesson 04 Creating and Modifying Forms
Access lesson 04 Creating and Modifying FormsAram SE
 

Was ist angesagt? (20)

Introduction to ms access
Introduction to ms accessIntroduction to ms access
Introduction to ms access
 
PPT On MS-Access 2007 | Full Concepts |
PPT On MS-Access 2007 | Full Concepts |PPT On MS-Access 2007 | Full Concepts |
PPT On MS-Access 2007 | Full Concepts |
 
Ms access
Ms accessMs access
Ms access
 
Ms access 2010
Ms access 2010Ms access 2010
Ms access 2010
 
MS Excel 2nd
MS Excel 2ndMS Excel 2nd
MS Excel 2nd
 
Introduction to microsoft access
Introduction to microsoft accessIntroduction to microsoft access
Introduction to microsoft access
 
Ms access
Ms accessMs access
Ms access
 
Class viii ch-2 log on to access
Class  viii ch-2 log on to accessClass  viii ch-2 log on to access
Class viii ch-2 log on to access
 
001.general
001.general001.general
001.general
 
Access lesson 03 Creating Queries
Access lesson 03 Creating QueriesAccess lesson 03 Creating Queries
Access lesson 03 Creating Queries
 
Class viii ch-4 working with queries
Class  viii ch-4 working with queriesClass  viii ch-4 working with queries
Class viii ch-4 working with queries
 
Ms Access ppt
Ms Access pptMs Access ppt
Ms Access ppt
 
Access 2007
Access 2007Access 2007
Access 2007
 
Microsoft access
Microsoft accessMicrosoft access
Microsoft access
 
Charts in EXCEL
Charts in EXCELCharts in EXCEL
Charts in EXCEL
 
Ms access
Ms access Ms access
Ms access
 
Ms word 2007 pptx
Ms word 2007 pptxMs word 2007 pptx
Ms word 2007 pptx
 
Ms excel basic about Data, graph and pivot table
Ms excel basic about Data, graph and pivot table Ms excel basic about Data, graph and pivot table
Ms excel basic about Data, graph and pivot table
 
Ms excel ppt presentation
Ms excel ppt presentationMs excel ppt presentation
Ms excel ppt presentation
 
Access lesson 04 Creating and Modifying Forms
Access lesson 04 Creating and Modifying FormsAccess lesson 04 Creating and Modifying Forms
Access lesson 04 Creating and Modifying Forms
 

Ähnlich wie Ms access (20)

Database management system
Database management systemDatabase management system
Database management system
 
Introduction to database with ms access.hetvii
Introduction to database with ms access.hetviiIntroduction to database with ms access.hetvii
Introduction to database with ms access.hetvii
 
Introduction to database with ms access(DBMS)
Introduction to database with ms access(DBMS)Introduction to database with ms access(DBMS)
Introduction to database with ms access(DBMS)
 
Operate Database Application UC info sheet.pdf
Operate Database Application UC info sheet.pdfOperate Database Application UC info sheet.pdf
Operate Database Application UC info sheet.pdf
 
Database
DatabaseDatabase
Database
 
6.2 software
6.2 software6.2 software
6.2 software
 
MS-ACCESS.pptx
MS-ACCESS.pptxMS-ACCESS.pptx
MS-ACCESS.pptx
 
Operate Database Applicationitss level2.pptx
Operate Database Applicationitss level2.pptxOperate Database Applicationitss level2.pptx
Operate Database Applicationitss level2.pptx
 
MS Access.pptx
MS Access.pptxMS Access.pptx
MS Access.pptx
 
Introduction to databases
Introduction to databasesIntroduction to databases
Introduction to databases
 
IS L03 - Database Management
IS L03 - Database ManagementIS L03 - Database Management
IS L03 - Database Management
 
Database
DatabaseDatabase
Database
 
Access2003
Access2003Access2003
Access2003
 
Access2003
Access2003Access2003
Access2003
 
Data base management system
Data base management systemData base management system
Data base management system
 
Database Management Systems
Database Management SystemsDatabase Management Systems
Database Management Systems
 
DATABASE ADMINSTRATION
DATABASE ADMINSTRATION DATABASE ADMINSTRATION
DATABASE ADMINSTRATION
 
Dbms9
Dbms9Dbms9
Dbms9
 
DATA RESOURCE MANAGEMENT
DATA RESOURCE MANAGEMENT DATA RESOURCE MANAGEMENT
DATA RESOURCE MANAGEMENT
 
Database Management System For A Company
Database Management System For A CompanyDatabase Management System For A Company
Database Management System For A Company
 

Mehr von RoshanMaharjan13 (13)

E-Commerce.pptx
E-Commerce.pptxE-Commerce.pptx
E-Commerce.pptx
 
Computer security
Computer securityComputer security
Computer security
 
File handling
File handlingFile handling
File handling
 
Ethical and Social Issues in ICT
Ethical and Social Issues in ICTEthical and Social Issues in ICT
Ethical and Social Issues in ICT
 
Basic of qbasic
Basic of qbasicBasic of qbasic
Basic of qbasic
 
Computer Software
Computer SoftwareComputer Software
Computer Software
 
Number system
Number systemNumber system
Number system
 
Computer hardware
Computer hardwareComputer hardware
Computer hardware
 
Networking and telecommunication
Networking and telecommunication Networking and telecommunication
Networking and telecommunication
 
Categories of computer
Categories of computerCategories of computer
Categories of computer
 
Microsoft word
Microsoft wordMicrosoft word
Microsoft word
 
Modular programming
Modular programmingModular programming
Modular programming
 
Introduction to computer
Introduction to computerIntroduction to computer
Introduction to computer
 

Kürzlich hochgeladen

General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdfssuserdda66b
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 

Kürzlich hochgeladen (20)

General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 

Ms access

  • 2. DEFINITION •A database management system (DBMS) is a software package designed to define, manipulate, retrieve and manage data in a database.
  • 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.
  • 7. IMPORTANCE OF ELECTRONIC DATABASE. The limitless capacity to store data. Speed Accuracy Efficiency with which you can retrieve data.
  • 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.
  • 9. Fields Records Employee Master Table A MODEL OF A TABLE Emp No. Dept No. Address. E01 D01 New Road E02 D02 Phritivi Chowk E03 D03 Surkhet Road
  • 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)
  • 38. CREATING A TABLE: Table Design Field Name Data Type Description
  • 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
  • 46. NUMBER AND CURRENCY FIELDS Formats for Number Data Types
  • 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.
  • 49. DATE/TIME FIELDS Formats for Date/Time Data Types
  • 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.
  • 60. SETTING A DEFAULT VALUE Default Value = “CA”
  • 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.
  • 67. FIELD VALIDATION RULE Validation Rule Validation Text. Doesn’t satisfy the rule. Expression Builder.
  • 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
  • 117. CONTINUATION... • Access will create a new report based on your object.
  • 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.
  • 123. Submitted To: Mr. Roshan Maharjan