Вы находитесь на странице: 1из 35

BASIC DATABASE

using Microsoft Access

MATA KULIAH TIK

FAKULTAS PERTANIAN
UNIVERSITAS
BRAWIJAYA

Learning Objectives:
At the end of the course students will be able
to:
explain basic database concepts
create a simple database
examine existing table relationships
manage the data in a database
query the database
create and modify Access reports
generate reports
create user input forms

What is a Database?
Collection of information related to a

particular subject or purpose


Computer databases try to organize your
information

Database Examples:
Filing cabinet full of bills
Address books
Cassette of CD collection
Recipe files

Why use a database?


Organize and store information
Manipulate and search data
Analyze data
Present data in forms and reports
More visual, better with text than a

program such as Excel

Microsoft Access

What is Microsoft Access


Why use Access
Limitations
Basic background information
Advanced features
Example
Conclusion

MS Access
Microsoft Program
Part of the Microsoft Office suite
Used to create relational database

management system (RDMS)


consists of multiple tables, each storing
specific information
relates information from one table to
another
One-to-many relationships are the power
behind a relational database
Query the database to find information
Enter information into forms
Display results in reports

Why use RDMS


Facilitate information sharing
data can be queried from multiple tables

joined and displayed in a subset of records


Reduce data redundancy
the same data is not stored over and over again

Keep data accurate


a change in data is made in one table but

appears updated in all queries and reports

Why use MS Access


Easy to use
GUI, Looks good
Stand-alone
Do not require any other program to run

or use
Lots of support
Help File, Message boards
Relatively cheap
Comes with MS Office Suite
Integration
Can be integrated with other MS Office

Limitations
Its a Microsoft product
Bugs galore
Overly user- friendly
Tried too hard to predict what you what

to do
Not suited for large databases
Takes up lots of computer resources
Expensive
Must buy from Microsoft. Not open
source
Complicated to use for connectivity to

Basics of Access
The key window in Access is known as

the database window.


Seven objects can be launched from this
window:
Tables
Queries
Forms
Reports
Pages
Macros
Modules
These objects, in turn, become their own
windows.

Basics of Access
The smallest piece of information in a

database is called a field


customer name
A group of related fields is called a record
customer name, address, phone number
A table is a collection of records about a
particular subject
customers
A relational database consists of a set of
related tables
Customers and Orders and Products

Basics of Access
Primary Key
A field used to uniquely identify each

record
Every table in a database must have a
primary key defined
Composite Key
More than one field used in combination
to uniquely identify each record
Foreign Key
A field (in one table) that is related to a
primary key in another table within the

Basics of Access
Queries
A subset of table information
Similar to filter or find operation within

table
searches for records according to
specified criteria and displays these
records
Also like a sort operation
can change the order of records
Differs from filter and sort in that a query
can be run against several tables

Basics of Access
Forms
Used to easily view, enter, and change

data directly in a table


retrieves the data from one or more
tables, and displays it on the screen
also display pictures and other objects
can contain a button that prints, opens
other objects, or otherwise automates
tasks
Reports
Used to analyze your data or present it a
certain way

Access 2007 Interface

Access 2007 Start Up Screen


Blank Database Table

Table Creation From Online


Templates

Create a New Blank Database

Insert a New Field in the Table


Click the Datasheet tab under
Table Tools, and click the New
Field button.

Select Fields from Templates and


Rename
Add fields such as Last Name,
First Name, Address, etc. and
basic field types, such as
Currency and Date/Time.

Save with Quick Access Toolbar


NOTE: To save the
database as you are
working, click the Save
button on the Quick
Access Toolbar and
enter the table name,
such as Customer.
Then, click OK.

Selecting/Changing Data Types


On the Datasheet tab,
in the Data Types &
Formatting group, from
the Data Type list,
select the desired data
type, such as Number.

Calendar Picker for Date Fields


On the Datasheet tab,
in the Data Types &
Formatting group,
from the Data Type list,
select the Date/Time
option. Click the
Calendar Picker icon to
select a date while
entering date data into
the table.

Populating a Table in Datasheet


View

On the Datasheet tab, in the Data Types & Formatting


group, from the Data Type list, select the Attachment
option. (This field will be used to attach a
photograph ID of each customer.)

Adding an Attachment
To add an attachment, double click on the paper
clip icon for a record.
Click the Add button and locate the image file to
be associated with the record.
Select the image file name and click the Open
button. Click OK.

Creating Forms and Split Forms


Click the Create tab and
then select the Form
button in the Forms
group.
The resulting form should
appear with the access
controls at the bottom as
shown below.

Auto Formatting and Saving


Forms
Use the Format tab and the
AutoFormat group to select a
predefined layout, such as the
Opulent layout from the
AutoFormat gallery. The formatted
form should display in Layout View.
Save the form to include a name,
such as Customer.

Organizing the Shutter Bar


Click the pull-down button in
the Shutter Bar and select
Object Type to display
the objects created as part
of the Customer database in
groups.
Objects that you will create
today include tables,
forms, queries, and
reports.

Using the Query Wizard


Click the Create tab and select
the Query Wizard button in the
Other group.
In the Available Fields
list, double click each
field to add it to the
Selected Fields list. (You
can also use the Add, Add
All, Remove and Remove All
buttons.)

Use Design View


for entering
criteria.

Query Design View

In Design View, create


specific criteria for the
Query.

Creating Criteria and Running a


Query
Select the
Design/Query
Tools tab in the
Results group, click
the Run button.
Query results can be
reviewed, saved
and/or printed.

Creating and Populating a


Second Table
Use the Create Tab and
Table button in the
Tables Group to create a
new table. Populate the
table as shown below.

Using the Report Wizard


Click the Create
tab and the
Report Wizard
button in the
Reports group.
Select a table or
query and then
move desired
Available Fields
to the Selected
Fields list.

Using the Report Wizard


In the report layout
options, select:
Layout, such as Tabular
Orientation, such as
Landscape
Verify that the Adjust field
width to fit on a page option
is checked .
Preview the report and then
close the Print Preview.
Select Layout View to edit
the report.

Closing and Exiting Microsoft


Access
You must perform an
appropriate exit from
the database and
Microsoft Access to
insure the stability of
the data.
To exit from Access 2007,
click the Office button,
and then select the Close
Database option.

Click the Office button


again, and then choose the
Exit Access button.

Thanks

Вам также может понравиться