0% found this document useful (0 votes)
2 views

Notes 2_ Create Database Tables

This document provides a lesson on creating database tables using Microsoft Access 2010, focusing on creating databases from templates and blank databases. It outlines the steps for using templates, creating tables, and saving database objects, along with key terms and a skill matrix related to database management. The lesson aims to equip users with the necessary skills to manage and organize data effectively within Access.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Notes 2_ Create Database Tables

This document provides a lesson on creating database tables using Microsoft Access 2010, focusing on creating databases from templates and blank databases. It outlines the steps for using templates, creating tables, and saving database objects, along with key terms and a skill matrix related to database management. The lesson aims to equip users with the necessary skills to manage and organize data effectively within Access.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

2 Create Database Tables

LESSON SKILL MATRIX


Skill Exam Objective Objective Number

Creating a Database Create a database from a template. 1.1.6


Creating a Table Use user templates. 1.3.3
Saving a Database Object Use Save Object As. 1.1.1

KEY TERMS
• Application Parts
• Quick Start
• template

30
Create Database Tables 31

As an assistant curator at the Baldwin Museum of Science, you are responsible


A
ffor
o the day-to-day management of the insect collection, including duties such as
ssorting
o and organizing specimens, as well as supervising the mounting and label-
ing of the insects. The insect collection catalog has never been transferred to an
in
electronic database. Because you have experience with database management,
e
part of your responsibility is to create a database to store the information about
p
tthe
h specimens and collections, as well as museum exhibits and events, a task
perfectly suited to Access 2010. In this lesson, you learn how to create a blank
p
database and how to use a template to create a database. You also learn how to
d
ccreate a table from a template, how to create a table by copying the structure from
another table, and how to save a database object.

SOFTWARE ORIENTATION

Getting Started with Microsoft Access


The New tab in the Backstage view, shown in Figure 2-1, provides options for creating a
database. This is the default view after starting Access. The Backstage view is also where you
can create a new, blank database. Use this figure as a reference throughout this lesson as well
as the rest of this book.

Create a new blank Search Office.com for Featured Office.com


database templates box template options

New
tab

Figure 2-1
New tab in Backstage view
32 Lesson 2

CREATING A DATABASE
In Microsoft Office Access 2010, the process of creating a new database is easier than ever. You
The Bottom Line
can create a database using one of the many available templates (ready-to-use databases that
contain all of the tables, queries, forms, and reports needed for performing specific tasks) or by
creating a new blank database.

Using a Template to Create a Database


Access offers a variety of templates to help get you started. Some templates are immediately
available for your use since they are built into Access, while you can easily download others from
Office.com. Microsoft or users have created the templates found at Office.com. User-submitted
templates have a specific thumbnail associated with them, as outlined in Figure 2-4. Built-in
1.1.6 and Office.com templates are available that can be used to track issues, manage contacts, or keep
a record of expenses. Some templates contain a few sample records to help demonstrate their
How do you create databases
use. You can use templates as is, or you can customize them to better suit your purposes. In this
from templates?
exercise, you use one of the many available templates to create a database.

STEP BY STEP Use a Template to Create a Database

GET READY. Before you begin these steps, be sure that you are logged on to the Internet.
LAUNCH Microsoft Access to display the Backstage view.
1. In the center of the Backstage view window, in the Search Office.com for Templates
box, key Personal and press Enter on the keyboard.
2. In the list of Office.com Personal templates that appears in the middle of the
Backstage view results pane, click Home inventory. A preview of the selected template
appears in the preview pane on the right side of the Backstage view window, as
shown in Figure 2-2.

Information about selected template displayed

Figure 2-2
Office.com Personal templates

3. In the Office.com templates search box, key Education and press Enter on the
keyboard.
Create Database Tables 33

4. In the list of Office.com Education templates that appears, click Faculty. Your screen
should look similar to Figure 2-3.

Figure 2-3
Office.com Faculty template

5. In the Office.com templates search box, key in Assets and press Enter on the
keyboard. Your screen should look similar to Figure 2-4.

Office.com Office.com
user-submitted template Microsoft template

Figure 2-4
Office.com Assets templates

6. In the list of Office.com Business templates in the middle, click Asset tracking
database.
34 Lesson 2

Take Note Throughout this lesson you will see information that appears in black text within brackets, such as
[Press Enter], or [your e-mail address]. The information contained in the brackets is intended to
be directions for you rather than something you actually type word-for-word. It will instruct you
to perform an action or substitute text. Do not type the actual text that appears within brackets.

7. In the preview pane on the right of the Backstage view, click in the File Name box and
key [your initials] at the end of the suggested file name, so that the file name is now
Assets XXX (where XXX is your initials), as shown in Figure 2-5.

Thumbnail
of selected
template

Opens File New


Database dialog
box

Names the file

Figure 2-5
File Name box and folder icon

Take Note If you do not add an extension to your database file name, Access does it for you—for example,
AccessXXX.accdb.

8. Click the folder icon to the right of the File Name box. The File New Database dialog
box appears, as shown in Figure 2-6.

Figure 2-6
File New Database dialog box

9. Navigate to the location where you want to save the file and click OK.
Create Database Tables 35

Take Note You should save your files in a separate directory from where your data files are stored. This will
ensure that you don’t overwrite the original data files with your updated files. Check with your
instructor to see if she wants you to save your work on a flash drive or in a particular network
directory.

10. Click the Download button at the bottom of the Preview pane. The Downloading
Template dialog box opens and indicates that the template is being downloaded,
as shown in Figure 2-7. When the download is complete, the dialog box closes.

Figure 2-7
Downloading Template
dialog box

11. Access creates and then opens the AccessXXX database. Getting Started and Access
2007 Help windows may appear, which contain helpful videos and links about using the
Asset tracking database. Close these windows, if necessary, to return to the AccessXXX
database with the Asset List table active, as shown in Figure 2-8. Click to place the
insertion point in the first cell of the Item field and key Canon EOS Rebel 300D.

Access 2007 on the title bar specifies format of


databases created with Access 2010, not the version

Figure 2-8
Assets template database

Take Note When you open an Access database template that was created in Access 2007 (such as the Asset
tracking database), Access may open the Access 2007 Help menu as well.

Troubleshooting If you are asked to enable the content, click the Enable Content button on the Security
Warning Message Bar. By default, Access blocks potentially harmful content that might
contain viruses or present other security issues. This content should only be enabled if the
database is downloaded from a trustworthy site, like Microsoft Office Online.
36 Lesson 2

12. Click the Shutter Bar Open/Close Button, if necessary, to display the Navigation Pane,
as shown in Figure 2-9, to see all the objects in the database.

Shutter Bar
Open/Close Button

Objects in
downloaded
database
displayed in
Navigation
Pane

Figure 2-9
Assets database with
Navigation Pane displayed

13. CLOSE the database.


PAUSE. LEAVE Access open to use in the next exercise.

Take Note Unless you choose a different folder, Access uses the following default locations to store your
databases:
• Microsoft Windows Server 2008, Microsoft Windows 7, and Microsoft Windows Vista—
c:\Users\user name\Documents
• Microsoft Windows Server 2003 or Microsoft Windows XP—c:\Documents and Settings\
user name\My Documents

Creating a Blank Database


If you have existing data, you may decide that it is easier to create a blank database rather than
using a template, because it would require a lot of work to adapt your existing data to the tem-
plate’s defined data structure. When you create a new blank database, Access opens a database
that contains a table where you can enter data, but it creates no other database objects. By de-
fault, Access creates a primary key field named “ID” for all new datasheets, and it sets the data
type for the field to AutoNumber. In this exercise, you create a new blank database.

STEP BY STEP Create a Blank Database

GET READY. The Backstage view should be on the screen from the previous exercise.
1. Click the Blank database icon in the Available Templates section of Backstage view.
A Blank database thumbnail image appears in the Preview pane, as shown in
Figure 2-10.
Create Database Tables 37

Blank Database pane

Figure 2-10
Blank database pane 2. In the File Name box below the thumbnail, key Blank Database XXX (where XXX is
your initials).
3. If you want to save the file in a location other than the one shown beneath the File
Name box, click the folder icon to the right of the File Name box and browse to a
different location.
4. Click the Create button to create the blank database in your chosen location. Access
creates the database, and then opens an empty table named Table1 in Datasheet View,
as shown in Figure 2-11.

Figure 2-11
New blank database PAUSE. LEAVE the database open to use in the next exercise.

Ref You learn more about defining and modifying a primary key in Lesson 3.
38 Lesson 2

With the insertion point in the first empty cell of your new, blank database, you can begin
keying to add data. Entering data in Datasheet View is very similar to entering data into an
Excel worksheet, except that data must be entered in related rows and columns, starting at the
upper-left corner of the datasheet.
The table is structured through rows and columns, which become meaningful as you enter
appropriate data. Anytime you add a new column to the table, Access defines a new field for
that column’s data. You do not need to format your data by including blank rows or columns,
as you might do in an Excel worksheet, because that just wastes space in your table. The table
merely contains your data. All visual presentation of that data will be done in the forms and
reports that you design later.

Ref You learn more about creating forms and reports in Lessons 5 and 6.

SOFTWARE ORIENTATION

Templates Group and Application Parts


The Templates group on the Create tab contains the Application Parts gallery that you can use to
insert predefined templates consisting of objects like tables, forms, and reports into a preexisting
database. Use Figure 2-12 as a reference throughout this lesson as well as the rest of this book.

Figure 2-12 Application Parts button


Application Parts gallery accesses gallery

Blank
Forms
category

Quick
Start
category

CREATING A TABLE
It is easy to create a new table by using the Application Parts gallery and Quick Start. Application
Parts are new to Access 2010 and consist of predefined templates that you can add to an existing
The Bottom Line database to help extend its functionality. Another way to create a table is to copy the structure of
an existing table and paste it into the database. You can copy a database object and paste it into the
same database or into a different database that is open in another instance of Access.

Ref You learn more about creating forms using the Application Parts gallery in Lesson 10.
Create Database Tables 39

Using the Application Parts Gallery and Quick Start


Application parts vary from a single table to a collection of database objects like tables, forms, and
reports. The Application Parts gallery consists of two categories, Blank Forms and Quick Start. The
NEW Blank Forms category contains a collection of form parts that allows you to add predefined forms
to Office 2010 to a database. The Quick Start category of these templates contains a collection of predefined
objects arranged by parts for tracking things such as comments, contacts, and issues. In this exer-
cise, you will quickly create a table using the Application Parts Gallery and Quick Start.

STEP BY STEP Create a Table Using the Application Parts Gallery and Quick Start

USE the database that is open from the previous exercise.


1. On the Create tab, in the Templates group, click the Application Parts button to display
the gallery shown in Figure 2-13.

Figure 2-13
Application Parts gallery

2. In the Quick Start section of the gallery, click Comments. Click Yes on the Microsoft
Access dialog box that appears asking to close all open objects before instantiating
this application part to close the empty table that appeared when you created the
blank database in the previous exercise, and return to the Blank database screen with
the Comments table open.
3. In the Navigation Pane, double-click Comments to display the newly created table with
fields for comments, as shown in Figure 2-14. Close the Comments table by clicking
on the Comments table close button.

Comments table tab

New table
object named
Comments in
Navigation
Pane

Figure 2-14
New Comments table
for comments
40 Lesson 2

4. On the Application Parts menu, click Contacts. In the Create Relationship dialog box that
appears, select the There is no relationship radio button then click Create. A new table is
created along with supporting forms and report objects, as shown in Figure 2-15.

Newly created
Tables, Forms
and Report
objects

Figure 2-15
New table, forms, and reports
for contacts

PAUSE. LEAVE the database open to use in the next exercise.


1.3.3
How do you create tables by
using user templates?

Ref You learn how to create a custom table in Lesson 9.

Creating a Table from Another Table


Another way to create a table is to copy the structure of an existing table using the Copy
and Paste commands. In this exercise, you copy the structure of an existing table to create a
new table.

STEP BY STEP Create a Table from Another Table

USE the database that is open from the previous exercise.


1. On the Navigation Pane, right-click the Comments table database object to display the
menu shown in Figure 2-16.
Create Database Tables 41

Figure 2-16 Right-click to display menu


Database object menu

Another Way
You can also copy
a database object by selecting
it in the Navigation Pane and
pressing Ctrl⫹C. Or on the
Home tab, in the Clipboard 2. Click Copy.
group, you can click the Copy 3. Right-click in a blank area of the Navigation Pane and, in the shortcut menu that
button. appears, click Paste (see Figure 2-17).

Figure 2-17
Shortcut menu

Right-click
to display
menu
Another Way
You can also paste
a database object by selecting
the destination location in the
Navigation Pane and pressing
Ctrl+V. Or on the Home tab, in
the Clipboard group, you can 4. The Paste Table As dialog box appears, as shown in Figure 2-18. Notice the default
click the Paste button. name, Copy Of Comments, in the Table Name box.

Figure 2-18
Paste Table As dialog box
42 Lesson 2

5. In the Paste Options section, select the Structure Only radio button, to paste only the
table’s structure, rather than pasting a copy of the table’s data along with its structure.
6. Click OK.
7. The new table appears at the end of the list of database table objects in the Navigation
Pane, as shown in Figure 2-19.

Figure 2-19
New table copied from
existing table

New copied table


appears at the end
of the list of database
objects

8. Double-click Copy Of Comments to open the new table. Notice that the structure of the
new table is the same as the table from which it was copied.
PAUSE. CLOSE the database.
LEAVE Access open for the next project.

When you create a copy of a table by copying and pasting, you have the option of re-creating
just the table’s structure, or both its structure and data. To paste just the structure of the table,
click Structure Only. To also paste the data, click Structure and Data.
As you learned in Lesson 1, a relational database stores information in separate tables that are con-
nected or linked by a defined relationship that ties the data together. When you add a new table
to an existing database, that new table stands alone until you relate it to your existing tables. For
example, say you need to track orders placed by a distributor. To do that, you add a table named
Distributor Contacts to a sales database. To take advantage of the power that a relational database
can provide—to search for the orders placed by a given contact, for example—you must create a
relationship between the new table and any tables that contain the order data.

Ref You learn more about defining table relationships in Lesson 3.

SAVING A DATABASE OBJECT


Access automatically saves data that you have entered any time you add an Application Part
like a Quick Start template, move to a new record, close an object or database, or quit the
application. But you will need to save the design of a table, or any other database object,
The Bottom Line
after it is created. Additionally, using the Save Object As command in the Backstage view,
you can create a duplicate of a database object (like a table, query, or report) by specifying
an alternate name.
Create Database Tables 43

Saving a Table
1.1.1 When you save a new table for the first time, give it a name that describes the information it
contains. You can use up to 64 characters (letters or numbers), including spaces. For example,
How do you use Save you might name a table Orders 2011, Clients, Tasks, Inventory Parts, or Comments. In this ex-
Object As? ercise, you save a database table and then use the Save Object As command to create a duplicate
of the same table.

STEP BY STEP Save a Table

GET READY. The Backstage view should be on the screen from the previous exercise.
1. If necessary, click the New command, then click the Blank database icon; a Blank
Database thumbnail appears in the Preview pane.
2. In the Blank database preview’s File Name box, keep the default name.
3. If you want to save the file in a location other than the one shown beneath the File
Name box, click the folder icon and browse to a different location.
4. Click the Create button. A new blank database appears with the default table labeled
Table1 displayed, as shown in Figure 2-20.

Figure 2-20
New blank database with
default table

5. Click to place the insertion point in the cell under the Click to add field and key
Sample Data.
6. Right-click on the Table1 tab to display the shortcut menu, as shown in Figure 2-21.

Figure 2-21 Right-click to display menu


Shortcut menu

7. Click Save. The Save As dialog box appears, as shown in Figure 2-22.

Figure 2-22
Save As dialog box
44 Lesson 2

8. In the Table Name box, key Sample Table.


Another Way 9. Click OK to close the dialog box and return to the table, which now is labeled
You can also save a Sample Table.
table by pressing Ctrl+S. You do
not need to save new data that 10. Click the File tab to display the Backstage view.
you enter. Access automatically 11. Click Save Object As to display the Save As dialog box.
saves a record when you move 12. In the Table Name box, key Backup of Sample Table.
to a different record or close
13. Click OK.
the object or database.
14. Click the Home tab.
Access also automatically saves
15. Notice the new table object named Backup of Sample Table in the Navigation Pane.
changes to your data whenever
you quit the program. However, 16. CLOSE the database.
if you have made changes to CLOSE Access.
the design of any database
objects since you last saved
them, Access asks whether you
want to save these changes
before quitting.

SKILL SUMMARY
In This Lesson Objective
You Learned How To: Exam Objective Number
Create a Database Create a database from a template. 1.1.6
Create a Table Use user templates. 1.3.3
Save a Database Object Use Save Object As. 1.1.1

Knowledge Assessment

Fill in the Blank


Complete the following sentences by writing the correct word or words in the blanks provided.

1. You can create a database using one of the many templates available or by creating a
new database.
2. By default, Access creates a(n) field named “ID” for all new
datasheets.
3. Entering data in Datasheet View is very similar to entering data in a(n) .
4. The contains predefined templates included in two categories, Blank
Forms and Quick Start.
5. One way to create a table is to copy the of an existing table and
paste it into the database.
6. When you add a new table to an existing database, that new table stands alone until
you it to your existing tables.
7. You can use up to characters (letters or numbers), including spaces,
to name a database object.
8. Several options for creating a database are provided on the tab in
the Backstage view.
9. The category in the Application Parts gallery contains a collection of
predefined database objects for tracking comments, contacts, and issues.
10. After you add to a table, you should save its design.
Create Database Tables 45

Multiple Choice
Select the best response for the following statements.

1. In Access, a template is
a. A database to manage contacts
b. Where a database is stored
c. Two tables linked together
d A ready-to-use database
2. When you create a new blank database, Access opens a database that contains
a. One of each type of database object
b. A table
c. Sample data
d. A template
3. To save a database file in a location other than the default, click the
a. Folder icon
b. Blank database icon
c. File name button
d. Help button
4. The table structure is created when you
a. Format the data
b. Enter data
c. Insert blank rows and columns
d. Switch to Design View
5. The Templates group commands are located on which tab?
a. Home
b. Create
c. Database Tools
d. Datasheet
6. To copy a table, you must first select it in
a. The Clipboard
b. Microsoft Office Online
c. The Navigation Pane
d. Datasheet View
7. When you paste a table, which dialog box is displayed?
a. Table Structure
b. Copy Table
c. Paste Data
d. Paste Table As
8. After you have created a table or other database object, you should
a. Save it with a descriptive name
b. Copy it to create a backup
c. Link it to an external data source
d. Insert a blank column at the end
9. When you quit the program, Access automatically
a. Creates a link between all tables
b. Leaves the Navigation Pane open
c. Saves the data
d. Renames the file
46 Lesson 2

10. Which is not a way to create a new database table?


a. Use Quick Start
b. Choose Create on the Table menu
c. Copy the structure of another table
d. Create a new blank database

Competency Assessment

Project 2-1: Contacts Database


You want to use Access to store, organize, and manage the contact information for the wholesale
coffee suppliers used by Fourth Coffee, where you work as a buyer for the 15 stores in the northeast
region. Use a template to create a database for the contacts.

GET READY. LAUNCH Access if it is not already running.


1. Open Backstage view and in the Office.com Templates section of the New tab, select
the Contacts category.
2. On the next screen that displays, select the Call Tracker template.
3. Key Call tracker XXX (where XXX is your initials) in the File Name box.
4. If necessary, click the folder icon and choose a different location for the file.
5. Click Download (or click Create if not logged on to the Internet) to create and open the
database.
6. Close the Access 2007 Help window that appears.
7. Click the Shutter Bar Open/Close Button to open the Navigation Pane.
8. Click the Supporting Objects header to display the database objects in that group.
9. Right-click the Customers table under the Customers header to display the menu and
click Copy.
10. Right-click in the white area of the Navigation Pane and click Paste on the menu.
11. In the Paste Table As dialog box, key Customers structure.
12. Click the Structure Only radio button.
13. Click OK.
14. CLOSE the Call trackerXXX database.
LEAVE Access open for the next project.

Project 2-2: Database for Restaurants


As a regional manager for a franchise restaurant chain, you want to keep track of restaurant locations
and customer comments. You decide to create a database to store the necessary information.

GET READY. LAUNCH Access if it is not already running.


1. In the Backstage view’s New tab, click the Blank Database icon.
2. In the Blank Database pane on the right, key Restaurants XXX (where XXX is your
initials) in the File Name box.
3. If necessary, click the folder icon and choose a different location for the file.
4. Click the Create button.
5. Right-click the Table1 tab and click Save.
6. In the Save As dialog box, key Locations.
7. Click OK.
LEAVE Access open for the next project.

You might also like