MS Access Database

Download Report

Transcript MS Access Database

Database Systems
Introduction to
Microsoft Access
Part 1
1
Introduction
• In its simplest form, Access is a
database application
• It uses a relational database
management model, which means
you can relate each piece of
information to other pieces of
information by joining them.
2
Create Tables
• By using wizard
• By entering data
• By design view
– specify field name, data type
– set general attributes
– set primary key
3
Establish Relationships
• Click the relationships button on the
toolbar
• Tables are related by matching fields.
4
Types of Queries
• Select query
• Update query
• Append query
• Delete query
5
Create Queries
• By using wizard
– select table, fields
– Not convenient to design complex
query
• By design view
• By SQL view
– Input SQL sentence directly
6
Microsoft Access
7
Defining a New Data Base
8
Naming the Data Base
File
Name
OK
Change Name/Directory
9
The New Data Base
10
Tables
General Relational Data base Table
Fields
Row
or
Record
Id
214
215
320
Name
Jones
Age
25
Address
1 New St, Malvern
Key Field (Indexed)
11
Access Table
12
Define Fields in Table
13
Add The Name Field
14
Select Field Type
15
Set the Field’s Parameters
16
Name as Primary Key
17
Define the Image Field
Select
OLE
Object
18
Image Parameters
19
Click to Save the Table
Click
Yes
20
Name the Table
21
Table1 is now in the Database
22
Select Forms
Select
New
Form
23
Associate Form with Table
Relate
Form
To
Table
24
Create Form for Table1
Select
Form
Wizard
25
Select AutoForm
26
New Form -Run Mode
27
Close the Form
28
Save the Form
Select
Yes
29
Name the Form
30
Form is part of the Database
Form in
Database
31
Modify the Form
32
Delete the Current Title
Click
The
Title
and
Press
Delete
33
Select A in ToolBox for Title
34
Properties
35
Save the Change
36
Run The Form
Click Open
or
Double Click
The Form
37
Add an Image Record
38
Type in the Name
39
Select ClipArt File
40
Copy Butterfly to Clipboard
41
Paste Butterfly to Image
42
The Butterfly goes to Image
43
Enter Next Record
44
Insert Object
Right
Mouse
Click
45
Select Object Type
46
Select Graph
47
Graph
48
Clip Art
49
Cartoon
50
Add a “Next” Button
51
Name the Button
52
The Button Event
53
Exit Button
54
Name the “Exit” Button
55
The Exit Button
56
End of Lecture
57