Sie sind auf Seite 1von 36

Access Database Objects

•Table : Holds actual data


•Query : Searches for, sorts and retrieves specific
data
•Form : Lets user enter / display data in a
customized format
•Report : Displays and prints formatted data
•Macro : Automates application tasks without
programming
•Module : Contains code in VBA programming language

IBS, Chennai II IT Workshop on MS Access October 3-6, 2008 #


5 – Step Design Process
Overall System Design

Basic Data Design

Table Design

Form Design

Report Design
IBS, Chennai II IT Workshop on MS Access October 3-6, 2008 #
Access 2007 – File Menu

•Starting MS Access
2007
•Online Templates
•The Office Button
•The File Menu
•Personalize

IBS, Chennai II IT Workshop on MS Access October 3-6, 2008 #


Access 2007 – User Interface

•Access Ribbon
•Navigation Pane
•Workspace

IBS, Chennai II IT Workshop on MS Access October 3-6, 2008 #


Navigation Pane

•Custom
•Object Type
•Tables and Related Views
•Created Date , Modified Date
•Filter by Group
•Unrelated Objects , All
tables

IBS, Chennai II IT Workshop on MS Access October 3-6, 2008 #


The Ribbon

•Divided into
Groups
•Home
•Create
•External Data
•Database Tools
•Datasheet

IBS, Chennai II IT Workshop on MS Access October 3-6, 2008 #


The Status Bar

•View Status
•Switch Views

IBS, Chennai II IT Workshop on MS Access October 3-6, 2008 #


Normalization – 12 Step process
1.Collect raw data
2.List the raw data with its key
3.Remove repeating groups
4.Remove part key dependencies
5.Remove inter-data dependencies
6.Remove inter-key dependencies
7.Apply tests
8.Identify transitive dependencies
9.Optimize
10.Re-apply the tests
11.Draw Entity – Relationship Diagram
12.Use the model to design database

02/11/10 Copyright - ICFAI Business School 8


C o lle ct R a w D a ta
•Identify possible source.
•Include all data that is required to support the system
•Understand the data and its purpose
•Use completed copies of forms and reports
•Record and assumptions

Sales Report by Product


Product No: 714-56 Description: Microwave Oven
Invoice Invoice Date Contact Customer Name Quantity Price
4387 20/03/05 S.
NameDavies S. Davies 1 76.00
5183 14/04/05 M. Scott M. Scott 2 152.00
6420 17/06/05 I. Ramsay I. Ramsay 1 76.00
6786 10/09/05 G. Tell G. Tell 1 76.00
7543 28/10/05 B. Twain B. Twain 3 226.00

02/11/10 Copyright - ICFAI Business School 9


List R a w D a ta – 0 N F
Use a working space as show below
List all data items in col. 1
Make sure data names are from users’ vocabulary and are meaningful
Make sure data names are unique
Select a key and mark it with (#) symbol
This key must have a unique value
As few items as possible (multi-part key)
Non-textual if possible
Any item may be chosen. But appropriate choice simplifies the process
Source document title or layout may suggest the best keys.
Sometimes generated keys may be necessary

0 NF 1 NF 2 NF 3 NF
# Prod No.
Prod. Desc.
Inv. No.
Inv. Date
Contact Name
Customer Name
Quantity
Price

02/11/10 Copyright - ICFAI Business School 10


R e m o ve R e p e a tin g G ro u p s – 1 N F
•Identify and list in col. 2 all items which have more than single value while the
remains single valued. This is a repeating group. There can be more than
one.
•Copy the original key to join the new key in 1 NF relation. Mark it as a
Foreign key (@)
•The foreign key copied will be the primary key of another relation
•Check for nested repeating groups
•List remaining data items and original keys as a final group in 1 NF

0 NF 1 NF 2 NF 3 NF
# Prod No. #@ Prod No.
Prod. Desc. # Inv. No.
Inv. No. Inv. Date
Inv. Date Contact Name
Contact Name Customer Name
Customer Name Quantity
Quantity Price
Price
# Prod. No.
Prod. Desc

02/11/10 Copyright - ICFAI Business School 11


R e m o ve p a rt- ke y d e p e n d e n cie s – 2 N F

•In each data group at 1 NF identify all data items that depend on only on a
part of the key.
•List these as a new relation. Copy the part key. The key also remains with the
original group.

0 NF 1 NF 2 NF 3 NF
# Prod No. #@ Prod No. # Inv. No.
Prod. Desc. # Inv. No. Inv. Date
Inv. No. Inv. Date Contact Name
Inv. Date Contact Name Customer Name
Contact Name Customer Name
Customer Name Quantity #@ Prod. No.
Quantity Price #@ Inv. No.
Price Quantity
# Prod. No. Price
Prod. Desc
# Prod. No.
Prod. Desc.

02/11/10 Copyright - ICFAI Business School 12


R e m o ve in te r-d a ta d e p e n d e n cie s – 3 N F
•For each non-key items, list all those items which are dependent on another
item(s) and not the key.
•List these as a new relation. Copy the determinant items as the key. The key
also remains with the original group as a foreign key.

0 NF 1 NF 2 NF 3 NF
# Prod No. #@ Prod No. # Inv. No. # Inv. No.
Prod. Desc. Inv. No. Inv. Date Inv. Date
Inv. No. Inv. Date Contact Name Customer Name
Inv. Date Contact Name Customer Name
Contact Name Customer Name # Customer Name
Customer Name Quantity #@ Prod. No. Contact Name
Quantity Price #@ Inv. No.
Price Quantity #@ Prod. No.
# Prod. No. Price #@ Inv. No.
Prod. Desc Quantity
# Prod. No. Price
Prod. Desc.
# Prod. No.
Prod. Desc

02/11/10 Copyright - ICFAI Business School 13


N o rm a liza tio n – 1 2 S te p p ro ce ss
1.Collect raw data
2.List the raw data with its key
3.Remove repeating groups
4.Remove part key dependencies
5.Remove inter-data dependencies
6.Remove inter-key dependencies
7.Apply tests
8.Identify transitive dependencies
9.Optimize
10.Re-apply the tests
11.Draw Entity – Relationship Diagram
12.Use the model to design database

02/11/10 Copyright - ICFAI Business School 14


C o lle ct R a w D a ta

•Identify possible source.


•Include all data that is required to support the system
•Understand the data and its purpose
•Use completed copies of forms and reports
•Record and assumptions

02/11/10 Copyright - ICFAI Business School 15


A S S IG N M E N T N O T E

To P. Deshpande Emp No. 67890

Dept Name: Marketing___


Dept No. 20

This is to inform you that as of 12/11/88 you are assigned to project


no B784 which is known as Material Control - Phase 1.

Your billing rate for this assignment is Rs. 3500 per day.

Approved by Vinod Sharma(Mgr) 38456 (Mgr No)

02/11/10 Copyright - ICFAI Business School 16


List R a w D a ta – 0 N F

0 NF

•List raw data and identify a key

02/11/10 Copyright - ICFAI Business School 17


List R a w D a ta – 0 N F
0 NF 1 NF 2 NF 3 NF
EMPLOYEE
# Emp No
Emp Name
Dept No
Dept Name
Mgr No
Mgr Name
Proj No
Proj Name
Start Date
Billing Rate

02/11/10 Copyright - ICFAI Business School 18


R e m o ve R e p e a tin g G ro u p s – 1 N F

1 NF
•Every attribute must have a single value for any
occurrence of its entity.

To go from 0 NF to 1 NF
•Remove any multi-valued attributes from their 0 NF entity
and create a new entity for them.
•Copy the identifier of the original entity into the new
entity. This will probably part of the unique identifier for
the new entity.

02/11/10 Copyright - ICFAI Business School 19


R e m o ve R e p e a tin g G ro u p s – 1 N F

0 NF 1 NF 2 NF 3 NF
EMPLOYEE ASSIGNMENT
# Emp No #@Emp No
Emp Name #@Proj. No
Dept Number Proj Name
Dept Name Start Date
Mgr No Billing Rate
Mgr Name EMPLOYEE
Proj No # Emp No
Proj Name Emp Name
Start Date Dept No
Billing Rate Dept Name
Mgr No
Mgr Name

02/11/10 Copyright - ICFAI Business School 20


R e m o ve p a rt- ke y d e p e n d e n cie s – 2 N F

2 NF
•Every attribute must depend on the entire key of its entity

To go from 1 NF to 2 NF
•Remove any partial dependent attributes from their 1 NF
entity and create a new entity.
•Copy that part of the identifier (on which the removed
attributes are dependent) into the new entity.

02/11/10 Copyright - ICFAI Business School 21


R e m o ve p a rt- ke y d e p e n d e n cie s – 2 N F
0 NF 1 NF 2 NF 3 NF
EMPLOYEE ASSIGNMENT ASSIGNMENT
# Emp No #@Emp No #@Emp No
Emp Name # Proj. No #@Proj No
Dept Number Proj Name Start Date
Dept Name Start Date Billing Rate
Mgr No Billing Rate PROJECT
Mgr Name EMPLOYEE # Proj No
Proj No # Emp No Proj Name
Proj Name Emp Name EMPLOYEE
Start Date Dept No # Emp No
Billing Rate Dept Name Emp Name
Mgr No Dept No
Mgr Name Dept Name
Mgr No
Mgr Name

02/11/10 Copyright - ICFAI Business School 22


R e m o ve in te r-d a ta d e p e n d e n cie s – 3 N F

3 NF
•Every attribute must not depend on anything except the
entire unique identifier of its entity

To go from 2 NF to 3 NF
•Remove any non dependent attributes from their 2 NF
entity and put them in an entity of their own.
•This new entity will need a unique identifier of its own.

02/11/10 Copyright - ICFAI Business School 23


R e m o ve in te r d a ta d e p e n d e n cie s – 3 N F
0 NF 1 NF 2 NF 3 NF
EMPLOYEE ASSIGNMENT ASSIGNMENT ASSIGNMENT
# Emp No #@Emp No #@Emp No #@Emp No
Emp Name # Proj. No #@Proj No #@Proj No
Dept Number Proj Name Start Date Start Date
Dept Name Start Date Billing Rate Billing Rate
Mgr No Billing Rate PROJECT PROJECT
Mgr Name EMPLOYEE # Proj No # Proj No
Proj No # Emp No Proj Name Proj Name
Proj Name Emp Name EMPLOYEE EMPLOYEE
Start Date Dept No # Emp No # Emp No
Billing Rate Dept Name Emp Name Emp Name
Mgr No Dept No @ Dept No
Mgr Name Dept Name @ Mgr No
Mgr No DEPARTMENT
Mgr Name # Dept No
Dept Name

02/11/10 Copyright - ICFAI Business School 24


3 NF
The key, the entire key and
nothing but the key,
So help me Codd!

02/11/10 Copyright - ICFAI Business School 25


E -R N o ta tio n
•Relationship lines must have phrases describing at both ends.
•Indicate optionality at both ends

Is represented by
•solid line for mandatory relationship
•dotted line for optional relationship
•crow’s foot for m degree Relationship Notation
•single line for “1” degree
mandatory
optional
one
many
relationship
E1 1 E2

relationship2

Each E1 may be relationship1 one or more E2


Each E2 must be relationship1 one and only one E1

02/11/10 Copyright - ICFAI Business School 26


Entities, Attributes
Invoice Amount Flight No. PNR

Employee Details Department Basic

Dependent DOB Part No

Blood Group Cell No Acct Code

Invoice Line Hiredate IPC Ref

Order Line Qualification Cust Code

Order Qty Leave Supplier

02/11/10 Copyright - ICFAI Business School 27


BWC Video Club

Harry runs a video library for the members of his video club. It is
important for him to know about the titles on his shelves, of
course, but also how many copies he has, what sort of video format
they are, what their purchase price was, their condition, what their
run time is so forth.

Each copy may be eventually loaned to lots of customers, each of


whom must be a current member, at a fixed rate per day, normally he
knows when to expect the copy back, in case other people inquire
about that title.

02/11/10 Copyright - ICFAI Business School 28


E N T IT IE S

VIDEO TITLE
VIDEO COPY
MEMBER
DAILY_RATE
SHELF
LOAN
RESERVATION
ENTITY DETAILS

VIDEO
# TITLE
TITLE_ID VIDEO
# COPY
TITLE_ID MEMBER
# MEMBER_ID SHELF
# SHELF_NO
● NAME # COPY_NO ● NAME ● RACK_NO
○ DESCRIPTION ● FORMAT ● ADDRESS ○ CAPACITY
○ TYPE ○ CONDITION ○ TEL_NO
● RATING ● STATUS
○ RUNTIME
DAILY_RATE
# RATE_CODE
● VALUE
● EFFECT_DATE

LOAN
# LOAN_ID RESERVATION
# REQ_ID
● MEMBER_ID ● MEMBER_ID
● TITLE_ID ● TITLE_ID
● COPY_ID ● REQ_DATE
● DATE_FROM ● FULFILLED
● DATE_DUE
○ DATE_RETURNED
○ AMT_BILLED
BWC Video Club
of VIDEO COPY
LOAN
  Format
From_date subject of  Condition
 at
Exp_return
to of

used
in DAILY RATE
 Amount
 St_date
party to
source of
CUSTOMER
 Memb_No VIDEO TITLE
ο Name  Name
ο Renew_Dt ο Run_Time
ο Distributor

02/11/10 Copyright - ICFAI Business School 31


DFD Exercise Loan process
Context Diagram

0
Loan
Request
Approv Loan
Customer al Process
ing
Rejecti System
on
Level 1
Customer

Loan 4.0
Request 1.0
Decide Int . Rate
Regret Receive Request

Documents Documents
Documents

5.0
2.0 3.0
Documents
Create Offer
Check Credit Prepare Docs .

Contra
Credit Status Int Rates ct

Customer
D1 Credit File D2 Int . Rate File
Context Diagram

0
Order P O
Invoic Super
Customer Builder Invoic Supplier
e e
System
Payment Payment

Reports

Management
Monthly 5.0
Statement
Customer Prepare
1.0
Order Statement
Prepare Order
Prices Sales
data
Regret D5 Sales Ledger
Priced SO
D2 Catalog
Sales
data
2.0 3.0 Order 4.0
Approved Details
Order
Check Credit Prepare Delivery Prepare Invoice
Order for
Delivery Invoic
Credit Status O / S Availabil e
Lines ity
Customer
D1 Credit File D4 O / S Orders D3 Stock File

Das könnte Ihnen auch gefallen