You are on page 1of 4

Ms access 2007

A database is a collection of information that's related. Access


allows you to manage your information in one database file. Within
Access there are four major areas: Tables, Queries, Forms and
Reports.

Tables:

MS Access tables are the key objects in the Access file, as they
contain the data that is stored in the database. Tables are made up of
rows and columns and allow for direct data entry into their grids.
The row is the record that contains the individual data pieces making
up an individual record. The columns, also referred to as fields,
consist of categorized information.

Queries:

A query is a request for data results, and for action on data. You can
use a query to answer a simple question, to perform calculations, to
combine data from different tables, or even to add, change, or delete
table data.

Forms*:

A form in Access is a database object that you can use to create a user
interface for a database application. A "bound" form is one that is
directly connected to a data source such as a table or query, and can
be used to enter, edit, or display data from that data source.

Reports*:

A report is a “window” that provides views of your data based on the


criteria you select. A report can contain detailed or summary
information of the data that is contained in one or more tables in the
databases. Reports are easily generated using the Report Wizard.

*= Won’t come out in test


Using tables
Understanding the Views
There are 2 basic views when you work in a table: Design View and
Datasheet View. Design View is used to set the data types, insert or
delete fields, and set the Primary key. Datasheet View is used to enter
the data for the records. By default, Access places you in Datasheet
View. To Switch to Design view:
1) Click the View button on the Home Ribbon
2) Type a name for the table
3) Click OK.

To Enter Fields in a Table:


1) Type a name for the first field in the table
2) Press Enter
3) Select a data type
4) Press Enter
5) Type a description for the field
6) Press Enter

Setting a Primary Key

The Primary Key is the unique identifier for each record in a table.
Access will not allow duplicate entries in a Primary Key field. By
default, Access sets the first field in the table as the Primary Key
field. An example of a Primary Key would be your Social Security
Number. This is something unique about you and should not be
duplicated. To Set a Primary Key:
1) Switch to Design View
2) Position your cursor in the field you wish to set as the Primary Key
3) Click the Primary Key button on the Ribbon

Entering Data in a Table


Once you have entered the fields and set the data types it is now time
to enter the records in a table. To Enter Data in a Table:
1) Make sure you are in Datasheet View
2) Enter the data into the table by pressing the tab key to move from
one cell to another
3) When you have completed the record (row), press Enter
Using queries

Queries help you find and work with your data

In a well-designed database, the data that you want to present through


a form or report is usually located in multiple tables. A query can
pull the information from various tables and assemble it for display in
the form or report. It can either be a request for data results from
your database or for action on the data, or for both. A query can give
you an answer to a simple question, perform calculations, combine
data from different tables, add, change, or delete data from a
database.

It uses several types of commands to execute an action.Some simple


query syntaxes are shown here.

 SELECT Column syntax

The following SQL statement selects the "CustomerName" and "City"


columns from the "Customers" table:

Example
SELECT CustomerName, City FROM Customers

 INSERT INTO Syntax

It is possible to write the INSERT INTO statement in two ways. The first
way specifies both the column names and the values to be inserted:

INSERT INTO table_name (column1, column2, column3, ...)


VALUES (value1, value2, value3, ...);

 UPDATE Syntax
The UPDATE statement is used to modify the existing records in a table.

UPDATE table_name
SET column1 = value1, column2 = value2, ...
WHERE condition;
 DELETE Syntax
The DELETE statement is used to delete existing records in a
table.
DELETE FROM table_name WHERE condition;

You might also like