Vous êtes sur la page 1sur 44

INFORMATION TECHNOLOGY

for

P.C.C.

PROF. ZULESH DEDHIA

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY
I n or d er t o c ommuni ca te w i t h t he c omp ute r , a c omp ut er l a ng ua ge i s us e d . H ow e ve r , s i nc e t he c omp ute r d oe s not ha v e i t s ow n b r a i ns , i t i s f ool i s h t o e x p e ct c ommon s e ns e f r om i t . T her e f or e, t o g e t t he c omp ute r t o p e r f orm o ne t a sk , a s e r ie s o f i ns tr uct i ons a r e t o b e g i v e n i n a c omp ute r l a ng ua ge . A p r og ra m i s a s e t t o i ns t r uc t i ons g i v e n t o t he c omp ute r b y t he us e r , i n a c omp ut er l a ng ua ge , t o g e t t he c omp ute r t o p e r f or m a c e rt ai n t a sk . T hes e i ns tr uct i ons a r e t o b e d e f i ned i n a p r op er s e q ue nc e a nd not ha p ha z ar dl y g i v e n. T hi s s p ec i f ic s e q ue nce of i ns t r uc ti ons d e s ig ned t o g e t t he d es i re d r e s ult i s c a l l ed a n Al g or i t hm. D i a gr amma ti cal p r es enta ti on o f a n Al g or i t hm i s k now n a s Fl ow c har t. T hus , a F l ow c ha rt i s a p i c t or ia l p r es enta ti on of t he s e q ue nce of s te ps i nv ol v e d i n s ol v i ng a p r ob l em. S YMB OLS USED I N FLOWCHART : 1. START/END 2. INSTRUCTION FLOW LINE 3. INPUT/OUTPUT 4. PROCESS 5. DECISION 6. ON-PAGE CONNECTOR 7. OFF-PAGE CONNECTOR 8. PRINT 9. DISPLAY 10. ONLINE STORAGE/FLOPPY DISC 11. MAGNETIC TAPE / SEQUENTIAL ACCESS STORAGE OR

FLOWCHARTS

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY

I ll ust rat io n: Com pute a nd p rint sim p le i nt e re st . START INPUT P,R,N I = P*R*N/100 PRINT I END P , R , N & I a r e va r ia bl es a s t he y c a n a s sume a ny v a l ue , i . e . , t he i r v a l ue i s not fixed.

LOOP
W he n s ome p or ti on of a p r og ra m i s t o b e e x ec ute d r e pe t it i ve l y , w e c r ea te a l oop . T hi s l oop ma y b e s e t a cc ord i ng t o t he ha p pe ni ng of c er ta i n c ond i t i on or i t ma y b e p r e se t f or s p ec i f ie d numb er of t i me s . L oop s e t a cc ord i ng t o t he ha p pe ni ng of c e r ta i n c ond i t i on A n i l l us t ra ti on: START INPUT P,R,N

I = P*R*N/100 PRINT I

YES MORE RECORDS? NO END

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY
Lo o p se t f o r sp e cif i c num be r o f t im e s - A n i l l ust ra t ion: F ind a nd p rint f i rst 1 0 m ult ip le s o f a numb er: START INPUT N

C=1

M = N*C PRINT M

IS C = 10? YES END

NO

C = C+1

COUNTER: A c ount er i s a va r i ab le us e d t o s t or e t he c ount of t he l oop . W he n t he c ou nt er r e a c he s t he p r e -s e t v a l ue , t he p r og ra m g e ts o ut of t he l oop . T he us e of t he c ount e r ma y b e o f t w o t y p e s - one f or p e r f or mi ng t he l oop a s p e ci f i ed n umbe r of t i mes a nd ot he r a s a v a r ia bl e f or c omp ut at i on p ur p ose . I n t he a b ove e xa mp le , a c ount er C ha s b e e n us e d a nd i t s e r ve s b ot h t he p ur p ose s. A CCUMULATOR: A me mory w hi c h i s us e d t o s t or e i nt er me di at e r e s ul ts d ur i ng t he e xe c ut i on of l oop i s c a l le d a cc umula tor . It i s g e ner al l y us e d f or c omp ut i ng c umul at i ve r e s ult s o f mat hemat ic al e x p re ss ion w i t hi n t he l oop . Ac c umul at or s a r e us ua l l y g i ve n a n i ni t i al va l ue 0 or 1 d e p e ndi ng u p on t he l og i c o f t he p r og ra m. I f t he a c c umul at or i s us e d t o a c c umul at e a s um, i ni t ia l v a l ue o f a c c umul at or i s g i ve n 0 . I f t he p r od uc t of a s e r ie s i s t o b e c omp ut ed , t he i ni t i a l v a l ue of a cc umula tor i s g i ve n a s 1 .

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY

D raw a f lo w cha rt t o f i nd t he s um o f f ir st 1 00 o dd numb ers. START S=0 A=1 S=S+A A=A+2

15 A > 199 ? YES PRINT S

STOP H e r e , S ha s b e e n us e d a s a n a cc umula tor a nd i t s i ni t ia l v a l ue i s t a k e n a s 0 . A RRAYS : A va r ia bl e c a n s t ore a nd r e p re se nt o nl y one v a l ue . S ome t i mes i t i s r e q ui re d t o s t or e a l i s t o f va l ue s a nd r e f er t he n b y a c ommon na me . E . g . p r od uct i on of 12 mont hs of a ye a r i s a s e t of s i mi l ar i t e ms a nd w e w oul d l i k e t o us e t he s a me na me t o r e f e r t o t hi s l i st of v a l ues . W e ma y us e P 1, P 2 , . . . . . . P 12 a s va r i ab le na me s . T hi s e ns ur es t hat d i f f e r e nt v a r ia bl es b e l ong i ng t o s ame c l a ss a r e c a l le d b y a s i ng l e na me . E x amp le P . T he 1, 2 , 3, . . . . . . us e d i n t he a b ov e v a r i ab le s a r e c a l l ed s ub s cr ip ts a nd P 1, P 2 e tc . a r e s ub sc ri pt ed v a r ia bl es .

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY

I ll ust rat io n: Dra w a f lo w chart t o a cce pt ma rks o f st ude nt s in si x s ub je ct s a nd p ri nt a v e ra ge m arks. STARTS READ M (X); X = 1,2, ---6 S=0 X=1 S = S + M(X) X = X+1

NO

IS X > 6? YES A = S/6 PRINT A

NO MORE RECORDS ? YES STOP

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY

So lve d P ro b lem s On F lo w chart s: Q1 . D raw a f lo w cha rt t o p rint t he hi ghe r o f a ny g iv e n t w o uni que num be rs. START

READ A, B

IS A > B? NO PRINT B

YES PRINT A

STOP Q2 . D raw a f lo w cha rt t o f i nd t he s um o f f ir st 1 00 o dd numb ers. START S=0 A=1 S=S+A A=A+2

NO

IS A > 199 ? YES

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY
PRINT S STOP D raw t he p ro gram f lo w cha rt f o r f in din g t he sum o f squa re s o f f ir st 2 0 o dd num be rs START S=O A=1 S=S+A*A A=A+2

Q3 .

NO

IS A > 39 ? YES PRINT S

STOP

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY
Q4 . D raw a f lo w cha rt t o p rint t he f a cto ria l o f a ny g iv e n p o sit iv e no nze ro in t e ge r K . (T he Fct o ria l o f K is de f ine d a s : 1 * 2 * 3 * . . . * K) . START READ K P=1 A=1 P= P*A

A=A+1

NO

IS A>K ? YES PRINT P

STOP

10

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY
Q5 . D raw t he f lo w chart w hich w il l ca lcula t e t he sum o f t he f i rst N m ult ip le s o f a n i nt e ge r K, i .e ., 1 * K + 2 * K + . . . + N * K START READ N, K S=O C=1 S=S+C*K

C=C+1

NO

IS C>N ? YES PRINT S

STOP S S um of t he g i ve n s e r i es N N umbe r of mul t i p le s K Int e g e r

11

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY

Q6 .

D raw a f lo w cha rt t o p rint t he sum o f t he f o llo w ing se r ie s:

1 2 3 + + + ...N 2.3 3.4 4.5 t e rm s.


START READ N S=0 C=1

S = S + C/[(C + 1) * (C + 2)]

C=C+1

NO

IS C>N ? YES PRINT STOP S

12

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY

Q7 .

D raw a f lo w cha rt to ge ne ra te t he F ib o na cci numb ers: 1 ,1 ,2 ,3 ,5 ,8 ,1 3 , . . . , N t e rm s (i n t he F ib o na cci se r ie s, e a ch numb er i s e qua l t o t he sum o f t he p rev io us t wo num be rs). START

READ N FN = 1 SN = 1

PRINT FN, SN C=3 TN = FN + SN

PRINT TN FN = SN

SN = TN C=C+1

NO

IS C>N ? YES

13

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY
STOP

14

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY
Q8 . D raw a p ro gram f lo w cha rt t o f ind t he b igge st o f t hre e numb ers Q1 , Q2 a nd Q3 . T he b igge st i s st o re d in l o cat io n H . START READ Q1,Q2,Q3

H = Q1

IS H < Q2 ? NO IS H < Q3 ? NO PRINT H STOP

YES H = Q2

YES H = Q3

15

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY
Q9 . T he w e ight s o f new ly b o rn b ab ie s in a ho sp it a l a re inp ut t o a co mp ut er. T he ho sp ita l in cha rge i s in t e re st e d t o f in d t he m aximum, m inim um a nd me an w e ight s o f a ll t he b ab ie s. Draw a s uit a b le f lo w cha rt START READ N READ W H=W L=W TW = W C=2 IS CN YES READ W PRINT MW,H,L TW = TW + W IS W > H? YES H=W NO IS W<L ? YES L=W NO STOP NO MW = TW/N

C=C+1

16

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY
H = H IGH EST W EIGHT / L = LOW EST W EIGHT / T W = T OT AL W EIGH T N = NUM BER O F B AB IES / W = W EIGHT OF A B OB Y Q1 0. A co mp any gi v e s d is co unt t o i t s cust om ers o n t he f o l low ing b a sis: T he a d j oi ni ng d i s c ounts a r e a l l owe d , i f t he c us t ome r s b a l a nc e i s b e l ow R s . 50, 000, ot he r w is e t he r a t e of d i sc ount i s r e d uc ed b y 2 % . Qua nt i t y Or d er ed Nor mal D i s c ount 1 399 6% 400 599 8% 600 799 10% 800 999 12% 1, 000 a nd a b ove 1 5% START READ Q, BAL

IS Q < 400 ? NO

YES D=6

IS YES Q < 600 ? NO IS YES Q < 800 ? NO IS YES Q < 1000 ? NO D = 15

D=8

D = 10

D = 12

IS BAL < 50000 ? YES PRINT D STOP

NO D = D-2

17

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY

Q1 1 . D raw t he f lo w chart f o r f i nd ing t he a mo unt o f a n a nnuity o f R s. A i n N y e a rs, ra t e o f int e re st = r% , R = 1 + r a nd t h is am ount is g iv e n b y t he f o llo w ing se r ie s: S = A + AR + AR2 + . . . + A RN -1 START READ A, r, N R=1+r S=O C=O S = S + A * R ^C C=C+1

NO

IS C>N1 ? YES PRINT S

STOP

18

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY

Q1 2 . As sum e t ha t im po rt e d go o ds f rom f o re ign co unt rie s a re cla ss if ie d i nt o 4 ca te go rie s f o r t he p urp o se o f le v y ing cust o ms d ut y . T he ra t e f o r e a ch ca t e go ry i s a s f o llo w s: C la ss/Ca t e go rie s (K) Ca t e go rie s o f Goo ds C ust om Dut y (% ) On V a lue s o f Go o ds (V ) 1 Fo o ds, b ev e ra ge s 8 2 C lo t hing , f o o tw ear 12 3 He av y ma chine ry 15 4 Luxury it e m s 20 D raw t he f lo w chart f o r com put ing t he a p prop riat e cust o ms d ut y . START READ K, V

IS K=1 ? NO IS K=2? NO IS K=3? NO CD = 0.20*V PRINT CD STOP

YES CD = 0.08*V

YES CD = 0.12*V

YES CD = 0.15 * V

19

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY

Q1 3 . D raw a f lo w cha rt t o ca lcu la te t he co mm issio n o f a sa le s re p re senta t iv e b a se d o n t he f o llo w ing se t o f r ule s : ( i) I f t he sa le s is l e ss t ha n Rs .5 ,000 , t he re i s no co mm issio n. ( i i) I f t he sa le s is R s.5 ,000 o r a bo ve b ut le s s t han Rs .5 0,000 , t he n t he co mm issio n i s co mp ut ed @ 1 0% o f t he sa le s. ( i i i) I f t he sa le s i s R s.5 0 ,000 o r a bo ve , t he co mm issio n i s R s.5 ,000 a nd @1 2% o f t he sa le s a b ov e R s.5 0 ,000. P r int t he sa le s a nd t he co mm issio n. START READ S

IS S<5000 ? NO

YES C=O

NO YES S<50000 ? NO C=5000+0.12*(S-50000)

C=0.10*S

PRINT S, C STOP

20

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY

Q1 4 . T he p ro b lem is t o com pute , f o r a se rie s o f t ra nsa ct ions, t he gro ss sa le s (G) : t he q ua nt it y d is co unt s, (D) , if a ny ; a nd t he ne t sa le s (N ). T he ra w da t a t o b e s up p lie d i n t he p ro gra m i nc lude s t he q ua nt it y so l d (Q) a nd un it p r ice (P ). T he qua nt it y d is co unt s che dule is a s f o llo w s: I f qua nt it y so ld i s: T he d is co unt ra t e w o uld b e Le ss t ha n 1 ,000 unit s 5% 1 ,000 t o le ss t ha n 2 ,000 1 2 .5 % 2 ,000 a nd o ve r 2 0% START

READ Q, P

GS = Q*P IS Q<1000 ? NO IS Q<2000 NO D=0.20*GS NS = GS D PRINT GS, D, NS YES D = 0.05*GS

YES D=0.125*GS

NO

IS THIS LAST RECORD

21

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY
? YES STOP

Q1 5 . D raw a f lo w cha rt t o com pute a nd p r int t he I ncom e-t a x a nd Surcha rge o n t he i nco me o f t he in di v i dua l. T he i nco me i s t o b e re a d f ro m t he t e rm ina l a nd t he t ax i s t o b e ca lcula t e d a cco rding t o t he f o llo w ing ra t e s: I ncom e ( in Rs .) Ra t e Up to 5 0,000 No tax Fro m 5 0 ,001 t o 6 0,000 1 0% of t he a mo unt e x ce e ds Rs .5 0,000 Fro m 6 0 ,001 t o 1 ,5 0,000 Rs .1 ,000 + 2 0% o f t he a mo unt a bo ve Rs .6 0,000 Abo ve 1 ,5 0,000 Rs .1 9 ,000 + 3 0% o f t he a mo unt a bo ve Rs .1 ,5 0,000 T he s urcha rge is l e v ie d @ 5% o n t he a mo unt o f t o ta l t a x , if t he i nco me e xcee ds Rs .6 0,000 START READ I

IS I 50000 ? NO IS I 60000 ? NO

YES T=0 S=0

YES T=0.10*(O-50000) S=0

IS YES I 150000 ? NO

T=1000+0.20*(I-60000) S=0.05*T

T=19000+0.30*(I-150000)

22

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY
S=0.05*T PRINT I, T, S STOP

Q16.

Draw a flowchart to illustrate the following situation: Vishnu Limited calculates discounts allowed to customers on the following basis: Order Quantity Normal Discount 1 99 5% 100 199 7% 200 499 9% 500 and above 10% These discounts apply only if the customers account balance is below Rs.500 and does not include any item older than three months. If the account is outside both the limits, the above discounts are reduced by 2%. If only one condition is violated, the discounts are reduced by 1%. If a customer has been trading with Vishnu Limited for over 5 years and conforms to both of the above credit checks, than he is allowed an additional 1%.

START INPUT Q, C, I, T

Q= Quantity C = customer balance I = Item period (months) D = discount T = Trading period

IS YES Q < 100 ? NO IS YES Q < 200 ? NO IS YES Q < 500 ? NO D = 10 IS YES C < 500 NO

D=5

D=7

D=9

IS I<3 NO

YES

IS T>5

NO

YES

23

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY
IS I<3 NO D=D2 PRINT D STOP Q1 7. Ma rks o f e a ch st ude nt ( in a c la ss) i n 1 2 p a pe rs a re e nt e re d t hro ugh ke yb oa rd o f a t e rm ina l a nd a re re a d in t o t he CP U l o ca t io ns MARKS 001 t o MA RKS 01 2 . Draw t he f lo w cha rt f o r co mp ut ing a nd p rint ing t he a ve rage ma rks o f e a ch st ude nt . START READ R, M(X);X = 1,2,3,....12 S=O X=1 S = S + M(X) X=X+1 YES D = D -1 D= D+1

NO

IS X > 12 ? YES A = S/12 PRINT R, A

NO

IS THIS LAST RECORD ?

24

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY
YES STOP R = R OLL No . M (X) = M ar ks i n S ub j e c t X S = T ota l M ar ks A = Ave ra ge M a rk s

Q18.

A company has 5, 000 employees. Their salaries are divided in followin g categories: (i) Less than Rs.5,000 (ii) Rs.5,000 to Rs.10,000 (iii) Rs.10,001 to Rs.15,000 (iv) Above Rs.15,000 Draw the flowchart to find the percentage of the employees in each category. START

READ S(X); X = 1,2,3, ....., 5000 X=1 A=O B=0 C=O D=O

IS S(X)<5000 ?

YES

A=A+1

NO IS YES S(X) 10000? NO IS YES S(X) 15000 ? NO D=D+1 X=X+1

B=B+1

C=C+1

25

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY
NO IS X > 5000 ? YES P1 = A/50 P2 = B/50 P3 = C/50 P4 = D/50 PRINT P1, P2, P3, P4 STOP Q1 9 . P r ice s f o r t e n com modit ie s i n t he cu rre nt y e a r a re de si gna te d b y J (X ), X v a ry ing f ro m 1 t o 2 5 . Li kew ise , t he ir la st y ea r s p rice s a re de s igna t ed b y K(Y) , Y v a ry ing f rom 1 t o 2 5 . Dra w t he f lo w chart f o r f in din g he numb er, N o f co mmo dit ie s o f w hich p r ice s hav e i nc rea se d. START READ J(X); X = 1,2,3, ....., 25

READ K(Y); Y = 1,2,3, ....., 25 X=1 Y=1 N=0

IS J(X)>K(Y) ? NO X=X+1 Y=Y+1

YES N=N+1

NO

IS X > 25 ?

26

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY
YES PRINT N

STOP

DECISION TABLES
A d e c is i on t ab l e i s a t a b ula r p r es e nt at ion of p r ogr am l og i c . I t d i s p la ys a l l c ond i t i ons a f f ec ti ng a p ar t ic ul ar s i t ua ti on. I t g i v es a p p ropr i at e a c t ion or a c t i ons t o b e t a ke n f or e ac h s e t of c ond i t i ons . D e c is i on t ab l es a re us e f ul w he n a c omp ut er ha s t o mak e l a r ge numb e r o f d e c i si ons or i f t he re a r e a l a r ge n umbe r o f d i f f e re nt b r a nc he s w i t hi n a p r og ra m. Co mp onents o f a de ci sio n t a b le : Ta b le Hea ding Co ndit io n St ub Act io n St ub De cis io n Ru le s H ea ding Co ndit io n Ent rie s A ct io n Ent rie s

T ab le Hea ding : T he na me or numb er of t he D e c is i on Ta b le s p ec i f yi ng t he p r ob l em w hi c h i s b e i ng r e pr es ente d . F or c omp le x p r ob le ms , t he d e c is i on t ab l e i s s omet imes b r oke n i nt o p a r ts w he r e t he T ab l e he a d i ng w oul d i d e nt i f y t he p a r t of t he p r ogr am b e i ng r e p re se nt ed . Co nd it io n St ub : T he c ond i t i ons t ha t c oul d e x i s t i n t he p r ogr am l og i c a r e d e s cr ib ed . A ct io n St ub : T he a c t i on s ta te me nt s or p os s ib l e o ut c omes of t he s y s te m a re d e s cr ib ed . De ci sio n Ru le s: T he se may b e one or mor e d e c i si on r ul e s numb e re d 1 , 2 , 3 . . . . n r e p re se nt i ng t he a nsw er s t o t he C ond i t i on St ub a nd Ac t i on St ub d e s cr ib ed b e f ore .

27

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY
Co nd it io n Ent ry : T he se r e p re se nt t he p os s ib i l it y o f e a c h o f t he c ond i t i on s t ub ( a ns we r t o e a c h of t he c ond i t i on s t ub ) . T he c ond i t i on e nt r y c a n b e ` Y f or Ye s or ` N f or No onl y . A ct io n Ent ry : T he l i st r e la t i ng t o t he s e t of a c t i on t o b e p e r f or me d or t a k e n t o a g i ve n s et of c ond i t i ons . T he a c t ion e nt r y c a n b e ` X f or s e l e ct i on a c t ion or - f or uns e l ec te d a c t i on o nl y.

T he f ina l de c is io n t a b le w o uld a p pe ar a s b e low : T ab le H ea di ng D ec i si on R ul e ( R 1) D ec i si on R ul e ( R 2 ) i.e. a u ni q ue i . e . a u ni q ue c omb i nat i on o f c omb i nat i on of `c ond i t i ons a nd ` c ond i t i ons a nd `a ct i ons ` a ct i ons C ond i t i on S t ub : C ond i t i on E nt r y C ond i t i on E nt r y i.e. if t he se i . e . if t he se c ond i t i ons e x i st c ond i t i ons e x i st (Ye s ) /not e x i st (Ye s ) / not e x i st (N o) (N o) C1 Ye s /No Ye s / No C2 Ye s /No Ye s / No C3 Ye s /No Ye s / No ..... ..... ..... Ac t i on S t ub : Ac t i on E nt r y i . e . Ac t i on E nt r y i . e . t he n t he f ol l ow i ng t he n t he f ol l ow i ng a ct i ons r e s ult a ct i ons r e s ult (X ) / not r es ul t ( - ) (X ) / not r es ul t ( - ) A1 X / X / A2 X / X / A3 X / X / ..... ..... .....

D ec i si on (R . . . . . )

R ul e

C ond i t i on E nt r y i.e. if t he se c ond i t i ons e x i st (Ye s ) / not e x i st (N o) Ye s / No Ye s / No Ye s / No ..... Ac t i on Ent r y i . e . t he n t he f ol l ow i ng a ct i ons r e s ult (X ) / not r es ul t ( - ) X / X / X / .....

T y pe s o f De cisio n Ta b le s: L im it e d Ent ry De cisio n T a b le : T he C ond i t i on St ub s a nd Ac t i on St ub s a r e e xha us t i ve l y d e f i ne d . T hi s mea ns t ha t t he c ond i t ion e nt r y ma y c ont a i n e i t her `Ye s r e p re se nt i ng e x i s te nce of c ond i t i on or ` No r e p re se nt i ng n on e xi st e nc e of c ond i t ion. In t he s a me ma nne r t he a c ti on e nt r y may c onta i n a `X r e p re se nt i ng e x ec ut i on o f a p ar t ic ul ar a ct i on or ` r e p re se nt i ng t ha t p a rt i c ula r a c t i on i s n ot t o b e e x ec ute d . I ll ust rat io n. A c ompa ny a l l ow s c r e d it t o i t s c us t ome rs i f t he y a r e f r om l oc a l c i t y a nd c a n e i t her p r ovi d e s ur et y or ha v e g ood c r e di t w or t hi nes s.

28

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY
St e p s: 1. I de nt if y co ndit io ns: L oc al a re a P r ovi de s ur e ty Good c r e d it w or t hi nes s 2. 3. I de nt if y Act io ns: R e f use C r e d it : : : Ye s / No Ye s / No Ye s / No

Gr a nt C r ed i t

De t e rm ine t he p o ssib le num be r o f ru le s. I f t he re a re N numb er o f co nd it io ns, t he re a re 2 N numb er o f p o ssib le ru le s. I n t he p re se nt ca se t he re a re 2 3 p o ssib il it ie s. i . e . 8 p o ssib il it ie s D raw t he t a b le w it h st ub s a nd re qu ire d numb er o f e nt ry co lum ns. i . e . co lum n f o r ru le s. F il l t he co nd it io n e nt rie s us ing ha lf r ule . Fo r e a ch co lum n e nte r t he co rre spo nding a ct io n o r a ct io ns t o b e t a ken. Sc rut ini se t he t a b le t o f in d if a ny o f t he ru le s ca n b e e l im inat ed. 1 2 Y Y N X DECI SI ON RULES 3 4 5 6 Y N Y X Y N N X N Y Y X N Y N X 7 N N Y X 8 N N N X

4. 5. 6. 7.

A LLOWI NG C REDIT FACI LIT Y CONDIT I ONS: C 1: L OC AL C IT Y C 2 : P R OVID E SU R ETY C 3 : GOOD C R ED IT W ORT HINESS A CT IONS: A1 : GR ANT C R ED IT A2 : R EFU SE C R ED IT Y Y Y X -

I f w e ob s er ve r ul e s 1 & 2, w e f i nd t ha t i f C 1 & C 2 a r e ` y , i t i s i r r e le va nt w he t her C 3 i s ` y or `N a s i t d oe s not a f f ec t a c t i on. S o r ul e s 1 & 2 c a n b e c omb i ne d . Al t e r na ti ve ly, r ul e s 1 & 3 c a n b e c omb i ned i n w hi c h c as e C 2 b e c ome s i r r e le va nt . Ag a i n, ob se r ve r ul e s 5, 6, 7 & 8 . If C 1 i s ` N , a c t ion i s a l w ay s t he s ame a nd i s not a f f e ct ed b y C 2 & C 3. Ab ove T ab le : R1 R2 R3 R4 R5 R6 R7 R8 New Table R1 R2 R3 1 CONDIT I ONS: C 1: L OC AL C IT Y C 2 : P R OVID E SU R ETY C 3 : GOOD C R ED IT W ORT HINESS A CT IONS: A1 : GR ANT C R ED IT A2 : R EFU SE C R ED IT Y Y X R4 DECI SI ON RULES 2 3 Y N Y X Y N N X 4 N X

A LLOW CREDI T FACI LIT Y

29

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY
Ext e nde d Ent ry De cis io n T ab le : T hi s i s s e cond t yp e of d e c is ion t a b le . H e r e , t he c ond i t i on a nd a ct i on s t ub a r e g e ne ra l is ed . T he s ta te me nt s ma de i n t he s t ub p or t i on a r e i nc omp le te . T he c ond i t i on a nd a c t i on e nt r y a re o f d es cr ip t iv e t y p e . I ll ust rat io n: A l i f e i ns ura nce c ompa ny ha s t he f ol l ow i ng c r i t er i on f or d e c i d i ng w he t he r or n ot t he i ns ura nce f or a p e rs on i s t o b e a c ce pt ed . I f a p e rs on s he a l t h i s g ood a nd t he p e rs on i s a ge d b e t we en 2 0 a nd 35 ye a rs , l i ves i n a t ow n or c i t y , a nd i s a ma le , t he n t he p r e mi um c ha rg ed i s R s . 20 p e r t ho usa nd a nd t he p ol i c y i s w r i tt e n f or a n a mount not e x c e ed i ng R s . 10, 00, 000. If a p e rs on s a t is f ie s a l l t he a b ove c ond i t i ons e x c ep t t hat t he p e r s on i s a f e ma le , t he n t he p r e mi um c har ge d i s R s . 2 5 p e r t hous a nd a nd t he p ol i c y i s w r i tt e n f or n ot mor e t ha n R s . 6 , 00 , 0 00 . If t he p e rs on s he a l t h i s p oor a nd t he p e rs on i s a ge d b e t we en 2 0 a nd 35 y e a rs , l i v es i n a v i l l ag e a nd i s a ma l e , t he n t he p r e mi um c ha rg ed i s R s .4 0 p e r t housa nd a nd t he p ol i c y i s w r i tt e n f or n ot mor e t ha n R s . 2 , 00 , 0 00 . If t he p e r son i s a f e mal e , t he p r e mi um r a t e c ha r ge d a nd t he ma x imum l i mi t f or w r it i ng a p ol i c y a re t he s ame . In a l l ot he r c as es , t he p e r son i s r e f use d i ns ur a nc e . P re pa re a de ci sio n t ab le f o r t he a b ov e p ro b le m. L I MIT ED ENT RY DECI SI ON T A BLE P OLI CY OF I NSURANCE COMPAN Y DECI SI ON 1 2 CONDIT I ONS : C 1: I s he a l t h g ood ? Y Y C 2 : I s a g e b e t we e n 20 a nd 35 ye ar s? Y Y C 3 : I s t he p e rs on ma l e ? Y N C 4 : D oe s t he p e r son l i ve i n t ow n or c i t y ? Y Y A CT IONS A1 : P re mi um R s . 20 p e r t hous a nd X A2 : M a ximum p ol i c y a mount R s . 10 , 00 , 0 00 X A3 : P re mi um R s . 25 p e r t hous a nd X A4 : M a xi mum p ol i c y a mount R s . 6, 0 0 ,0 0 0 X A5 : P re mi um R s . 40 p e r t hous a nd A6 : M axi mum p ol i c y a mount R s . 2, 0 0 ,0 0 0 A7 : R e f us e i ns ur a nc e EX TENDED ENT RY DECI SI ON T A BLE P OLI CY OF DECI SI ON RULES I N SURANCE COMP ANY 1 2 3 CONDIT I ONS : C 1: H e a lt h Good Good P oor C 2 : Ag e 20 t o 3 5 20 to 35 20 to 35 C3: Sex Male Fe ma le -C 4 : P l a ce of R e si de nce T ow n/ci t y T ow n/ ci t y Vi l l a ge A CT IONS A1 : P re mi um p e r R s . 20 Rs.25 R s . 40 t ho usa nd A2 : M a xi mum p ol i c y R s . 10, 00 , 00 R s . 6 , 00 , 0 00 R s . 2 , 0 0 ,0 0 0 a mount 0 A3 : Ins ur a nc e P ol i cy A LLOW A LLOW A LLOW RULES 3 4 N Y -N X X E L S E X

4 E L S E R EFU SE

30

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY

31

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY
M ixe d e nt ry de c is io n t a b le T hi s i s t hi r d t yp e of d e c i si on t a b le . It us e s t he t e c hni q ue s o f b ot h a l i mit ed e nt r y d e c is i on t ab l e a nd e x t e nd ed e nt r y d e ci si on t a b l e . W hi l e t he l i mit ed a nd e xt e nde d e nt r y f or ms c a n b e mi x ed w i t hi n t he t a b l e , o nl y o ne f orm ma y b e us e d w i t hi n a c ond i t i on s t at ement /e ntr y or a n a ct i on s t at ement /e ntr y. I ll ust rat io n: A w hol e se l l er ha s t hr ee c ommod it i es t o s e l l a nd ha s t hr e e t yp e s o f c us t ome rs . T he d i s c ount i s g i v e n a s p e r f ol l ow i ng r ul e s : F or Govt . or d er s , 15% d i sc ount i s g i v e n i r re sp ec ti ve o f t he v a l ue of t he or d e r . F or or d e rs of mor e t ha n R s . 20 , 0 00 , a n a g e nt g e ts a d i s c ount o f 2 0% a nd t he r e t ai l er 15% r e sp ec ti ve l y . F or or d e rs of va l ue b e t we en R s . 10 , 0 00 a nd R s .2 0 , 00 0 , a g e nt g e t s d i s c ount of 15% a nd t he r e ta i le r g e ts 1 0% . F or or d e r o f va l ue l e s s t ha n R s . 10 , 0 00 , t he a g e nt a nd r e t ai l er g e t d i s c ount of 10% a nd 5% r e sp ec ti ve l y . T he a b ove r ul e s d o n ot a p pl y t o f ur ni t ure i t ems . H ow e ve r , i n c a se of f ur ni t ure i t e ms , a f l a t r a te of 10 % d i sc ount i s a dmi ss ib le t o a l l t y p e of c us t ome rs . P r ep ar e a mi xed e nt r y d e c is ion t a b le . MI X ED ENT RY DECI SI ON T A BLE De ci sio n R ule s 1
Condition s C1: Order value C2: customer type C3: Product A c t io n s Discount A1: 5% A2:10% A3: 15% A4: 20% Any amount Any Furniture

(i) (ii) (iii) (iv)

Di sco unt p o licy

2
Any amount Govt. Others

More than Rs.20,000 Agent Others Retailer Others

Between Rs.10,000 & Rs.20,000 Agent Retailer Others Others

Below Rs.10,000 Agent Others Retailer Others

X X X X X X X X

32

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY
B e nef it s o f De ci sio n T ab le s: F ol l ow i ng a r e g i ve n s ome of t he B e ne f it s o f D e c is i on T a bl es : Ea sy t o Dra w D ec i si on T ab l es a r e e as y t o d ra w a nd mod i f y a s c ompa re d t o f l ow c ha rt s. Co mp act Do cume nt at io n T he d oc ume nt at ion i n t he f or m of d e c i si on t a b le s i s c omp ac t s i nc e o ne d e c i si on t a b l e ma y r e p la ce f e w p a g es of a f l owc har t S imp l icit y I t i s e as i er t o f ol l ow a p ar t ic ul ar p at h i n o ne c ol umn of a d e c i si on t ab l e t ha n i t i s t o g o t hr oug h s e ve ra l p a ge s o f t he f l ow c ha rt s. D ire ct Co dif ica t io n - T he d e c is i on t ab l es c a n b e d i r e ct ly c od e d i nt o a p r og ra m. B e t te r Ana ly sis A d e ci si on t a b le s how s v a r i ous a l t e r na ti ve s a nd t he i r r e s pe ct ive out c ome s s i d e b y s i de f or b e tt er a na l y si s of t he p r ob le m. Mo dula rit y T he c omp l ex p r ob le ms w oul d r e q ui re c omp le x d e c i si on t a b le s w hi c h c a n b e e a s i l y b r oke n d ow n t o mi c r o-d e c i si on t a bl es . No n-t e chnica l No k now l ed ge o f c omp ute r l a ng ua ge or C PU w or k i ng i s ne c e ss ar y f or d r a wi ng d e c i si on t ab l es . L im it at io ns o f De ci sio n T ab le s Fo llo w ing a re gi v e n som e o f t he L im it at io ns o f De ci sio n T ab le s: Al l p r ogr ammers may n ot b e f a mi l ia r w i t h D e c is ion T a b le s a nd t he r e f or e f l ow c ha r ts a r e more c ommon F l ow c ha rt s c a n b e tt er r e p re se nt a s i mp l e l og i c o f t he s y st em r a t he r t ha n a d e ci si on t a b le . T he d e c i si on t a b le s d o n ot e x p r es s t he t ot a l s eq ue nc e of t he e v e nts ne e d ed t o s ol ve t he p r ob le m.

1. 2. 3. 4. 5. 6. 7.

1. 2. 3.

33

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY
SOLVED I LLUST RATI ONS: 1. I f a c ust ome r ha s g ood c r e d it w ort hi ne ss a nd i n a d d i ti on e i t he r he ha s no o ut st and i ng l oa n or he c a n p r ov id e a s ur e ty , h e c a n b e g ra nte d a l oa n b y t he B a nk . Sc r ut i ny f or L oa n Co ndit io ns Good C r ed i t W ort hi nes s Out s ta nd i ng L oa n P r ovid e Sur e t y Act io ns: Gi ve Loa n R e f us e Loa n 1 Y Y Y X 2 Y Y N X 3 Y N X 4 N X

W hi l e i nvoi c i ng e a c h c us t omer , t he c l e r k ha s t o w or k out t he d i sc ount a l l ow ab le o n e ac h or d er . A ny or d er a b ov e R s . 20 , 0 00 a tt ra ct s a b ul k d i s c ount o f 8% . A c us t ome r w i t hi n t he t r ad e i s a l l owe d 1 0 % . T her e i s a l s o a s pe c ia l d i sc ount o f 5% a l l owe d f or a ny c us t ome r w ho ha s b e e n or d er i ng r e g ul ar l y f or o ve r 5 ye ar s . D i sc ount P r oce ss ing 1 2 3 4 5 6 7 8 Co ndit io ns Or d er va l ue -more t ha n R s . 20, 000 Y Y Y Y N N N N C us t omer w i t hi n t he t r ad e Y Y N N Y Y N N C us t omer or d e ri ng r e g ula rl y f or ov e r 5 Y N Y N Y N Y N y e ar A ct io ns: D i sc ount N IL X D i sc ount 5% X D i sc ount 8% X D i sc ount 10% X D i sc ount - 13% X D i sc ount 15% X D i sc ount -18% X D i sc ount -23% X

2.

34

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY
3. a. b. c. d. e. A c omp a ny o f f e rs h i r e -p ur c has e f i na nc e w he r e t he c us t ome rs g e t t he c r e d it f a c i l i ty i f t he y s at is f y a ny o f t he f ol l ow i ng c ond i t i ons : T he c us t ome r must h ol d t he p r e se nt j ob f or more t ha n 5 y e a rs a nd r e s id e i n t he s ame p l a ce f or a t le as t 3 y e ar s . I n s uc h c as e he w oul d g e t c r ed it up t o R s . 10000/T he mont hl y s a la ry of c us t ome r mus t e x c ee d R s . 50 00 a nd mus t h ol d t he p r e se nt j ob f or mor e t ha n 5 y e a rs . In t hi s c a se t he c r e di t w oul d b e g i v e n up t o R s . 15000. T he mont hl y s a la ry e xce ed s R s . 50 0 0 a nd r e si de a t t he s ame p l ac e a t le as t f or 3 ye ar s, he i s a l l owe d a c r ed i t of R s . 20 , 0 00 . I n c a se t he c us t ome r s mont hl y s a la ry e x ce ed s R s . 50 0 0 a nd he h ol d s t he p r e se nt j ob f or more t ha n 5 y e a rs a nd a l s o he r e s id es a t t he s ame p l a ce a t l ea st f or 3 ye ar s , t he c r ed i t f a c i l it y i s a l l ow ed u p t o R s .2 5, 0 0 0 . F or a l l ot he r c us t ome rs , r e q ue st f or c r e di t f a c i l it y i s r e j ec te d. H i re -P ur c has e Fa c i l i ty Co ndit io ns: C us t omer hol d s j ob f or mor e t ha n 5 y e a rs R es i de a t s ame p l a ce f or a t le as t 3 y e ar s M ont hl y s a la ry e xc ee d R s . 50 00 Act io ns: Gi ve C r ed it -R s . 10, 000 Gi ve C r ed it -R s . 15000 Gi ve C r ed it -R s . 20,000 Gi ve C r ed it -R s . 25000 R e f us e C r ed i t 4. 1 Y Y Y 2 Y Y N X X X X X X X 3 Y N Y 4 Y N N 5 N Y Y 6 N Y N 7 N N -

T he n ume r ic al s c or es i n a n e x a mi nat i on (0 t o 10 0 ) a r e t o i nt o l e t te r g r ad es (A t o D ) us i ng t he f ol l ow i ng p r oc ed ure : N umer ic al Sc or e Le t t er Gr a de Le s s t ha n 40 D 40 t o 55 C 55 t o 8 5 B M or e t ha n 8 5 A St ud e nt s Gr a d i ng 1 Co ndit io ns: Le ss t ha n 40 Y 40 t o 55 55 t o 85 Act io ns: Le t te r g r ad e -A Le t te r g r ad e -B Le t te r g r ad e -C Le t te r g r ad e -D X

b e c onv e r te d

2 N Y -

3 N N Y X

4 N N N X

35

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY

5.

A f i r m k e ep s d e t ai ls of t he b i l l s r a i se d on c us t omer s i n a c omp ute r f i l e . T he r e c or d ha s f ol l ow i ng d a ta f i e l d s : C us t ome r na me , T yp e (D e a l er / Ot he r) , B i l l numb e r , B i l l d a ta , Amount , D a te o f P a yme nt . I f a C us tome r p a ys t he b i l l w i t hi n o ne mont h, he i s a l l ow ed 10 % d i sc ount . I f he p a ys w i t hi n 1 t o 2 mont hs , n o d i sc ount i s a l l ow ed . If he p a ys a f t er 2 mont hs , p e na l i nt e re st 10% a s c ha rg ed f r om hi m. I f t he c us t ome r i s a d e a le r , t he n t he c or re sp ond i ng d i sc ount & i nt e re st r a te s a r e 1 5% , 0 , 1 0 % r e s pe ct ivel y. D i sc ount /i nte re st p r oc es si ng Co ndit io ns C us t omer i s a d e a le r P a ys t he b i l l w i t hi n one mont h P a ys b i l l i n 1- 2 mont hs Act io ns: D i sc ount - Ni l D i sc ount -10% D i sc ount -15% P e na l Int e r es t -10% 1 Y Y 2 N N 3 N Y X X X 4 N Y X

6.

A C omp a ny p r ovi d es h ome d e l i ve ry f or i t s p r od uct s a nd b i l l s d e l i v e ry c ha r ge s a cc ord i ng t o t he d i s ta nc e a nd t he a mount of t he b i l l . I f t he d i s t ance of c us t ome r a nd c omp a ny s o f f i c e i s l e s s t ha n 5 K M , n o d e l i v er y c ha r ge s a r e l e vi e d . I f t he d i st a nc e i s more t ha n 5K M b ut l e s s t ha n 1 5K M , t he d e l i ve ry c har ge s a re 2 % of t he b i l l a mount . H owe ve r , i f t he b i l l a mount i s more t ha n R s . 100 0 t he n a c onc e ss iona l r a te of 1% i s l e v i e d . If t he d i s t ance i s more t ha n 1 5K M , t he d e l i v er y c ha r ge s a r e 5% b ut i f t he b i l l a mount i s mor e t ha n R s . 10 00 / - t he n 2 % d e l i v e ry c har ge s a r e l e v i e d . D e l i ve ry C har ge s p r oc es si ng 1 2 3 4 5 Co ndit io ns: D i st ance -Le ss t ha n 5KM Y N N N N D i st ance -M ore t ha n 5KM b ut l e ss t ha n 1 5K M Y Y N N B i l l Amount -U p t o R s . 1000 Y N Y N Act io ns: D e l i ve ry C har ge s -N IL X D e l i ve ry C har ge s -1% X D e l i ve ry C har ge s -2% X X D e l i ve ry C har ge s -5% X -

36

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY
7. A Fi na nce C omp a ny p r ovi de s l oa ns f or b ui l d i ng r e s id e nt i al ho us es or f or p ur c has i ng ve hi c l e s a nd ot he r k i nd of l oa n a p p l i ca ti ons a re r e j ec te d s t r ai g ht aw ay. T he h ome l oa n or v e hi c l e f i na nc e a p p l i ca nt s must b e s e r vi ng i n Govt . or P ub l ic Li mi te d C ompa ny a nd ha v e g ood c r e d it r a t i ng . Fa t he r , a l l h ome l oa n a p p l ic ants mus t ha v e c omp l et ed a t le as t 5 y e a rs of r e g ul ar s er vi ce , ha ve a b a la nce s er v i ce o f a t l ea st 15 y e ar s a nd ha v e a l i f e i ns ur a nc e p ol i c y b a ck up . T he v e hi c l e l oa n a p p l i ca nt s mus t ha v e c omp le te d a s er vi ce of a t l ea st 3 y e a rs , ha v e a b a la nce s er v i ce o f a t l ea st . 7 ye a rs a nd mus t ha ve a va l i d d r i v i ng l i c e nc e . P re l i mi nar y Sc r ut i ny of Loa n a p p l ic at ions 1 2 3 4 Co ndit io ns: Se r vi ce i n Govt . or P ub l i c L i mi te d C omp a ny Y Y Y N Good C r ed i t R at i ng Y Y N Ap p l ic at i on f or H ome L oa n Y N Act io ns: Go t o H ome Loa n T ab l e X Go t o Ve hi c l e Loa n T a b le X R e je ct a p p l ic at ion X X H ome L oa n Sc r ut i ny Co ndit io ns: C omp l et ed mi ni mum 5 ye ar s o f s e r v ic e B a la nc e s e rvi ce of mi ni mum 15 y e a rs H a ve a Li f e I ns ur a nc e P ol i c y b a ck up Act io ns: Ac ce pt a p p l i ca ti on R e je ct a p p l ic at ion Ve hi c l e Loa n Sc r ut i ny Co ndit io ns: C omp l et ed mi ni mum 3 ye a rs o f s e r v ic e B a la nc e s e rvi ce of mi ni mum 7 y e ar s H a ve a va l i d d r i vi ng l i c e nc e Act io ns: Ac ce pt a p p l i ca ti on R e je ct a p p l ic at ion 1 Y Y Y X 1 Y Y Y X 2 Y Y N X 2 Y Y N X 3 Y N X 3 Y N X 4 N X 4 N X

37

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY

DATABASE MANAGEMENT SYSTEMS (DBMS)


A d a t ab ase i s a c ol l ec ti on of l og i c al l y r e l at ed i nf or ma ti on. D a ta ba se M a na ge me nt i s t he t a sk o f ma i nta i ni ng d a ta ba ses s o t ha t i nf or ma ti on i s r ea d il y a va i l ab le . M a nag ement of d at ab as e i nv ol v e s : - D e f i ni ng s tr uct ure s f or d a ta s t or ag e. - P r ovi d i ng me c ha ni sm f or d a ta ma ni p ula ti on s uc h a s a dd i ng , e d i t i ng , d e l e t i ng , e t c . t he d a t a - P r ovi d i ng d at a s ec ur it y a g ai nst u na ut hor i ze d a cc es s. T he s of tw ar e r e q ui re d t o p e r f orm t he t a sk of d a ta ba se ma nag ement i s c a l l ed a D a ta bas e M a na ge me nt Sys t em ( D BM S) . In s i mp le t e r ms , A c ol l ec ti on o f p r og ra ms r e q uir ed t o s t or e a nd r e tr i ev e d a t a f r om a d a t ab as e i s c a l le d a D a ta ba se M a na ge me nt Sys t em. T he ma i n ob j e c t iv es of a ny D B M S a r e t o: - P r ovi de a n e f f i c ie nt a nd c onv e ni e nt e nv i r onme nt t ha t i s us e d t o s t ore i n, a nd r e t ri e ve d a ta f r om a d a ta ba se. - M a nag e i nf or ma ti on a b out us e rs w ho i nt e ra ct w i t h t he D BM S a nd t he a c t i vit ie s t hat t he se us e r s c a n p e r f orm on t he d a t a. D B M S c ont r ol s t he i nt e r ac ti on b e t we e n t he d a ta ba se a nd a p p li ca ti on p r og ra ms p r ep ar ed b y p r ogr ammer s on one ha nd a nd b e t we en t he d at ab as e a nd no n-p r ogr ammi ng or a d hoc us e r s on t he ot he r . It a l so p r ov i d es me c ha ni sms f or ma i nta i ni ng t he i nt e g ri ty of s t or ed i nf or ma ti on, ma na gi ng s e c uri t y a nd us e r a c ce ss , b ac k up a nd r e c ov er y p r oce d ur es . A D B M S c a n or ga ni z e , p r oce ss a nd p r es ent s e l ec te d d a ta e l e me nts f r om t he d a t ab ase . T hi s c ap ab i l it y e nab l es d e ci si on-ma ke rs t o ma ke s p ec ia l q ue r ie s f or s e ar chi ng d a ta ba se c ont e nts t ha t a r e not a v a i la bl e i n r e g ula r r e p ort s. F or e xampl e , a d a t ab as e ma y c ont a i n t he ne t s a la ry o f a l l t he e mp l oy ee s of t he or g a ni za ti on. T he r e g ula r r e p or t p r es ents a l i st of t he e mp l oy ee s w i t h t he i r ne t p a y, i n t he a sc e nd i ng or d e r o f na mes or p a y . H owe v er , i f i t i s d e s i re d t o g e ne ra te a l i s t o f e mp l oye es d ra w i ng a s a la ry i n e x ce ss of R s . 5000 out of t he t ot a l , t he a ns we r w oul d b e p r ov i d ed b y p os i ng a s p ec i al q ue r y t hr oug h t he D BM S. W hi l e ma i nta i ni ng a un i f i e d d at ab as e t he y c a te r t o t he d i f f e re nt r e q ui re me nt s o f t he se d i f f e re nt us e r s. T hi s i s ma de p os s ib l e b y t he D B M S b y p r ovi d i ng t w o `vi e ws of t he d a ta ba se i . e . a P hy s i ca l v i e w a nd a Log i c al v i e w . T he p hys ic al vi e w d e a ls w i t h a c t ua l p hy s ic al a r ra ng ement a nd l oc at i on o f d a t a i n t he s t ora ge d e vic es . T he l og i c al v i e w or t he us e r s v i e w i s t he r e p re se nt at ion o f d a ta i n a f or m w hi c h i s me a ni ng f ul t o t he us e r . W hi l e t he r e c a n b e o nl y o ne p hys i c al v i e w of t he d a ta ba se , t he re c a n b e e nd l es s n umb er of l og i ca l vi e w s, one s p e ci f i ca ll y s ui t ab l e f or e v e r y i nd i v i d ua l us e r .

38

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY

Funct io ns o f DB MS A DB MS p e rf o rm s t he f o l lo w ing se rv ice s :1. T ra nsa ct io n p ro ce ssing: A t ra nsa ct ion i s a s e q ue nce o f d at ab as e op e r at ions t hat r e p re se nt s a l og i ca l un i t of w or k . In ot he r w or d s, i t r e p re se nt s a c ce ss i ng a d a t ab as e r e c ord a nd up d a ti on, mod i f i ca ti on, d e l e t ion e t c . t he r e of . Co ncurre nt Ma na ge r: A D BM S a ct s a s a c onc urr e nt ma na ge r w hos e f unc t i on i s t o c o -or d i na te t he a c t i ons o f d a t ab ase ma ni p ula ti on p r oce ss es op e r at i ng c onc ur r e nt l y w hi l e ma i nt ai ni ng t he c ons i st e nc y o f t he s ha r ed d a t a a t t he s a me t i me . Re co ve ry : T he r e c ove ry mec ha nis ms b ui l t i nt o D BM S e ns ure t ha t t he d a t ab ase i s r e t ur ned t o a c ons is te nt s ta te a f t er a t ra nsa ct ion ha s f a i l e d or ha s b e e n a b ort ed . Se curit y : Se c ur it y r e f er s t o p r ot ec ti on of d a t ab ase f r om a cc es s b y u na ut hor iz ed us e rs . T he s e c ur i t y l e v e l s c a n b e v a r y i ng f or d i f f e r e nt us e rs p r ovi d i ng d i f f e re nt a cc es s p r i v i l eg es s o t ha t t he op e ra ti ons p e r f ormed a r e moni t ore d a nd c ont r ol le d b y t he D B M S a cc ord i ng ly . La nguage I nt e rf a ce : T he D BM S p r ov i d es a n i nt e rf ac e w he r eb y t he us e r s o f d a ta ba se c r e at e a w or k i ng e nv i r onme nt w i t hout w or ry i ng a b out t he p hys i c al i mp l ementa ti on. T hi s i s ma de p os s ib le b y t he d a ta d e f i ni t i on l a ng ua ge a nd d a ta ma ni p ula ti on c omp one nt s o f t he D BM S. Da t a Ca ta lo g: D at a D i c t ionar y or Sc he ma c ont a i ns d e s cr ip ti ons a b out d a t a, r e la ti ons hip s a nd c ons t ra i nt s w hi c h c a n b e e nq ui r e d i nt o t o g e t i nf or ma ti on a b out t he s tr uct ure o f t he d at ab as e. St o ra ge Ma na ge r: D B MS p r ov i d e a mec ha nis m f or t he ma nag ement of p e r ma ne nt s t or ag e o f d at a . T he i nt e r na l s c hema d e f i ne s how t he d a t a s houl d b e s t or ed b y t he s t ora ge ma nag er w hi c h i nt er f ac es w i t h t he op e r at i ng s ys te m t o a cc es s t he p hy s i c al s t ora ge .

2.

3.

4.

5.

6.

7.

39

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY

Co mp onents o f DB MS A D B M S he l p s a p r og ra mmer t o c onc e ntr at e o n t he p r ogr am l og i c w i t hout w or r yi ng a b out t he or g a ni za ti on o f d a t a or l oc at i on of d at a . Al l t he d a ta ne e d ed b y a n a pp l i ca ti on p r og ra m c a n b e a cc es se d r e ga rd le ss of t he a c ce ss met hod , r e c ord l oc a ti on or r e c ord c ont e nt . M os t of t he D B M S us e a us e r -f r i e nd l y q ue r y l a ng uag e a nd a l s o a r e a b le t o i nt e r ac t w i t h c ommonl y us e d h i g h l e ve l l a ng uag es .T he p r i nc ip al c omp one nts of a D BM S p e r f or m d i f f e r e nt f unc t i ons a s f ol l ow s , a nd f orm a s y st em c ol l ec t i ve l y : 1. Da t a De scrip t io n Mo dule : T he l i nk b e tw ee n t he l og i ca l v i e w a nd t he p hy s ic al r e c ord i s c a l l ed a s D a ta D e f i ni ti on a nd t he l a ng uag e i s c a l l ed a s D a ta D e f i ni t i on La ng ua ge . A d a t a d e f i ni t i on l a ng uag e ( D D L) i s us e d t o d e f i ne t he d a ta ba se c onc e pt ual s c he ma . I t d e f i ne s w ha t t y p e o f d a ta i s i n t he d at ab as e a nd h ow i t i s s t r uct ure d. In mos t D BM S, t he D D L a l s o d e f i ne s us e r v i e w s a nd , s omet imes , s t or ag e s t r uct ure s. T he d a ta d e f i ni t i on o f d a t ab as e or t he l og i c al s tr uct ure i n w hi c h a n a p p l ic at ion p r og ra m vi e ws a d a t a i s c a l le d a s Sc he ma . Sc he ma a l s o i nc l ud es a n i nd i ca ti on o f t he l og i ca l r e la t ions hip s b e t we en v a r i ous c omp one nts of t he d a ta ba se . Si nc e t he re c a n b e ma ny us e r s a nd a p p l ic at ion p r og ra ms us i ng t he s ame d a ta ba se , ma ny d i f f er e nt ` us er v i e ws c a n e xi st . T he s p e ci f i c s e t of d a t a r e q uir ed b y e a c h us e r or e a c h a p p l ic at ion i s c a l l ed a s Sub -s c hema. Al l t he Sc he ma a nd Sub -s c hema a re ma i nt ai ned & d oc ume nt ed i n a D a ta D i c t i ona ry. Al l t he d a t a r e q uir ements a nd t he d at a d e f i ni t i ons of a pp l i ca ti on p r og ra ms a re r e f er re d t o D a ta D e sc ri pt i on M od ule , w hi c h a na l y se s t he r e q ues ts a nd a cc ord i ng l y t r a nsf er s c ont r ol t o D at a M a nip ul at ion M od ul e . 2. Da t a Manip ula t io n Mo dule : T hi s mod ule i s us e d w i t h h i g h l e v e l l a ng uag es t o q ue r y t he c ont e nts of t he d a ta ba se , s t or e or up d a te i nf or mat ion i n t he d a ta ba se a nd d e v el op d a t ab ase a p p l ic at ions . A D at a M a nip ul at i on La ng uag e ( D M L) i s us e d f or s pe c i fy i ng d at ab as e r e t r ie va ls a nd up d at es . DML can be h i g h-l e v e l (s e t -or i e nt ed , n onp r oce d ur al ) or l ow -l e ve l ( r e c or d -or i e nt ed , p r oce d ur al ) . A h i g h-l e ve l D M L c a n b e e mb ed de d i n a h os t p r og ra mmi ng l a ng ua ge , or i t c a n b e us e d a s a s t a nd -a l one q ue r y l a ng ua ge . T he ut i l i t i e s a v a i la bl e t hr oug h t he D M L f or d a ta p r oce ss ing s uc h a s r e tr i ev al , s or t i ng , d i s p l ay , d e l e t ion o f d a ta /re cord a r e c ont a i ne d i n t hi s mod ule . I t c a n b e f ur t he r c l a ss if i ed a s f ol l ow s : a. Ap p l icat io n de ve lo pm ent ut i li t i e s: Se t of p r ogr ams d e si g ne d t o he l p d e ve l opment of a p pl i ca ti on p r og ra ms us i ng t he d a t ab ase . T he a p p l ic at ion g e ne ra tors a ut oma ti ca ll y p r od uc e d a t a e nt r y s cr ee ns , r e p ort s a nd a me nus s ys te m f or e nd us e r s t o us e .

40

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY

b.

c. d. e.

Ho st La ngua ge I nt e rf ace : T hi s p a r t i s r e sp onsi b le f or c ommuni ca ti on w i t h a p p l ic at ion p r ogr ams a nd i nt e rp re ts t he i ns t r uc ti ons r e ga rd i ng d a t a r e q ui re me nt s r e c e ived f r om H i g h Le v e l La ng uag e a pp l i ca ti on p r og ra ms s o t ha t n e c es sa ry d a ta c a n b e r e tr i ev ed . B a ckup , Arch iv e & Re cov e ry ut il it ie s : T ool s t o ma ke c op i e s , r e tr i ev e , r e s ta rt , a nd r e c over t he d a ta ba se c ont e nts . Re p o rt Writ ing ut il it ie s: A us e r -f r i e nd l y i nt er f ac e a l l ow i ng us e rs t o c r e at e c us t omi ze d r e p or ts w i t hout w r i t i ng a n a p p l ic at ion p r ogr am. Na t ura l La nguage I nt e rf ace o r Que ry La nguage I nt e rf a ce : U se rs c a n c r e at e, vi e w , mod i f y, a c ce ss d a ta f r om t he d a ta ba se a nd a l s o a s k s pe c ia l q ue s t i ons r e la ti ng t o t he d at ab as e, t he a nsw er s of w hi c h a r e n ot a va i la bl e i n t he f or ma tt ed r e p ort s, us i ng a s i mp l e Eng l i s h-l i k e Que r y La ng ua ge . Application Program Data Description Module Data Manipulation Module

Data Base

Output

1.

2.

3.

4.

Re a sons f o r us ing DB MS D B M S a r e e xp e ns i ve t o c r ea te i n t e r ms of s of tw ar e, ha r dw ar e, a nd t i me i nve st ed . A q ue s t i on i s o f t e n a s ke d t ha t w hy D B M S i ns te ad of d a ta i n f l at f i l es ( w hi c h can be e d i te d /mod i f ie d us i ng w or d p r oc es sors or s p r ea ds he et s) . T he re a so ns w hy DB MS a re p re f e rre d o v e r t he f la t f il e s a re a s f o llo w s: Mu lt ip le u se rs- M ul t i p le us e rs of d a t a a ct ua ll y i mp l i es mul t i p l e d a ta up d a te rs . A D BM S p e r mi ts mul t i p l e , c onc ur re nt up d at es a nd / or i ns er ti ons , a nd w i l l g uar a nt ee t ha t e a c h t r a ns ac ti on c ommi ts w he re as t hi s f a c i l i ty i s n ot a va i la bl e i n f l a t f i l e s yst em. Re duce d Re dunda ncy & I nco nsist e ncy One c op y of d a ta r e d uce s r e d und a nc y a nd i nc ons i st ency . A D BM S c a n ma nag e c ons is te ncy b e t te r a nd c a n e nf or ce a dd i t iona l c ons tr ai nts . I n a f l a t f i l e , i t w oul d b e up t o t he d i s c ip l i ne of t he us e r s t o e ns ur e t ha t t he i r e d i t s d i d not v i ol at e t he c ons i st e nc y of t he d a t ab ase . Co nf ide nt ia lit y , p r iv a cy , a nd se curit y In or d e r t o p r e se rv e t he c onf i d e nt ia l it y a nd p r i va c y o f i nd i v i d ua ls , a cc es s t o d at a i s of t e n r e s tr ic te d. I n t he f l a t f i l e mode l , w e c a n us e f i l e -l e v e l s ec ur it y t o p r e ve nt a c ce ss t o c e rt ai n f i l e s . A D B M S h ow e ve r, ha s f i ne r l e v e l s e c ur i ty a nd c a n p e r mi t or r e s tr ic t a cc es s t o v e r y f i ne -g r a i ne d c hu nk s of d a ta . St a ndards ca n b e e nf o rce d A D B MS c a n ma ke s ur e t ha t c omp le te i nf or ma ti on i s e nt er ed a b out a p ar t ic ula r f a ct a nd c a n e nf or ce l i mi te d

41

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY
t yp e c ons is te ncy c he c ks a b out t ha t i nf or mat ion. B y e nf or c i ng s ta nda rd d ur i ng d a ta i np ut t he q ua l i ty of t he d a ta i n d a t ab ase c a n b e e nha nc ed .

Re a sons f o r no t usi ng DB MS T he r e a r e b as ic al l y t w o s i t ua t i ons w he n t he us a ge of D a ta ba se M a nag ement Sys t ems b e c omes a n op t i on. T he f i r s t i s t he c ost f a ct or . M a i n c os ts of us i ng a D BM S i nc l ud e hi g h i ni t i a l s e t up c ost , p os s ib l y c ost o f e xt ra ha r d wa re , c os t of e nt e r i ng d a ta , c ost o f t ra i ni ng p e op le t o us e D B M S a nd c ost o f ma i nt ai ni ng D BM S. T he s e c ond s i t uat i ons w he n a D BM S ma y b e u nne c e ss ar y i s i f a c ce ss t o d a ta b y mul t i pl e us e rs i s n ot r e q ui re d a nd d at a s e t i s s mal l or i f d at ab as e a nd a p p l i ca ti on a re s i mp l e , w e l l d e f i ne d , a nd n ot e xp ec te d t o c ha ng e . B e nef it s & L im it at io ns o f DB MS T he a dva nt ages o f a DB MS o ve r t he co nv ent iona l f il i ng sy st e ms a re a s f o llo w s:D a ta i nt e gr at ion a nd s har i ng r es ul ts i n r e d uc ed d at a d up l i c at ion a nd d a ta r e d und a nc y s i nc e e a c h l og i c al d at a i t em i s s t or ed i n one p l ac e . T he D B A us e s s e c ur i ty s ubs y st em p r ov i d ed b y D BM S t o s p ec i fy a cc ount r e s tr ic ti ons f or p r e ve nt i ng una ut hor i ze d a cc es s. T he D B M S p r ovid es p e rs is te nt s t or ag e f or p r ogr am ob j e ct s a nd d a t a s t r uct ure s w he re by ob j e ct s s ur v i v e t he t e r mi nat ion o f p r ogr am e x e c ut i on a nd c a n l a t er b e r e t ri e ve d . D B M S p e r mi ts i nf e r e nc i ng a nd a c ti ons us i ng R ul e s . It ha s t he c a pa bi l i ty f or d e f i ni ng d e d uc ti ve r ul e s f or i nf e re nc i ng ne w i nf or mat ion f r om t he s t ore d d a ta ba se f a ct s . M ul t i p l e U se r I nt e r f ac es a r e p r ov i d ed t o s at is f y us e r s w i t h v a r y i ng l e v e l s o f t e c hni ca l k now l e dg e . T he us e r -f r i e nd l y f e a t ur es o f a D BM S mak e i t p os s ib l e f or a n or d i nar y p e r son w i t h mi ni ma l k now l ed ge o f c omp ut er s & p r og ra mming l a ng ua ge s t o us e t he d a ta ba se. D B M S ha s t he c a pa bi l i ty t o r e tr i ev e a nd up d at e r e l at ed d a ta e a s i ly a nd e f f i c i e nt l y b y r e pr es ent i ng c omp l ex r e l a ti ons hip s a mong d a t a. D B M S mak es e nf or c i ng d a ta i nt e g ri t y c ons tr ai nts p oss i b le b y s pe c i fy i ng a d a t a t yp e f or e ac h d a ta i t e m. A D BM S mus t p r ovi d e f a c i l i ti es f or b ac k up a nd r e c ov er i ng f r om ha r d wa re or s of tw ar e f a i l ur es . T he c ha nce s of e r r or i n d at a p r oce ss ing a nd up d at i ng a r e mi ni mi ze d . T he i nd e pe nde nce of p r og ra ms a nd d a ta r e s ul ts i n l e s se r r e q ui re me nt f or a p p l ic at ion p r ogr ams. T he no n-r e c urr i ng a nd a d -h oc i nf or mat ion r e q uir ements a r e met b y t he us e o f q ue r y l a ng uag e f e at ure o f t he D BM S T he D BM S a dd s t o t he f l e xi b i l it y i n d e s i g ni ng a nd c re at i on of us e r -s p ec i f ic r e p ort s. T he i ns ta l la ti on of D BM S i mp l ie s s a v i ng i n s t ora ge s p ac e & op e r at ion c os ts .

1. 2. 3. 4. 5.

6. 7. 8. 9. 10. 1 1. 12. 1 3.

42

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY
1. 2. 3. 4. 5. Ho we ve r, a DB MS ha s i t s o w n se t o f l im it at io ns. I ns t a l la ti on of D B M S i s c omp le x a nd e x p e nsi v e p r op osi ti on a nd c a n b e t a k e n u p b y onl y t hose or g a ni za ti ons w hos e d a t a p r oce ss ing ne e ds r e q ui re s uc h a s yst em D a ta i nt e gr at ion a nd s har i ng i n D B M S i mp l ie s t ha t i t must ha v e a p p ropr i at e d a ta s e c ur i ty & d a ta i nt e g ri ty f e at ure s t o a l l ow a c ce ss t o a ut hor i ze d us e rs o nl y. T he c onve rs i on o f d a t a f r om c onv e nt i ona l f i l i ng s y st em t o D B M S i s a t i me c ons umi ng p r oce ss . A D BM S c a n b e ma i nt ai ned b y w e l l -q ua l i f i ed D at a B as e Ad mi ni st ra tor o nl y, w hi c h ma y not b e a va i l ab le i n a l l or ga ni z at ion. D B M S r e q ui r e d i r e ct a c ce ss s t ora ge d e v i c es a nd a d di t i ona l p r oc es sor c a pa bi l i ti es , w hi c h ma y i nc r ea se t he or g a ni sa ti on s i nv es tment i n ha r d wa re . I m p lica t io ns o f Da t aba se A p p ro ach P o te nt ia l f o r e nf o rcing St a nda rds- T he d at ab as e a pp r oa ch p e r mi ts t he D B A t o d e f i ne a nd e nf or c e s ta nda rd s a mong d at ab as e us e rs i n a l a rg e or g a ni za ti on. It f a c i l i ta te s c ommunic at ion a nd c oop er at ion a mong v a r i ous d e p ar tments a nd p r oj e ct s, a nd us e r s w i t hi n t he or g a niz at i on. Re duce d Ap p lica t io n De ve lop ment T ime - Le s s t i me i s g e ne ra ll y r e q ui re d t o c r e at e a n e w a p p l i ca ti on us i ng D B M S f a c i l it i es . F le xib i li t y - M od er n D B MSs a l l ow c e rt ai n c ha ng es t o t he s t r uc t ur e o f t he d a t ab ase w i t hout a f f ec ti ng t he s t ore d d a ta a nd e x i st i ng a p p l ic at ion p r og ra ms . Av a ila b il it y o f Up -t o -Da te I nf o rma tion Al l us e r s c a n i mmed i at el y s e e t he c ur r e nt (a nd up -t o -d a t e) d at a . Eco nom ies o f Sca le T hi s r e s ult b y r e d uc i ng t he a mount o f ov e r la p d a t a -p r oce ss ing . F il e Managem ent Sy st em V s. DB MS T he b i g ge st l i mi t at ion of t r ad it i onal Fi l e M a nag ement S y s te m i s t he c omp le te i nt er -d e p e nd e nc e of f i l e s t r uc t ur i ng & s t or i ng w i t h Ap p l ic at i on s of t wa re . I t i s d e s ig ned t o p r oce ss d a ta i n b at c he s a nd p r od uce o ut p ut i n p r e p la nned f ormat s. I f a ny d i f f er e nt i nf or ma ti on i s r e q uir ed , t ha n t he w hol e a p p l ic at ion p ac ka ge ha s t o b e mod i f ie d or r e -w r i tt e n w hi c h i s a l t oge t he r i nd e pe nde nt a nd t i me c ons umi ng t a sk i n i t se l f . T he re f or e , t he c onve nt i onal F i l e M a nag ement Sy s t ems a re u na b le t o p r ov i de t he a nsw er s t o c us t omiz ed q ue r i es a nd c ha ng ed s c e na ri ous i n a t i me l y ma nner . D B M S o n t he ot he r ha nd a re f l e x i b l e b ut c omp le x s y st em w hi c h c a n a c ce ss t he d at a c ont a i ne d i n t he d a ta ba se i n a ny w a y a us e r s pe c if i es . D a ta i nt e g ra ti on f r om s ep ar at e f i l e s ma ke s i t p oss i bl e f or a us e r t o c r e at e i nnume ra bl e r e p ort f or ma ts w i t hout t he a i d o f p r og ra mme rs a nd a s k a ny q ue s t i on r e la ti ng t o t he d a t ab as e w i t hout t he ne e d o f l e a r ni ng p r og ra mming l a ng ua ge . T he f o llo w ing t a b le ma ke s a com pa riso n b e t we en t ra dit io na l f il e m anageme nt sy st em a nd Da ta ba se Manageme nt Sy st em . Fi l e M a nag ement S ys te m D a ta ba se M a na ge me nt Sy s t em Su i t ab l e i n s mal l s ys te ms ( P C b as ed ) S ui t a b le i n l a rg e s y st ems (M a i nf r ames ) R e la ti vel y i ne xpe ns i ve C os t l y Fe w `f i l e s w i t h s i mp l e s t r uc t ur e M a ny ` f i l e s w i t h c omp l e x s t r uc t ur e

1.

2. 3. 4. 5.

43

Prof. Zulesh Dedhia /P.C.C./ INFORMATION


TECHNOLOGY
In t e gr i ty left to a p p l i ca ti on R i g or ous i nb ui l t i nt e gr i ty c he c k i ng p r ogr ammer No d at a s ec ur it y R i g or ous d a t a s e c uri t y Si mp l e , p r i mit i ve b ac k up /re cover y C omp le x & s op his ti ca te d b a ck up / re cov er y Of t e n s i ng l e us e r M ul t i p l e us e rs

44

Vous aimerez peut-être aussi