You are on page 1of 9

-1

Mt s v d v chun ho
V d 1: Mt Cng ty s dng hai loi chng t sau y theo di cc hot
ng kinh doanh ca mnh.
S Ti chnh Vt gi

S ho n: A99999999

Cng ty X

N T HNG
Ngi t hng:

(27 k t . . . . . . . . . . . . . . . . . . )

a ch:

(45 k t . . . . . . . . . . . . . . . . . . )

Ngy t hng:

dd/mm/yyyy

Stt

Tn hng

M t hng

v tnh

S lng

xx

C(15)

C(30)

C(10)

xxxxxx

..... ............................ ................................ .................. ......................

S Ti chnh Vt gi

S phiu: A99999

Cng ty X

PHIU GIAO HNG


Tn khch hng:

(27 k t . . . . . . . . . . . . . . . . . . )

a ch:

(45 k t . . . . . . . . . . . . . . . . . . )

Ni giao hng:

(45 k t . . . . . . . . . . . . . . . . . . )

Ngy giao hng:

dd/mm/yyyy

STT

Tn hng

v tnh

n gi

Slng

Thnh tin

xx

C(15)

C(10)

N(5,0)

N(4,0)

N(10,0)

.....

..........................

...............

............... ..............

....................

Hy thit k c s d liu (m hnh t chc v d liu) t cc ti liu trn


qun l cc hot ng kinh doanh ca cng ty. Ch rng d liu phi c
chun ho dng chun 3.

-2

Gii quyt vn
a. Xc nh cc tp thc th, thuc tnh v thuc tnh nh danh:
Cn tr li cc cu hi ni 3.4: i tng no c th lm tp thc
th? Yu t thng tin g c th lm thuc tnh cho mt tp thc th?
C hai tp thc th c xc nh t n t hng v Phiu giao hng l:
KHCH v HNG.
 Tp thc th KHCH c hai thuc tnh l: Tn khch v a ch khch.
C hai thuc tnh ny u khng th dng lm nh danh cho tp thc th,
nn phi b sung thm thuc tnh M khch lm nh danh.
 Tp thc th HNG c ba thuc tnh l: Tn hng, n v tnh v M t
hng. C ba thuc tnh ny cng khng th lm nh danh nn phi p t
thuc tnh M hng lm nh danh cho tp thc th.
b. Xc nh cc mi quan h gia cc tp thc th
C th tm ty hai ng t trong cc hot ng ca h thng l: t
hng v Giao hng. xc nh cc tp thc th v thuc tnh cho mi quan h
ta t cc cu hi chung quanh ng t :
 Ci g c t hng (hoc Giao hng)?

HNG

 Ai t hng (hoc Giao hng)?

KHCH

 t hng (hoc Giao hng) nh th no?

bng n hng th

hin qua S ho n
 t hng (hoc Giao hng) bao nhiu?

S lng t (giao)
v n gi

 t hng (hoc Giao hng) khi no?

Ngy t (Giao)

 t hng (hoc Giao hng) u?

Ni giao

T ta c, hai mi quan h vi cc thuc tnh nh sau:

-3

 Mi quan h t gia hai tp thc th KHCH v HNG vi cc thuc


tnh: S ho n, Ngy t, S lng t.
 Mi quan h Giao gia hai tp thc th HNG v KHCH vi cc thuc
tnh: S phiu giao, Ni giao, Ngy giao, S lng giao, n gi hng
giao
c. Xy dng m hnh thc th - mi quan h (ER)

t

KHCH
M khch
Tn khch
a ch

(1,n)

(1,n)

S ho n
Ngy t hng
S lng t

Giao
S phiu giao
Ni giao
Ngy giao
S lng giao
n gi hng giao

(1,n)

(1,n)

HNG
M hng
Tn hng
n v
M t hng

-4

d. Chuyn t m hnh ER sang m hnh quan h


KHCH

(M khch,Tn khch, a ch)

HNG

(M hng, Tn hng, n v, M t hng)

(S ho n, M khch, M hng, Ngy t hng, S lng t)

Giao (S phiu giao, M khch, M hng, Ni giao, Ngy giao, S lng giao,
n gi hng)
e. Chun ho cc lc quan h nhn c thnh 3NF
chun ho cc lc quan h c c chng ta c th xc nh cc
ph thuc hm v s dng L thuyt chun ho c s d liu tch cc lc
quan h thnh cc lc con dng chun 3. Chng ta cng c th chun
ho bng cch phn r dn mt lc quan h thnh cc cc lc con 1NF,
2NF, 3NF theo nh cch di y:

 Chun ho d liu t N T HNG


0NF

1NF

2NF

3NF

-5

S ho n

S ho n

S ho n

S ho n

M khch

M khch

M khch

Ngy t hng

Tn khch

Tn khch

Tn khch

M khch

a ch

a ch

a ch

Ngy t hng

Ngy t hng

Ngy t hng

M khch
Tn khch

M hng(lp)
Tn hng(lp)

S ho n

S ho n

M t hng(lp)

M hng

M hng

n v tnh(lp)

Tn hng

S lngt

S lngt (lp)

M t hng

a ch

S ho n
M hng

n v tnh

M hng

S lngt

Tn hng

S lngt

M t hng

M hng

n v tnh

Tn hng
M t hng
n v tnh

 Chun ho d liu t PHIU GIAO HNG


0NF

1NF

2NF

3NF

S phiu

S phiu

S phiu

S phiu

Ni giao hng

Ni giao hng

Ni giao hng

Ni giao hng

Ngy giao hng

Ngy giao hng

Ngy giao hng

Ngy giao hng

M khch

M khch

M khch

M khch

Tn khch hng

Tn khch hng

Tn khch hng

a ch

a ch

a ch

M hng(lp)
Tn hng(lp)

M khch
Tn khch hng

S phiu

S phiu

a ch

-6

n v tnh(lp)

M hng

M hng

n gi

Tn hng

Slng giao

Slng giao (lp)

n v tnh

S phiu
M hng

n gi

M hng

Slng giao

Slng giao

Tn hng

n gi

n v tnh
M hng

n gi

Tn hng
n v tnh

KHCH (M khch,Tn khch,a ch)


N HNG (S ho n, Ngy t hng, M khch)
DNG N HNG (S ho n, M hng, S lngt)
PHIU GIAO HNG (S phiu, Ni giao hng, Ngy giao hng, M khch)
DNG PHIU (S phiu, M hng, Slng giao, n gi)
HNG (M hng, Tn hng, n v tnh)
T cc kt qu chun ho, chng ta c c m hnh d liu quan h nh sau:
1

n
n

n
n

-7

V d 2: Chun ho mt chng t xut trong bi ton Qun l kho hng


HO N
(Kim phiu xut kho)
s phiu:________
H tn ngi mua hng: Nguyn vn Nam
1209234567
Tn i l: Hoa hng
a ch:
45 Trn Hng o
Mc ch: bun bn

S CMND:

MHN
G

TNHNG

VTNH S LNG

N GI THTIN

A01
B02

ng trng
Bt m

Kg
Kg

5000
6000

200
50

Tng cng s tin:


Bng ch:________________________
Hu, ngy thng

0NF

1NF

1000000
300000

nm 200

2NF

3NF

SPHIUXUT

SPHIUXUT

SPHIUXUT

SPHIUXUT

NGY

NGY

NGY

NGY

NGI MUA

NGI MUA

NGI MUA

MCCH

IL

IL

IL

SCMND

SCMND

SCMND

SCMND

ACH

ACH

ACH

NGI MUA

MCCH

MCCH

MCCH

IL
SCMND

TNHNG (lp)
MHNG (lp)

SPHIUXUT

SPHIUXUT

NV (lp)

TNHNG

MHNG

NGI (lp)

MHNG

SLNG

ACH

SPHIUXUT

-8
SLNG (lp)

NV

MHNG

NGI

MHNG

SLNG

TNHNG

SLNG

NV

MHNG

NGI

TNHNG
NV
NGI

V d 3: Chun ho mt chng t nhp trong bi ton Qun l kho hng

Cng ty Hi H

PHIU NHP KHO

Ngy .....

Kho Nguyn liu

S phiu: 015

H tn ngi giao: T th p

a ch: 16 Phan nh Phng

n v: Cng ty Nng sn thc phm Tnh TT Hu


Theo Hp ng s: 1234/KT
Stt

Tn hng

Ngy 12/10/2004

M hng

n v

n gi

S lng

Thnhtin

ng RE

C09

Kg

5000

12000

60000000

Bt m Php

B14

Kg

2500

5000

12500000

Sa H lan

B16

Lit

8000

1500

12000000

...

...

...

...

Tng cng:
Ngi giao

...

84500000
Ngi kim tra

Th kho

Th trng

-9

0NF

1NF

2NF

3NF

SPHIUNHP

SPHIUNHP

SPHIUNHP

SPHIUNHP

MS_NCC

MS_NCC

MS_NCC

MS_NCC

TN_NCC

TN_NCC

TN_NCC

NGY

ACH_NCC

ACH_NCC

ACH_NCC

NGY

NGY

NGY

MS_NCC
TN_NCC

TNHNG (lp)
MHNG (lp)

SPHIUNHP

SPHIUNHP

NVTNH (lp)

TNHNG

MHNG

NGI (lp)

MHNG

SLNG

SLNG (lp)

NVTNH

ACH_NCC

SPHIUNHP
MHNG

NGI

TNHNG

SLNG

MHNG

SLNG

NVTNH

TNHNG

NGI

MHNG
NVTNH
NGI