Tải bản đầy đủ (.ppt) (36 trang)

access tutorial building a database and defining table relationship

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (3.32 MB, 36 trang )

®
Microsoft Office 2010



XPXPXP


Learn the guidelines for designing databases
and seng eld properes

Modify the format of a eld in Datasheet view

Create a table in Design view

Dene elds and specify a table’s primary key

Modify the structure of a table
 !"#" 
XPXPXP


Import data from an Excel worksheet

Create a table by imporng an exisng table
structure

Add elds to a table with the Data Type gallery

Delete, rename, and move elds


Add data to a table by imporng a text le

Dene a relaonship between two tables
 !"#" $
XPXPXP
%&
 !"#" '
XPXPXP
()

Idenfy all the elds needed to produce the
required informaon

Organize each piece of data into its smallest
useful part

Group related elds into tables

Determine each table’s primary key

Include a common eld in related tables

Avoid data redundancy

Determine the properes of each eld
 !"#" *
XPXPXP
()+,-



You must name each
eld, table, and other
object

Choose an
appropriate data type
 !"#" .
XPXPXP
()+,-

The -+/0denes a eld value’s
maximum storage size for Text, Number, and
AutoNumber elds only

Byte

Integer

Long Integer

Single

Double

Replicaon ID

Decimal
 !"#" 1
XPXPXP
2-3)-

&
 !"#" 4
XPXPXP
2&

Creang a table in Design view involves
entering the eld names and dening the
properes for the elds, specifying the primary
key, and saving the table structure
 !"#" 5
XPXPXP
-&

In the Field Name box, type the name for the
eld, and then press the Tab key

Accept the default Text data type, or click the
arrow and select a di1erent data type for the
eld. Press the Tab key

Enter an oponal descripon for the eld, if
necessary

Use the Field Properes pane to type or select
other eld properes, as appropriate
 !"#" #"
XPXPXP
-&
 !"#" ##
XPXPXP

+)03060
&

Display the table in Design view

Click in the row for the eld you’ve chosen to be
the primary key to make it the acve eld. If the
primary key will consist of two or more elds,
click the row selector for the rst eld, press and
hold down the Ctrl key, and then click the row
selector for each addional primary key eld

In the Tools group on the Design tab, click the
Primary Key bu6on
 !"#" #
XPXPXP
+)03060
&
 !"#" #$
XPXPXP
-

To move a eld, you use the mouse to drag it
to a new locaon in the Table window in the
Table Design grid
 !"#" #'
XPXPXP
-
78-


In the Table window in Design view, select the
row below where you want the new eld to be
inserted

In the Tools group on the Design tab, click the
Insert Rows bu6on

Dene the new eld by entering the eld
name, data type, oponal descripon, and any
property specicaons
 !"#" #*
XPXPXP
-
78-
 !"#" #.
XPXPXP

 !"#" #1
XPXPXP
93)378
%:

The 3process allows you to copy the
data from a source without having to open the
source le

Click 78 on the Ribbon

Click the 78 bu6on in the Import & Link
group to start the wizard

 !"#" #4
XPXPXP
93)378
%:
 !"#" #5
XPXPXP
93)378
%:
 !"#" "
XPXPXP
93)378
%:
 !"#" #
XPXPXP
2093
78+

Make sure the External Data tab is the acve tab on
the Ribbon

In the Import & Link group, click the bu6on

Click the bu6on

Navigate to the le

Make sure the 93;<;)3;;
3;3
opon bu6on is selected, and then click the 6
bu6on


Click the bu6on
 !"#" 
XPXPXP
2093
78+
 !"#" $
XPXPXP
-=
0(0

The 00, available in the Add &
Delete group on the Fields tab, allows you to
add a group of related elds to a table at the
same me, rather than adding each eld to the
table individually

The group of elds you add is called a >:
+
 !"#" '
XPXPXP
-=
0(0
 !"#" *

×