Creating a Database - PowerPoint PPT Presentation

1 / 23
About This Presentation
Title:

Creating a Database

Description:

They must be set up correctly so that the entire database can perform properly. ... Click into the first field of the last record ... – PowerPoint PPT presentation

Number of Views:144
Avg rating:3.0/5.0
Slides: 24
Provided by: services1
Category:

less

Transcript and Presenter's Notes

Title: Creating a Database


1
Chapter 2
Creating a Database
2
Chapter 2 Overview
Chapter 2 gives you an in-depth look at tables
and their structure. Tables contain data and are
the heart of a database. They must be set up
correctly so that the entire database can perform
properly.
3
Introducing Database Files
  • Access database files are stored with an .mdb
    extension.
  • They should have descriptive names, such as
  • Customers (Customers.mdb)
  • Music (Music.mdb)
  • States (States.mbd)

4
Introducing Database Files
Database files contain objects that work together
  • Tables
  • Reports
  • Forms
  • Queries
  • Data access pages
  • Macros
  • Modules

5
Creating Database Files
There are two ways to create a new database
  • Design it yourself
  • Creating a database yourself means you have to
    make each database object, one at a time.
  • Use the Database wizard
  • The wizard creates all objects from one of the
    sample templates you select.

6
Creating a New Database
  • Click on Create a New File
  • Choose Blank Database

7
The Database Window
The Database window is the main launching point
for working with database objects.
Each group of objects has its own button.
Object names appear in the viewing area.
8
Creating a Table
  • Tables contain data and must be created before
    other objects in the database.

You can create each table manually, or use the
Table wizard to make new tables.
9
Design View Window
For creating or modifying a table.
Company Text Company Name
Tables are built manually by adding new fields,
one per line.
Fields are created by typing a field name, data
type and description for each one.
10
Adding Fields
  • Field name
  • Should be descriptive.
  • Can be up to 64 characters in length.
  • Data Type
  • Most fields are text type, but can be numeric,
    date, yes/no, and so forth.
  • Description
  • Identifies field
  • Optional

11
Saving the Table Design
  • Click on the Save button.
  • Type a descriptive table name with the tbl
    prefix. For example, tblProducts.
  • Assign a primary key, if you have determined one.

12
Setting Field Properties
Field properties determine the appearance of
data, and the characteristics of the data entered
into the field.
For example A State field can be controlled with
properties
Property Setting Looks/Behaves Like Format All
Caps CO (instead of co) Required Yes Cant be
left blank Field size 2 CO (not COLORADO)
13
General Properties
  • Field Size
  • Default Value
  • Decimal Places
  • Format
  • Caption
  • Input Mask
  • Validation Rules and Validation Text
  • Required, Zero Length, and Indexed

14
Lookup Properties
  • These properties determine how special fields
    look and behave.
  • For example, on a form
  • Fields can have their contents restricted to a
    specific list of values
  • Yes/No fields can look like check boxes.

15
Establishing a Primary Key
  • The primary key uniquely identifies each record.
    All tables should have one.
  • While in Design view
  • Select the primary key field
  • Click on the key button.

16
Printing the Table Design
  • Printing the table design gives you a list of
  • Field names
  • Data types
  • Descriptions
  • Properties

You should keep a printed copy for every table in
the database. Its helpful to have printouts when
modifying a database.
17
Modifying Table Design
  • You can change fields and properties any time.
  • Use the Design view.
  • Be cautious when changing primary keys and their
    properties.
  • (It could affect other tables.)

Change field names and properties only when
necessary. Queries, forms, reports, and other
objects that use the table may also need to be
modified.
18
The Datasheet View
  • This view is for viewing and modifying data.

19
Comparing Datasheet and Design View
  • Datasheet view is for entering and editing
    records (data).
  • Design view is for entering and modifying field
    names, data types, properties (table design ).

20
Datasheet and Design View
Click buttons to switch between views
Design view button
Datasheet view button
21
Entering Records
  • Open the table in Datasheet view
  • Click into the first field of the last record
  • Use the Enter key, the Tab key or the mouse to
    move between fields

22
Working with the Datasheet
  • You can
  • Resize Columns
  • Rearrange Columns
  • Freeze Columns
  • Hide Columns
  • Print Records

23
Closing and Exiting Access
  • Choose the Close command from the File menu
  • Or
  • Choose the Exit command from the File menu
  • Or
  • Click the Close button
Write a Comment
User Comments (0)
About PowerShow.com