|
For this assignment you will need to download
Adventure Works 01 and save it on
your computer
A
database is a collection of data, or information that is
organized so that specific information can be easily located and
retrieved. The phone book is an example of a noncomputerized database. The
phone book contains names, addresses, and telephone numbers arranged
alphabetically by last name so that it is easy to locate information for a
particular person. Microsoft Access is a
database management
system (DBMS) for creating and using computerized databases. A
database management system is an integrated collection of programs that
are used to create and manage information in a database. Computerized
databases are much more powerful than noncomputerized databases (like the
phone book) because users can reorganize data and search for information
in hundreds of ways. For example, if a phone book were stored as an Access
database, you could search by address, first name, or phone number,
instead of just by last name. As another example of the advantages of
computerized databases, consider Adventure Works, a fictitious outdoor
vacation resort outside Santa Barbara, California. The marketing manager
for the resort wants to send a summer events newsletter to everybody who
has visited the resort during the summer months within the past five
years. If the records for guest visits were kept in ledger books, you
would need to flip through the books page by page to create a list of past
summer visitors. With a computerized database, however, you could create a
list of previous summer visitors in seconds. If the marketing manager
later decides to send a newsletter to winter visitors instead, a
computerized database could create this new list almost instantly. Lets
open an Access database.
On the Windows
taskbar, click the Start button.
The Windows XP Start
menu will appear.
On the Start menu,
point to All Programs, and click Microsoft Access.
Access starts, and the
Getting Started task pane appears on the right side of the screen. The
lower portion of the task pane displays the most recently opened database
files. If the Getting Started task pane does not appear, click the View
menu, point to Toolbars, and then click the Task Pane option.
Click the More link
near the bottom of the task pane.
The Open dialog box
appears. You use this dialog box to locate the database file to be opened.
If you are using a newly
installed version of Access, the More link may not be present in the
Getting Started task pane. If you do not see that option, click the File
menu and then click Open.
Click the Look In
down arrow, click the icon for your hard disk, and then double-click the
folder where you saved the Access Practice file.
The Open dialog box
displays a list of files stored in the folder. Select Adventure Works 01
Click the
Open button in the lower-right corner of the dialog box.
The Database window for
Adventure Works 01 appears within the main Access window. You
really didn't need those instructions did you? When you opened
the Adventure Works 01 database, the Database window appeared on your
screen. The Database window toolbar appears along the top of the Database
window and contains the Open button, Design button, New button, Delete
button, and options for displaying the items listed in the Database
window. The
Objects bar and
Groups bar
appear along the left side of the Database window. The Objects bar
includes the part of the Database window under the word
Objects.
Object is a
generic term that refers to any component of an Access database. The
Objects bar lists the major types of objects in an Access database:
tables,
queries,
forms,
reports,
pages,
macros, and
modules.
The foundation for all other types of objects in Access is the table,
because tables store the data that the other objects use to perform
procedures and activities in Access. A table is made up of
fields and
records
that are displayed in a row-and-column format with fields as the columns
and records as the rows. A field can contain data about a person, place,
product or service, event, or other entity. For example, a field would
contain all the last names or phone numbers in a table. Each field in a
table has a field name,
also called a label, which appears at the top of the column. For
example, a field that holds all the last names for the guests at Adventure
Works could be called LastName. A collection of related fields forms a
record. For example, a resort guest’s FirstName, LastName, Address, City,
State, and PostalCode fields might make up a single guest record. The
intersection of a record (row) and a field (column) is called a
cell.
Tables store all the information in a database, but if you want
to view only selected fields and records in the database, you use a query.
A query extracts specific data from one or more tables based on search
criteria. For example, you could create a query for the reservations table
for Adventure Works to only list records for guests who have made
reservations after June 2004. The query might list each guest’s
identification number (or guest ID), reservation dates, number of
occupants, and reserved room number. Another way to view information
in a database is to use a form, as shown in the following figure. A form
displays a single record at a time in a specified format. Forms can also
be used to add new information to a database. If you want to display or
print the data from a table or query, you can also create a report. Unlike
a form, a report can be used to display multiple records. Although this
sounds similar to a table, a report can be formatted in different ways to
make the information easier to use and more attractive than a table. For
example, you could create a report that contains a formatted title, a
header or footer, and an attractive background. Reports, like queries, can
also be customized to show data from only specific fields in a table
instead of from all fields.
You have just
learned how to open a database, and the database should still be open. You
will now use the Objects bar of the Database window to determine what
types of objects exist in this database.
On the Objects bar,
click Tables, if necessary.
The names of the tables
in Adventure Works 01 appear, along with options to Create Table In Design
View, Create Table By Using Wizard, and Create Table By Entering Data.
On the Objects
bar, click Queries.
The options to Create
Query In Design View and Create Query By Using Wizard appear. There are
currently no queries in the Adventure Works 01 database
On the Objects bar,
click Forms.
One form name,
frmEmployees, appears, along with the options to Create Form In Design
View and Create Form By Using Wizard.
On the Objects bar,
click Reports.
The options to Create
Report In Design View and Create Report By Using Wizard appear. Currently
the Adventure Works 01 database contains no reports.
On the Objects bar,
click Pages.
The options to Create
Data Access Page In Design View, Create Data Access Page By Using Wizard,
and Edit Web Page That Already Exists appear. There are no data access
pages in the Adventure Works 01 database.
On the Objects bar,
click Macros.
There are no macros in
the Adventure Works 01 database.
On the Objects bar,
click Modules.
There are no modules in
the Adventure Works 01 database.
Understanding Datasheet View and Design View
Every Access object has two or more views. Tables are most
commonly viewed in one of two formats, or views:
Datasheet view
and Design view.
You switch between the two views by clicking the View button on the Table
Design and Table Datasheet toolbars. You can choose other views by
clicking the down arrow to the right of the View button and selecting a
view from the drop-down list. Design view allows you to design the
structure of a table by deciding what fields will appear in the table,
customizing the process of entering data into the fields, and determining
how the data will appear to users. The Adventure Works database includes
tblEmployees, a table that contains basic information, such as addresses
and phone numbers, about the resort’s employees.
We will do more of this in the next assignment.
The Field Name column contains the names of the fields in the
table. The Data Type column allows you to decide what kind of data (for
example, alphabetical or numerical) can be entered into a field. The lower
part of the Table Design view window allows you to set specific properties
for each field. When you display the table in Datasheet view, the actual
data in the table appears. For example, in tblEmployees, the field names,
displayed in the Field Name column in Design view, appear from left to
right across the top of the table. The data displayed in some of the
fields may be partially cut off. This is because Access does not
automatically adjust column widths. Changing column widths is discussed in
Lesson 3, “Working with Tables,” and also in Lesson 4, “Creating and Using
Queries.” You have
now opened Access, and explored the Objects bar in the Database window.
You will now open the table tblGuests in Datasheet view, switch to Design
view, and then switch back to Datasheet view.
On the Objects bar,
click Tables.
The list of tables
presently in this database appears.
Click the tblGuests
table name.
Access selects the table, as indicated by the blue rectangle around the
table name.
On the Database window toolbar, click Open.
The table appears in
Datasheet view. When you switch between Datasheet view and Design view,
the picture on the View button changes to show which view the object will
appear in
after the
button is clicked. The View button currently shows the Design view icon,
indicating that is the view you will go to if you click the button.
On the Table
Datasheet toolbar, click the View button.
The table appears in
Design view. Note that the View button now shows the Datasheet icon. That
is the view you will switch to the next time you click the button.
On the Table
Design toolbar, click the View button.
The table appears in
Datasheet view. To open or close a toolbar, you can right-click on
any blank area of the toolbar and then click the name of the toolbar that
you want to open or close on the menu that appears.
Moving Around Many databases contain
large tables that, when opened, do not fit on your screen. To edit and
view all the data in a database, you need to know how to move around
within a table. One way to navigate within a table is to use the
navigation buttons
in the bottom-left corner of a table. The navigation buttons are
shown below

You previously opened the tblGuests table and switched
between Design and Datasheet view. It should still be open in Datasheet
view. In this exercise, you will use the mouse pointer to select a cell in
tblGuests, and then you will use the navigation buttons and scroll bars to
navigate to different locations within the table.
In the Address field
of the first record, click between 1000 and Jefferson.
A blinking insertion
point appears in the field.
On the scroll bar on
the right side of the table, drag the scroll box down until the record for
guest ID 49, Kim Ralls, is visible.
The insertion point has
not moved, and is currently invisible. It is still in the first record in
the database. Moving the scroll bar displayed different data, but did not
affect the location of the insertion point.
In the FirstName
field, click after the word Kim.
The insertion point now
appears in this record after the word
Kim.
On the scroll
bar at the bottom of the table, click the right scroll arrow button until
the MailingList field is visible, if necessary.
The table scrolls to
the right one field each time you click the scroll arrow.
On the scroll bar at
the bottom of the table, click the left scroll arrow button until the
GuestID field appears.
The table scrolls to
the left, again one field at a time each time you click the arrow.
In the GuestID
field, click in the record for Kim Ralls.
The insertion point
appears in the GuestID field. The location of the insertion point depends
on where in the field you clicked.
Click in the Specific
Record box, delete the existing number, type 35, and then press Enter.
Access selects
the GuestID field in record number 35.
Click the Previous
Record button.
Access selects the
GuestID field in record number 34.
Click the Next Record
button.
Access selects the GuestID field in record number 35.
Click the Last Record
button.
Access selects the GuestID field in record number 49.
Click the First
Record button.
Access selects the
GuestID field in record number 1.
You can also use the
keyboard to navigate within a table by pressing keys called
shortcut keys
on the keyboard.
After you become proficient with the shortcut keys, this approach can
sometimes be a faster way to navigate than using the mouse. The
following shortcut keys can be used to navigate within a table:
Tab
To the next
field in the current record.
Enter
To the next field.
Page Up
Up by one
screen, selecting a record farther up in the table.
Page Down
Down by one
screen, selecting a record farther down in the table.
Right arrow key
To the next
field in the current record.
Left arrow key
To the previous
field.
Down arrow key
To the next record.
Up arrow key
To the
previous record.
Home
To the first field of
the current record.
End
To the last field of
the current record.
Ctrl+Down arrow
To the last
record in the current field.
Ctrl+Up arrow
To the first
record in the current field.
Ctrl+Home
To the first
field of the first record.
Ctrl+Page Down
To the right by
one screen, selecting a field farther right in the table.
Ctrl+Page Up
To the left by
one screen, selecting a field farther left in the table.
Ctrl+End
To the last
field of the last record.
Shift+Tab
To the previous
field.
You have seen how you can use the mouse and the navigation
buttons to move among records and fields. You can also use the keyboard
and keyboard shortcut keys to navigate among the records in the tblGuests
table. You will see how easy it is to jump from one record to another
specific point in the table.
With the GuestID
field in the first record selected, press Tab.
Access selects the
FirstName field in the first record.
Press Enter.
Access selects
the LastName field in the first record.
Press Page Down.
The table moves
down one screen, causing Access to select a record farther down in the
table. The record you end up in will vary depending on your display
settings and the size of your datasheet window.
Press Page Up.
The table moves
up one screen, causing Access to select the first record.
Press the Right arrow
key. Access
selects the Address field in the first record.
Press the Left arrow
key. Access
selects the LastName field in the first record.
Press Shift+Tab.
Access selects
the FirstName field in the first record.
Press the Down arrow
key. Access
selects the FirstName field in the second record.
Press the Up arrow
key. Access
selects the FirstName field in the first record.
Press End.
Access selects
the MailingList field in the first record.
Press Home.
Access selects
the GuestID field in the first record.
Press Ctrl+End.
Access selects
the MailingList field in the last record.
Press Ctrl+Home.
Access selects
the GuestID field in the first record.
Click the Close
button in the top-right corner of tblGuests.
The table closes.
Now that we know how to do all that download
access homework 1 fill in the
blanks. Then
save and close the
file. Email your completed file as an attachment
to me. Good job well done.
|