Notes 2_ Create Database Tables
Notes 2_ Create Database Tables
KEY TERMS
• Application Parts
• Quick Start
• template
30
Create Database Tables 31
SOFTWARE ORIENTATION
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.
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.
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
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.
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
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
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
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
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
STEP BY STEP Create a Table Using the Application Parts Gallery and Quick Start
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.
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
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
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.
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.
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.
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
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
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
Competency Assessment