Creating Database Tables: Software Orientation
Creating Database Tables: Software Orientation
SOFTWARE ORIENTATION
Getting Started with Microsoft Access
Th Access startup screen shown in Figure 2-1 provides options for opening an existing database,
and creating a new blank database or a new database from a template. This is the default view after
starting Access.
Figure 2-1
The Access startup
screen
Click to
access Open
dialog box
Microsoft
templates
22
Creating Database Tables 2323
CREATING A DATABASE
In Access 2016, the process of creating a new database is easier than ever. You can create a data-
base 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, make sure that your computer is on. Sign on, if
necessary. LAUNCH Access to display the startup screen.
1. On the top of the startup screen window, in the Search for online templates search box,
type personal, and then press Enter.
2. In the list of Personal templates that appears in the middle of the startup screen results
pane, click Home inventory. A preview screen of the selected template appears in
the center of the startup screen, as shown in Figure 2-2. Close the Home inventory
template preview screen.
Figure 2-3
The 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,
Access.accdb.
6. Click the folder icon to the right of the File Name box. The File New Database dialog
box appears.
7. Navigate to the location where you want to save the file and then click OK.
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.
Take Note Unless you choose a different folder, Access uses the following default location in Windows Server
2008/2012, and Windows 7 and later to store your databases: c:\Users\<user name>\Documents
8. Click the Create button at the bottom of the preview pane. The preview pane indicates
that the template is being downloaded. When the download is complete, the preview
pane closes.
9. Access creates and then opens the Assets database, as shown in Figure 2-4. Because
this database was downloaded from Office.com (a trusted source), click Enable
Content on the Message Bar. Getting Started and Access 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 Assets database with the Asset List form
active.
Creating Database Tables 2523
Figure 2-4
The Assets template database
10. Click to place the insertion point in the first cell of the Item field and then type Canon
EOS Rebel T3i. Press Enter.
11. Click the Shutter Bar Open/Close Button, if necessary, to display the Navigation Pane
to see all the objects in the database.
12. Click File and then click Close to close the database.
2. In the templates section of the New screen, click the Blank desktop database icon. A
Blank desktop database screen appears in the center of the screen, as shown in Figure
2-5.
26 Lesson 2
Figure 2-5
A Blank desktop database
screen
With the insertion point placed in the first empty cell of your new, blank database, you can begin
typing 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 ap-
propriate data. Any time 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.
Take Note A database has to be saved first before any objects like tables, queries, forms or reports can be
added to it. For example, you cannot create a table first and then create the database to hold it.
CREATING A TABLE
It is easy to create a new table by using the Application Parts gallery and Quick Start.
Application Parts were introduced in Access 2010 and consist of predefined templates that
you can add to an existing database to help extend its functionality. Another way to create a table
is to copy the structure of an existing table and then 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.
Blank Forms and Quick Start. The Blank Forms category contains a collection of form parts that
allows you to add predefined forms to a database. The Quick Start category of these templates
contains a collection of predefined objects arranged by parts for tracking things such as com-
ments, contacts, and issues. In this exercise, 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
GET READY. USE the BlankDatabase database that is still 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-6.
Figure 2-6
The Application Parts gallery
2. In the Quick Start section of the gallery, click Comments. If you are prompted to close
all open objects before instantiating this application part, click Yes in the dialog box
that appears. Notice the Comments table appears as a new object in the Navigation
Pane.
3. Click the Enable Content button on the Message Bar to trust the database if necessary.
4. In the Navigation Pane, double-click Comments to display the newly created table with
fields for comments. CLOSE the Comments table by clicking the Comments table Close
button.
5. OPEN the Application Parts menu and then click Contacts.
6. In the Create Relationship dialog box that appears, select the There is no relationship
option button and then click Create. A new table is created along with supporting
forms and report objects, as shown in Figure 2-7.
28 Lesson 2
Figure 2-7
New table, forms, and reports
for contacts
GET READY. USE the BlankDatabase database that is still open from the previous exercise.
1. On the Navigation Pane, right-click the Comments table database object and then
select Copy from the shortcut menu.
2. Right-click in a blank area of the Navigation Pane and select Paste from the shortcut
menu. The Paste Table As dialog box appears, as shown in Figure 2-8. Notice the
default name, Copy Of Comments, in the Table Name box.
3. In the Paste Options section, select the Structure Only option button to paste only the
table’s structure.
4. Click OK. The new table appears at the end of the list of database table objects in the
Navigation Pane.
Creating Database Tables 2923
Figure 2-8
Paste Table As dialog box
5. 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, as shown in Figure 2-9.
Figure 2-9
New table copied from
existing table
When you create a copy of a table by copying and pasting, you can re-create just the table’s struc-
ture or both its structure and data. Access also provides you with a third option that appends data
to an existing table. If this option is chosen, Access will attempt to append the table’s records to
another table you specify.
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.
30 Lesson 2
Saving a Table
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. In this exercise,
you save a database table, and then use the Save Object As command to create a duplicate of the
same table.