system r

Upload: curiousfan

Post on 03-Jun-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/12/2019 System r

    1/15

    C O M P U T I N GP R A C T I C E S

    A H i s t o r y a n d E v a l u a t i o no f S y s t e m RDona ld D. Chamber l inMor ton M. As t rahanMichae l W. BlasgenJames N. GrayW. Frank KingBruce G. L indsayRaymond Lo r ieJames W. Meh l

    Thomas G. Pr i ceFranco Putzo luPatr ic ia Gr i f f i ths Se l ingerMar io Schko ln ickDona ld R. S lu tzIrv ing L. Tra igerBrad fo rd W. WadeRober t A . Yos tIBM Resea rch Labo ra to rySan Jose, Ca l i fo rn ia

    1 IntroductionT h r o u g h o u t t h e h i s t o r y o f i nf o r -

    m a t i o n s t o r ag e i n c o m p u t e r s, o n e o ft h e m o s t r e a d i l y o b s e r v a b l e t r e n d sh a s b e e n t h e f o c u s o n d a t a i n d e p e n -d e n c e . C . J . D a t e [ 2 7 ] d e f i n e d d a t ai n d e p e n d e n ce a s i m m u n i t y o f a p -p l i c a t i o n s t o c h a n g e i n s t o r a g e s t r u c -t u r e a n d ac c es s s t r a te g y . M o d e r nd a t a b a s e s y s te m s o f f e r d a t a i n d e p e n -d e n c e b y p r o v i d i n g a h i g h - l e v e l u s e ri n t e r f a c e t h r o u g h w h i c h u s e r s d e a lw i t h t h e i n f o r m a t i o n c o n t e n t o f t h e i rd a t a , r a t h e r t h a n t h e v a r i o u s b i t s ,po in te rs , a r rays , l i s t s , e t c . which a reu s e d t o r e p r e s e n t t h a t i n f o r m a t i o n .T h e s y s t e m a s s u m e s r e s p o n s i b i l i t yf o r c h o o s in g a n a p p r o p r i a t e i n t e r n a lP e r m i s s i o n t o c o p y w i t h o u t f e e a l l o r p a r t o ft h i s m a t e r ia l i s g r a n t e d p r o v i d e d t h a t t h e c o p -i e s a r e no t m a de o r d i s t r i bu t e d f o r d i r e c tc o m m e r c i a l a d v a n t a g e , t h e A C M c o p y r i g h tno t i c e a nd t he t i t le o f t he pub l i c a t i on a n d i t sd a t e a p p e a r , a n d n o t i c e i s g i v e n t h a t c o p y i n gi s b y p e r m i s s i o n o f t h e A s s o c i a t i o n f o r C o m -p u t i n g M a c h i n e r y . T o c o p y o t h e r w i s e , o r t or e pub l i sh , r e q u i r e s a f e e a nd / o r spe c i f i c pe r -m i s s i on .K e y w o r d s a n d p h r a s e s : d a t a b a s e m a n a g e -m e n t sys t e m s , r e l a t i ona l m ode l , c om pi l a t i on ,l oc k i ng , r e c ove r y , a c c e s s pa t h s e l e c t i on , a u -t h o r i z a t i o nCR Categor ies : 3 .50 , 3 .70 , 3 .72, 4 .33 , 4 .6A u t h o r s ' a d d r e s s : D . D . C h a m b e r l i n e t a l . ,I B M R e s e a r c h L a b o r a t o r y , 5 6 0 0 C o t tl e R o a d ,S a n Jose , C a l i f o r n i a 9 5 1 9 3. 1 9 8 1 AC M 0 0 0 1 - 0 78 2 / 8 1 / 1 0 0 0 - 0 6 3 2 75 .

    632

    SUMMARY: Sys tem R, an expe r imen ta l da tabase sys tem,was con s t ruc ted to demons t ra te tha t the usab i l it y advan tagesof the re la t iona l da ta mode l can be rea l ized in a sys tem wi ththe comp le te func t ion and h igh pe r fo rmance requ i red fo reve ryday p roduc t ion use . Th is pape r desc r ibes the th reep r inc ipa l phases o f the Sys tem R p ro jec t and d iscusses som eof the lessons learned f rom Sys tem R about the des ign o fre la t iona l sys tems and da tabase sys tems in genera l .

    r e p r e s e n t a t i o n f o r t h e i n f o r m a t i o n ;i n d e e d , t h e r e p r e s e n t a t i o n o f a g i v e nf a c t m a y c h a n g e o v e r t i m e w i t h o u tu s e r s b e i n g a w a r e o f t h e c h a n g e .

    T h e r e l a t i o n a l d a t a m o d e l w a sp r o p o s e d b y E . F . C o d d [ 2 2 ] i n 1 9 70a s t h e n e x t l o g i c a l s t e p i n t h e t r e n dt o w a r d d a t a i n d e p e n d e n c e . C o d d o b -s e r v e d t h a t c o n v e n t i o n a l d a t a b a s es y s t e m s s t o r e i n f o r m a t i o n i n t w ow a y s : (1 ) b y t h e c o n t e n t s o f r e c o r d ss t o r e d i n t h e d a t a b a s e , a n d ( 2 ) b y t h ew a y s i n w h i c h t h e s e r e c o r d s a r e c o n -n e c t e d t o g e t h e r . D i f f e r e n t s y s t e m su s e v a r i o u s n a m e s f o r t h e c o n n e c -t i o n s a m o n g r e c o r d s , s u c h a s l i n k s ,s e t s , cha ins , pa ren t s , e t c . F or exam -p l e , in F i g u r e l ( a ) , t h e f a c t t h a t s u p -p l i e r Acm e suppl ie s bo l t s i s repre -C o m m u n i c a t i o n so ft h e A C M

    s e n t e d b y c o n n e c t i o n s b e t w e e n t h er e l e v a n t p a r t a n d s u p p l i e r r e c o r d s . I ns u c h a s y s t e m , a u s e r f r a m e s a q u e s -t i o n , s u c h a s W h a t is t h e lo w e s tp r i c e f o r b o l t s ? , b y w r i t i n g a p r o -g r a m w h i c h n a v i g a t e s t h r o u g h t h em a z e o f c o n n e c t i o n s u n t i l i t a r r i v e sa t t h e a n s w e r t o t h e q u e s t i o n . T h eu s e r o f a n a v i g a t i o n a l s y s t em h a st h e b u r d e n ( o r o p p o r t u n i t y ) t o s p e c -i f y e x a c t l y h o w t h e q u e r y i s t o b ep r o c e s s e d ; t h e u s e r ' s a l g o r i t h m i st h e n e m b o d i e d i n a p r o g r a m w h i c hi s d e p e n d e n t o n t h e d a t a s t r u c t u r et h a t e x i s t e d a t t h e t i m e t h e p r o g r a mw a s w r i t t e n .

    R e l a t i o n a l d a t a b a s e s y s t e m s , a sp r o p o s e d b y C o d d , h a v e t w o i m p o r -t a n t p r o p e r t i e s : ( 1 ) a l l i n f o r m a t i o n i sOc t obe r 1 9 8 1V o l u m e 2 4N u m b e r 1 0

  • 8/12/2019 System r

    2/15

    r e p r e s e n t e d b y d a t a v a l u e s , n e v e r b ya n y s o rt o f c o n n e c t i o n s w h i c h a r ev i s ib l e t o t h e u s e r ; ( 2) t h e s y s t e ms u p p o r t s a v e r y h i g h - l e v e l l a n g u a g ei n w h i c h u s e r s c a n f r a m e r e q u e s t s f o rd a t a w i t h o u t s p e c i f y i n g a l g o r i t h m sfor p roces s ing the reques t s . The re -l a t i o n a l r e p r e s e n t a t i o n o f t h e d a t a i nF i g u r e l ( a ) i s s h o w n i n F i g u r e l ( b ) .I n f o r m a t i o n a b o u t p a r t s i s k e p t i n aP AR TS r e l a t i o n i n w h i c h e a c h r e c o r dh a s a k e y ( u n i q u e i d e n t i f i e r) c a l l e dP AR TN O . I n f o r m a t i o n a b o u t s u p p l i e rsi s kep t in a SUPPLIERS re la t ion key edb y S UP PN O . T h e i n f o r m a t i o n w h i c hw a s f o r m e r l y r e p r e se n t e d b y c o n n e c -t i o n s b e t w e e n r e c o r d s i s n o w c o n -ta ine d in a th i rd re la t ion , PRICES, inw h i c h p a r t s a n d s u p p l i e r s a r e r e p r e -s e n t e d b y t h e i r r e s p e c t i v e k e y s . T h eq u e s t i o n W h a t i s t h e l o w e s t p r i c ef o r b o l t s ? c a n b e f r a m e d i n a h i g h -l e v e l la n g u a g e l i k e S Q L [ 1 6 ] a s f o l -lows:SELECT MIN(PRICE)FROM PRICESWHERE PARTNO IN(SELECT PARTNOFROM PARTS.

    WHER E NAME = 'BOLT');A r e l a t i o n a l s y s t e m c a n m a i n t a i nw h a t e v e r p o i n t e r s , i n d i c e s , o r o t h e ra c c e s s a i d s i t f i n d s a p p r o p r i a t e f o rproces s ing use r reques t s , bu t theu s e r ' s r e q u e s t is n o t f r a m e d i n t e r m so f t h e s e a c c e s s ai d s a n d i s th e r e f o r en o t d e p e n d e n t o n t h e m . T h e r e f o r e ,t h e s y s t e m m a y c h a n g e i t s d a t a r e p -r e s e n t a t i o n a n d a c c e s s a i d s p e r i o d i -c a l l y t o a d a p t t o c h a n g i n g r e q u i r e -m e n t s w i t h o u t d i s t u r b i n g u s e r s ' e x -i s t ing app l ica t ions .

    S i n c e C o d d ' s o r i g i n a l p a p e r , t h ea d v a n t a g e s o f t h e r e l a ti o n a l d a t am o d e l i n t e r m s o f u s e r p r o d u c t i v i t ya n d d a t a i n d e p e n d e n c e h a v e b e c o m ew i d e l y r e c o g n i z e d . H o w e v e r , a s i nt h e e a r l y d a y s o f h i g h - l e v e l p r o g r a m -m i n g l a n g u a g e s , q u e s t i o n s a r e so m e -t i m e s ra i se d a b o u t w h e t h e r o r n o t a na u t o m a t i c s y s t e m c a n c h o o s e a s e f -f i c i e n t a n a l g o r i t h m f o r p r o c e s s in g ac o m p l e x q u e r y a s a t r a i n e d p r o g r a m -m e r w o u l d . S y s t e m R i s a n e x p e r i -m e n t a l s y s t e m c o n s t r u c t e d a t t h e S a nJ o s e I B M R e s e a r c h L a b o r a t o r y t od e m o n s t r a t e t h a t a r e l a t i o n a l d a t a -b a s e s y s t e m c a n i n c o r p o r a t e t h e h i g hp e r f o r m a n c e a n d c o m p l e t e f u n c t i o n633

    S U P P L I E R S

    Fig. l ( a ) . A N avi gat i onal Database.

    pc

    r e q u i r e d f o r e v e r y d a y p r o d u c t i o nuse .T h e k e y g o a l s e s t a b l is h e d f o r S y s -

    t e m R w e r e :(1 ) To prov ide a h igh- leve l ,

    n o n n a v i g a t i o n a l u s e r i n t e r f a c e f o rm a x i m u m u s e r p r o d u c ti v i t y a n d d a t ai n d e p e n d e n c e .

    ( 2) T o s u p p o r t d i f f e r e n t t y p e so f d a t a b a s e u s e i n c l u d i n g p r o -g r a m m e d t r a n s a c t i o n s , a d h o c q u e -r i es , a n d r e p o r t g e n e r a t i o n .( 3) T o s u p p o r t a r a p i d l y c h a n g -i n g d a t a b a s e e n v i r o n m e n t , i n w h i c htab les , indexes , v iews , t ransac t ions ,a n d o t h e r o b j e c t s c o u l d e a s i l y b ea d d e d t o a n d r e m o v e d f r o m t h e d a t a -b a s e w i t h o u t s t o p p i n g t h e s y s t e m .

    ( 4) T o s u p p o r t a p o p u l a t i o n o fm a n y c o n c u r r e n t u s e rs , w i t h m e c h a -

    n i s m s t o p r o t e c t t h e i n t e g r i t y o f t hd a t a b a s e i n a c o n c u r r e n t - u p d a t e e nv i r o n m e n t .( 5) T o p r o v i d e a m e a n s o f r

    c o v e r in g t h e c o n t e n t s o f t h e d a t a b a st o a c o n s i s t e n t s t a t e a f t e r a f a i l u r e h a r d w a r e o r s o f t w a re .

    ( 6) T o p r o v i d e a f l e x ib l e m e c ha n i s m w h e r e b y d i f f e r e n t v i e w s os t o re d d a t a c a n b e d e f i n e d a n d v ai o u s u s er s c a n b e a u t h o r i z e d t o q u e ra n d u p d a t e t h e s e v i e w s .

    ( 7) T o s u p p o r t a l l o f t h e a b o vf u n c t i o n s w i t h a l e v e l o f p e r f o r m a n cc o m p a r a b l e t o e x i s t i n g l o w e r - f u n ct i o n d a t a b a s e s y s t e m s .T h r o u g h o u t t h e S y s t e m R p r o j e ct h e r e h a s b e en a s t r o n g c o m m i t m e nt o c a r r y t h e s y s t e m t h r o u g h t o ao p e r a t i o n a l l y c o m p l e t e p r o t o t y p

    P A R T S S U P P L I E R S P R I C E S

    P A R T N O N A M EP 1 0 7 B o l tP 1 1 3 N u tP 1 2 5 S c r e wP 1 3 2 G e a r

    S U P P N O N A M E$ 5 1 A c m e$ 5 7 A j a x$ 6 3 A m c o

    Fig. l ( b ) . A Relational Database.Communicationsofthe ACM

    P A R T N O S U P P N O P R I C EP 107 $51 .59P 1 0 7 $ 5 7 . 6 5P 113 $51 .25P 113 $63 .21P 1 2 5 $ 6 3 . 1 5P 1 3 2 $ 5 7 5 . 2 5P 1 3 2 $ 6 3 1 0 . 0 0

    October 1981Volume 24Number 10

  • 8/12/2019 System r

    3/15

    C O M P U T I N GP R A C T I C E Sw h i c h c o u l d b e i n s t a l l e d a n d e v a l u -a ted in ac tua l use r s i t e s .

    T h e h i s t o r y o f S y s t e m R c a n b ed i v i d e d i n t o t h r e e p h a s e s . P h a s eZ e r o o f t h e p r o j e c t, w h i c h o c c u r r e dd u r i n g 1 97 4 a n d - m o s t o f 1 9 7 5 , i n -v o l v e d th e d e v e l o p m e n t o f th e S Q Lu s e r i n t e r f a c e [ 1 4 ] a n d a q u i c k i m -p l e m e n t a t i o n o f a s u b se t o f S Q L f o ro n e u s e r a t a t i m e . T h e P h a s e Z e r op r o t o t y p e , d e s c r i b e d i n [ 2 ], p r o v i d e dv a l u a b l e i n s i g h t i n s e v e r a l a r e a s , b u ti t s c o d e w a s e v e n t u a l l y a b a n d o n e d .

    P h a s e O n e o f t h e p r o je c t, w h i c ht o o k p l a c e t h r o u g h o u t m o s t o f 1 97 6a n d 1 9 7 7 , i n v o l v e d t h e d e s ig n a n dc o n s t r u c t i o n o f th e f u l l - f u n c t i o n ,m u l t i u s e r v e r s i o n o f S y s t e m R . A ni n i t i a l s y s t e m a r c h i t e c t u r e w a s p r e -s e n t e d i n [4 ] a n d s u b s e q u e n t u p d a t e sto the des ign were desc r ibed in [10 ] .

    P h a s e T w o w a s t h e e v a l u a t i o n o fS y s t e m R i n a c t u a l u s e . T h i s o c -c u r r e d d u r i n g 1 9 7 8 a n d 1 97 9 a n di n v o l v e d e x p e r i m e n t s a t t h e S a n J o s eR e s e a r c h L a b o r a t o r y a n d s e v e r a lo t h e r u s e r s i te s . T h e r e s u l ts o f s o m eo f t h e se e x p e r i m e n t s a n d u s e r e x p e -r i ences a re desc r ibed in [19 -21 ] . Ate a c h u s e r s it e , S y s t e m R w a s i n s t a l l e df o r e x p e r i m e n t a l p u r p o s es o n l y , a n dn o t a s a s u p p o r t e d c o m m e r c i a l p r o d -uct.1

    T h i s p a p e r w i l l d e s c r i b e t h e d e -c i s i o n s w h i c h w e r e m a d e a n d t h el e ss o n s l e a rn e d d u r i n g e a c h o f t h et h r e e p h a s e s o f t h e S y s t e m R p r o j e c t .2. P hase Zero: A n In i t i a l P ro t o-t y p e

    P h a s e Z e r o o f th e S y s t e m R p r o j -e c t i n v o l v e d t h e q u i c k i m p l e m e n t a -t i o n o f a s u b s e t o f s y s t e m f u n c t i o n s .F r o m t h e b e g i n n i n g , i t w a s o u r i n t e n -t i o n t o l e a r n w h a t w e c o u l d f r o m t h isi n i t i a l p r o t o t y p e , a n d t h e n s c r a p t h eP h a s e Z e r o c o d e b e f o r e c o n s t r u c t i o no f t h e m o r e c o m p l e t e v e r s i o n o f S y s-t e m R . W e d e c i d e d t o u s e t h e r e l a -

    1The System R research prototype laterevolved into SQL/Data System, a relationaldatabase management product offered byIBM in the DOS/VSE operating system en-vironment.

    t i o n a l a c c e s s m e t h o d c a l l e d X R M ,w h i c h h a d b e e n d e v e l o p e d b y R .L o r i e a t I B M ' s C a m b r i d g e S c i en t if i cC e n t e r [ 4 0 ] . ' ( X R M w a s i n f l u e n c e d ,t o s o m e e x t en t , b y t h e G a m m aZ e r o i n t e rf a c e d e f i n e d b y E . F .C o d d a n d o t h e r s a t S a n J o s e [ 1 1 ] . )S i n c e X R M i s a s in g l e - u s e r ac c e ssm e t h o d w i t h o u t l o c k in g o r r e c o v e rycapab i l i t i e s , i s sues re la t ing to con-c u r r e n c y a n d r e c o v e r y w e r e e x c l u d e df r o m c o n s i d e r a t i o n i n P h a s e Z e r o .A n i n t e r p re t e r p r o g r a m w a s w r it -t e n i n P L / I t o e x e c u t e s t a t e m e n t si n t h e h i g h - l e v e l S Q L ( f o r m e r l ySEQUEL) lan gu ag e [14 , 16] on topo f X R M . T h e i m p l e m e n t e d s u bs e to f th e S Q L l a n g u a g e i n c l u d e d q u e -r i e s a n d u p d a t e s o f t h e d a t a b a s e , a sw e l l as t h e d y n a m i c c r e a t i o n o fn e w d a t a b a s e r e l a t i o n s . T h e P h a s eZ e r o i m p l e m e n t a t i o n s u p p o r t e d t h e

    s u b q u e r y c o n s t r u ct o f S Q L , b u tn o t it s j o i n c o n s t r u c t . I n e f f e c t, t h i sm e a n t t h a t a q u e r y c o u l d s e a r c ht h r o u g h s e v e ra l r e l a ti o n s i n c o m p u t -ing i t s re su l t , bu t the f ina l re su l tw o u l d b e t a k e n f r o m a s i n g l e r e l a -t ion .T h e P h a s e Z e r o i m p l e m e n t a t i o nw a s p r i m a r i l y i n t e n d e d f o r u s e a s as t a n d a l o n e q u e r y i n t e r f a c e b y e n du s e r s a t i n t e r a c t i v e t e r m i n a l s . A t t h et i m e , l i t t l e e m p h a s i s w a s p l a c e d o ni s su e s o f i n t e r f a c i n g t o h o s t - l a n g u a g ep r o g r a m s ( a l t h o u g h P h a s e Z e r oc o u l d b e c a l l e d f r o m a P L / Ip r o g r a m ) . H o w e v e r , c o n s i d e r a b l et h o u g h t w a s g i v e n t o t h e h u m a n f a c -t o r s a s p e c ts o f t h e S Q L l a n g u a g e ,a n d a n e x p e r i m e n t a l s t u d y w a s c o n-d u c t e d o n t h e l e a r n a b i l i t y a n d u s a -b i l i ty o f SQL [44 ] .O n e o f t h e b a s ic d e s i g n d e c i s i o n si n t h e P h a s e Z e r o p r o t o t y p e w a s t h a tthe sys tem ca ta log , i . e . , the desc r ip -t i o n o f th e c o n t e n t a n d s t r u ct u r e o ft h e d a t a b a s e , s h o u l d b e s t o r e d a s as e t o f r e g u l a r r e l a t i o n s i n t h e d a t a -b a s e i t se l f. T h i s a p p r o a c h p e r m i t s t h es y s t e m t o k e e p t h e c a t a l o g u p t o d a t ea u t o m a t i c a l l y a s ch a n g e s a r e m a d et o t h e d a t a b a s e , a n d a l s o m a k e s t h ec a t a l o g i n f o r m a t i o n a v a i l a b l e t o t h es y s t e m o p t i m z e r f o r u s e i n a c c e s sp a t h s e l e ct i o n .T h e s t r u ct u r e o f t h e P h a s e Z e r oi n t e r p r e t e r w a s s t r o n g l y i n f l u e n c e d

    b y t h e f a c il it ie s o f X R M . X R M s to r esr e l a ti o n s i n th e f o r m o f t u p l e s ,e a c h o f w h i c h h a s a u n i q u e 3 2 -b i t

    t u p l e i d e n t i f i e r ( T I D ) . S i n c e a T I Dc o n t a i n s a p a g e n u m b e r , i t i s p o s s i -b l e , g i v e n a T I D , t o f e t c h t h e a s s o -c i a t e d t u p l e i n o n e p a g e r e f e r e n c e .H o w e v e r , r a t h e r t h a n a c t u a l d a t av a l u e s , t h e t u p l e c o n t a i n s p o i n t e r s t ot h e d o m a i n s w h e r e t h e a c t u a l d a t ai s s t o r e d , a s s h o w n i n F i g u r e 2 . O p -t i o n a l l y , e a c h d o m a i n m a y h a v e a n

    i n v e r s i o n , w h i c h a s so c i a t es d o -m a i n v a l u e s (e .g ., P r o g r a m m e r )w i t h t h e T I D s o f tu p l e s i n w h i c h t h ev a l u e s a p p e a r . U s i n g t h e i n v e r s i o n s ,X R M m a k e s i t e a s y t o f i n d a l is t o fT I D s o f t up l e s w h i c h c o n t a i n a g i v e nv a l u e . F o r e x a m p l e , i n F i g u r e 2 , i fi n v e r s i o n s e x i s t o n b o t h t h e JO B a n dL OC AT IO N d o m a i n s , X R M p r o v i d e sc o m m a n d s t o c r e a te a l i st o f T I D s o fe m p l o y e e s w h o a r e p r o g r a m m e r s ,a n d a n o t h e r l i s t o f T I D s o f e m p l o y -e e s w h o w o r k i n E v a n s t o n . I f t h eS Q L q u e r y c a l l s f o r p r o g r a m m e r sw h o w o r k i n E v a n s t o n , t h e s e T I Dl is ts c a n b e i n t e r s e c t e d t o o b t a i n t h el i st o f T I D s o f t u p l e s w h i c h s a t i s f yt h e q u e r y , b e f o r e a n y t u p l e s a r e a c -t u a l l y f e t c h e d .T h e m o s t c h a l l e n g i n g t a sk i n c o n -s t r u c t i n g t h e P h a s e Z e r o p r o t o t y p ew a s t h e d e s i g n o f o p t i m i z e r a l g o -r i t h m s f o r e f f ic i e n t e x e c u t i o n o f S Q Ls t a t e m e n t s o n t o p o f X R M . T h e d e -s i g n o f t h e P h a s e Z e r o o p t i m i z e r i sg i v e n i n [ 2 ] . T h e o b j e c t iv e o f t h eo p t i m i z e r w a s to m i n i m i z e t h e n u m -b e r o f t u p le s f e t c h e d f r o m t h e d a t a -b a s e i n p r o c e s s i n g a q u e r y . T h e r e -f o r e , t h e o p t i m i z e r m a d e e x t e n s i v eu s e o f in v e r s io n s a n d o f t e n m a n i p u -l a t e d T I D l i s t s b e f o r e b e g i n n i n g t of e t c h t u p l e s . S i n c e t h e T I D l is ts w e r ep o t e n t i a l l y la r g e , t h e y w e r e s t o r e d a st e m p o r a r y o b j e c t s i n t h e d a t a b a s ed u r i n g q u e r y p r o c e s s i n g .

    T h e r e s u l ts o f t h e P h a s e Z e r oi m p l e m e n t a t i o n w e r e m i x e d . O n es t r o n g l y f e l t c o n c l u s i o n w a s t h a t i t i sa v e r y g o o d i d e a , i n a p r o j e c t t h e s i z eo f S y s t e m R , t o p l a n t o t h r o w a w a yt h e i n i t i a l i m p l e m e n t a t i o n . O n t h ep o s i t i v e s i d e , P h a s e Z e r o d e m o n -s t r a t e d t h e u s a b i l i t y o f t h e S Q L l a n -g u a g e , t h e f e a s i b i l it y o f c r e a t i n g n e wt a b l e s a n d i n v e r s i o n s o n th e f l y

    634 Communicationsofthe ACMOctober 1981Volume 24Number 10

  • 8/12/2019 System r

    4/15

  • 8/12/2019 System r

    5/15

    C O M P U T I N GP R A C T I C E ST h e a u t h o r i z a t i o n s u b s y s t e m e n s u r e st h a t e a c h u s e r h a s a c c e s s o n l y t ot h o s e v i e w s f o r w h i c h h e h a s b e e ns p e c i f i c a l l y a u t h o r i z e d b y t h e i r c r e -a t o r s . F i n a l l y , a r e c o v e r y s u b s y s t e mw a s p r o v i d e d w h i c h a l lo w s t h e d a t a -b a s e t o b e r e s t o r e d t o a c o n s i s t e n ts t a te i n t h e e v e n t o f a h a r d w a r e o rs o f t w a r e f a i l u r e .

    I n o r d e r t o p r o v i d e a u s e f u l h o s t-l a n g u a g e c a p a b i l i t y , i t w a s d e c i d e dt h a t S y s t e m R s h o u l d s u p p o r t b o t hP L / I a n d C o b o l a p p li c a ti o n p r o -g r a m s a s w e l l a s a s ta n d a l o n e q u e r yi n t e rf a c e , a n d t h a t t h e s y s t e m s h o u l dr u n u n d e r e it h er th e V M / C M S o rM V S / T S O o p e r a t in g s y st e m e n v i-r o n m e n t . A k e y g o a l o f t h e S Q Ll a n g u a g e w a s t o p r e s e n t t h e s a m ec a p a b i l i t i e s , a n d a c o n s i s t e n t s y n t a x ,t o u se rs o f th e P L / I a n d C o b o l h o s tl a n g u a g e s a n d t o a d h o c q u e r y u s e rs .T h e i m b e d d i n g o f S Q L i n to P L / I isd e s c r i b e d i n [ 1 6] . I n s t a l l a ti o n o f am u l t i u s e r d a t a b a s e s y s t e m u n d e rV M / C M S r e q u i re d c e rt a in m o d if i -c a t i o n s t o t h e o p e r a t i n g s y s t e m i ns u p p o r t o f c o m m u n i c a t in g v i r tu a lm a c h i n e s a n d w r i t a b le s h a r e d v i r t u a lm e m o r y . T h e s e m o d i f i c a t io n s a r e d e -scr ibed in [32] .

    T h e s t a n d a l o n e q u e r y i n t e r f a c eo f S y s t e m R ( c a ll e d U F I , t h e U s e r -F r i e n d l y I n t e r f a c e ) i s s u p p o r t e d b ya d i a l o g m a n a g e r p r o g r a m , w r i t t e ni n P L / I , w h i c h r u n s o n t o p o f S y s te mR l i k e a n y o t h e r a p p l i c a t i o n p r o -g r a m . T h e r e f o r e , th e U F I s u p p o r tp r o g r a m i s a c l e a n l y s e p a r a te d c o m -p o n e n t a n d c a n b e m o d i f i e d in d e -p e n d e n t l y o f t h e r e s t o f th e s y s te m .I n f a c t , s e v e r a l u s e r s i m p r o v e d o no u r U F I b y w r i t in g i n t e r a c t i v e d ia l o gm a n a g e r s o f t h e ir o w n .

    The Compilation ApproachP e r h a p s t h e m o s t i m p o r t a n t d e -

    c i si o n i n th e d e s i g n o f t h e R D S w a si n s p i re d b y R . L o r i e ' s o b s e r v a t io n , i ne a r l y 1 9 76 , t h a t i t i s p o s s i b l e t o c o m -p i l e v e r y h i g h - l e v e l S Q L s t a t e m e n t si n t o c o m p a c t , e f f i c i e n t r o u t i n e s i nS y s t e m / 3 7 0 m a c h i n e l a n g u a g e [ 4 2 ] .L o r i e w a s a b l e t o d e m o n s t r a t e t h a t636

    S Q L s t a te m e n t s o f a r b i t r a r y c o m -p l e x i t y c o u l d b e d e c o m p o s e d i n t o ar e l a t i v e l y s m a l l c o l l e c t i o n o f m a -c h i n e - l a n g u a g e f r a g m e n t s , a n dt h a t a n o p t i m i z i n g c o m p i l e r c o u l da s s e m b l e t h e s e c o d e f r a g m e n t s f r o ma l i b r a r y t o f o r m a s p e c i a l l y t a i l o r e dr o u t i n e f o r p r o c e s s in g a g i v e n S Q Ls t a t e m e n t . T h i s te c h n i q u e h a d a v e r yd r a m a t i c e f f e c t o n o u r a b i l it y t o s u p -p o r t a p p l i c a t i o n p r o g r a m s f o r t r a n s -a c t i o n p r o c e s s i n g . I n S y s t e m R , aP L / I o r C o b o l p i ' o g r a m i s r u nt h r o u g h a p r e p r o c e s s o r in w h i c h i tsS Q L s t a t e m e n t s a r e e x a m i n e d , o p t i -m i z e d , a n d c o m p i l e d i n t o s m a l l , e f -f i c i e n t m a c h i n e - l a n g u a g e r o u t i n e sw h i c h a r e p a c k a g e d i n to a n a c c e s sm o d u l e f o r t h e a p p l i c a t i o n p r o -g r a m . T h e n , w h e n t h e p r o g r a m g o e si n t o e x e c u t i o n , t h e a c c e s s m o d u l e isi n v o k e d t o p e r f o r m a l l i n t e r a c t i o n sw i t h t h e d a t a b a s e b y m e a n s o f c a ll st o t h e R S S . T h e p r o c e s s o f c r e a t in ga n d i n v o k i n g a n a c c e s s m o d u l e i si l l u s t r a t e d i n F i g u r e s 3 a n d 4 . A l l th eo v e r h e a d o f p a r si n g , v a l i d i ty c h e c k -i n g , a n d a c c e s s p a t h s e l e c t i o n i s r e -m o v e d f r o m t h e p a t h o f th e e x e c u t-i n g p r o g r a m a n d p l a c e d i n a s e p a r a tep r e p r o c e s s o r s t e p w h i c h n e e d n o t b er e p e a t e d . P e r h a p s e v e n m o r e i m p o r -t a n t i s t h e f a c t t h a t t h e r u n n i n g p r o -g r a m i n t e r a c t s o n l y w i t h i t s s m a l l ,s p e c i a l - p u r p o s e a c c es s m o d u l e r a t h e rt h a n w i t h a m u c h l a r g e r a n d l e s se f f ic i e n t g e n e r a l - p u r p o s e S Q L i n t e r -p r e t e r . T h u s , t h e p o w e r a n d e a s e o fu s e o f t h e h i g h - l ev e l S Q L l a n g u a g ea r e c o m b i n e d w i t h t h e e x e c u t i o n -t i m e e f f i c i e n c y o f t h e m u c h l o w e rl e v e l R S S i n t e r f a c e .

    S i n c e a l l a c c e s s p a t h s e l e c t i o n d e -c i s i o n s a r e m a d e d u r i n g t h e p r e p r o -c e s s o r s t e p i n S y s t e m R , t h e r e i s t h ep o s s i b i l i t y t h a t s u b s e q u e n t c h a n g e si n t h e d a t a b a s e m a y i n v a l i d a t e t h ed e c i s i o n s w h i c h a r e e m b o d i e d i n a na c c e s s m o d u l e . F o r e x a m p l e , a n i n -d e x s e l e c t e d b y t h e o p t i m i z e r m a yl a t e r b e d r o p p e d f r o m t h e d a t a b a s e .T h e r e f o r e , S y s t e m R r e c o r d s w i the a c h a c c e s s m o d u l e a l is t o f i ts d e -p e n d e n c i e s o n d a t a b a s e o b j e c t ss u c h a s t a b l e s a n d i n d e x e s . T h e d e -p e n d e n c y l is t is s to r e d i n t h e f o r m o fa r e g u l a r r e l a t i o n i n t h e s y s t e m c a t -a l og . W h e n t h e s t r u c t u r e o f th e d a t a -Communicationsofthe ACM

    b a s e c h a n g e s ( e . g . , a n i n d e x i sd r o p p e d ) , a l l a f f e c t e d a c c e ss m o d u l e sa r e m a r k e d i n v a l id . T h e n e x t t im ea n i n v a l i d a c c es s m o d u l e i s i n v o k e d ,i t i s r e g e n e r a t e d f r o m i t s o r i g i n a lS Q L s t a t e m e n t s , w i t h n e w l y o p t i -m i z e d a c c e s s p a t h s . T h i s p r o c e s s i sc o m p l e t e l y t r a n s p a r e n t t o t h e S y s t e mR use r .

    S Q L s t a t e m e n t s s u b m i t t e d t o t h ei n t e r a c t i v e U F I d i a l o g m a n a g e r a r ep r o c e s s e d b y t h e s a m e o p t i m i z i n gc o m p i l e r a s p r e p r o c e s s e d S Q L s t at e -m e n t s . T h e U F I p r o g r a m p a ss e s t h ea d h o c S Q L s t a t e m e n t t o S y s t e m Rwi t h a spec i a l E X ECU T E ca l l. I n r e -sponse to the EXECUTEc a l l, S y s t e m Rp a r s e s a n d o p t i m i z e s th e S Q L s t at e -m e n t a n d t r a n s la t e s i t i n t o a m a -c h i n e - l a n g u a g e r o u t i n e . T h e r o u t i n ei s i n d i s t i n g u i s h a b l e f r o m a n a c c e s sm o d u l e a n d is e x e c u t e d im m e d i a t e l y .T h i s p r o c e s s i s d e s c r i b e d i n m o r ede t a i l i n [ 20 ] .

    R S S A c c e s s Pa t h sR a t h e r t h a n s t o r i n g d a t a v a l u e s

    i n s e p a r at e d o m a i n s i n t h e m a n n e ro f X R M , t h e R S S c h o s e t o s t o re d a t av a l u e s i n t h e i n d i v i d u a l r c o r d s o f t h ed a t a b a s e . T h i s r e s u l t e d i n r e c o r d s b e -c o m i n g v a r i a b l e i n l e n g t h a n dl o n g e r , o n t h e a v e r a g e , t h a n t h ee q u i v a l e n t X R M r e c o r d s. A ls o , c o m -m o n l y u s e d v a l u e s a r e r e p r e s e n t e dm a n y t im e s r a t h e r t h a n o n l y o n c e a si n X R M . I t w a s f e l t , h o w e v e r , t h a tt h e s e d i s a d v a n t a g e s w e r e m o r e t h a no f f s e t b y t h e f o l l o w i n g a d v a n t a g e :A l l t h e d a t a v a l u e s o f a r e c o r d c o u l db e f e t c h e d b y a s i n g l e I / O .

    I n p l a ce o f X R M i n v e r si o n s ,t h e R S S p r o v i d e s i n d e x e s , w h i c ha r e a s s o c i a t i v e a c c e s s a i d s i m p l e -m e n t e d i n t h e f o r m o f B - T r e e s [ 2 6].E a c h t a b l e i n t h e d a t a b a s e m a y h a v ea n y w h e r e f r o m z e r o i n d e x e s u p t o a ni n d e x o n e a c h c o l u m n ( it is a ls o p o s -s i bl e t o c r ea t e a n i n d e x o n a c o m b i -n a t i o n o f c o l u m n s ) . I n d e x e s m a k e i tp o s s i b le t o s c a n t h e t a b l e i n o r d e r b yt h e i n d e x e d v a l u e s , o r t o d i r e c t l y a c -c e s s t h e r e c o r d s w h i c h m a t c h a p a r -t i c u l a r v a l u e . I n d e x e s a r e m a i n t a i n e da u t o m a t i c a l l y b y t h e R S S i n t h ee v e n t o f u p d a t e s t o t h e d a t a b a s e .

    T h e R S S a l s o i m p l e m e n t sl i n k s , w h i c h a r e p o i n t e r s s t o r e d

    October 1981Volume 24Number l0

  • 8/12/2019 System r

    6/15

    P L / I S o u r c e P r o g r a m

    fSELECT NAME INTO $)

  • 8/12/2019 System r

    7/15

    C O M P U T I N GP R A C T I C E S

    K . E s w a r a n [ 7 ] . U s i n g A P L m o d e l s ,B l a s g e n a n d E s w a r a n s t u d i e d t e nm e t h o d s o f j o i n i n g t o g e t h e r t a b le s ,b a s e d o n t h e u s e o f i n d e x e s , s o r t in g ,p h y s i c a l p o i n t e r s , a n d T I D l is ts . T h en u m b e r o f d i s k a cc e s se s r e q u i r e d t op e r f o r m a j o i n w a s p r e d i c t e d o n t h eb a s is o f v a ri o u s a s s u m p t i o n s f o r t h et e n j o i n m e t h o d s. T w o j o i n m e t h o d sw e r e i d e n t i f i e d s u c h t h a t o n e o r t h eo t h e r w a s o p t i m a l o r n e a r l y o p t i m a lu n d e r m o s t c i r c u m s t a n c e s . T h e t w om e t h o d s a r e a s f o l l o w s :

    J o i n M e t h o d 1: S c a n o v e r t h eq u a l i f y i n g r o w s o f ta b l e A . F o r e a c hr o w , f e t c h t h e m a t c h i n g r o w s o f t a b l eB ( u s u a l l y , b u t n o t a l w a y s , a n i n d e xo n t a b l e B i s u s e d ) .J o i n M e t h o d 2 : ( O f t e n u s e dw h e n n o s u i t a b l e i n d e x e x i s t s . ) S o r tt h e q u a l i f y i n g r o w s o f ta b l e s A a n dB i n o r d e r b y t h e i r r e s p e c t i v e j o i nf i el d s . T h e n s c a n o v e r t h e s o r t e d l i s tsa n d m e r g e t h e m b y m a t c h i n g v a l u e s.

    W h e n s e l ec t in g a n a c c e s s p a t h f o ra j o i n o f s e v e r a l ta b l e s , t h e S y s t e m Ro p t i m i z e r c o n s i d e r s t h e p r o b l e m t ob e a s e q u e n c e o f b i n a r y jo i n s . I t t h e np e r f o r m s a t r e e s e a r c h i n w h i c h e a c hl e v e l o f t h e t r e e c o n s is t s o f o n e o f t h eb i n a r y jo i n s . T h e c h o i c e s t o b e m a d ea t e a c h l e v e l o f t h e t r e e i n c lu d e w h i c hj o i n m e t h o d t o u s e a n d w h i c h i n d e x ,i f a n y , t o s e l e c t f o r s c a n n i n g . C o m -p a r i s o n s a r e a p p l i e d a t e a c h l e v e l o ft h e t r e e t o p r u n e a w a y p a t h s w h i c ha c h i e v e t h e s a m e r e s u l t s a s o t h e r , l es sc o s t ly p a th s . W h e n a l l p a t h s h a v eb e e n e x a m i n e d , t h e o p t i m i z e r s e le c tst h e o n e o f m i n i m u m p r e d i c t e d c o st .T h e S y s t e m R o p t i m i z e r a lg o r i t h m sa r e d e s c r i b e d m o r e f u l l y in [ 4 7 ].

    Views and uthorizationT h e m a j o r o b j e c t i v e s o f t h e v i e w

    a n d a u t h o r i z a t i o n s u b s y s t e m s o f S y s -t e m R w e r e p o w e r a n d f l e x i b i l i t y .W e w a n t e d t o a ll o w a n y S Q L q u e r yt o b e u s e d a s t h e d e f i n i t i o n o f a v i e w .T h i s w a s a c c o m p l i s h e d b y s t o r i n ge a c h v i e w d e f i n i t i o n i n t h e f o r m o f

    a n S Q L p a r s e t r e e . W h e n a n S Q Lo p e r a t i o n i s t o b e e x e c u t e d a g a i n s t av i e w , t h e p a r s e t r e e w h i c h d e f i n e st h e o p e r a t i o n i s m e r g e d w i t h t h ep a r s e t r e e w h i c h d e f i n e s t h e v i e w ,p r o d u c i n g a c o m p o s i t e p a r s e t r e ew h i c h i s t h e n s e n t t o t h e o p t i m i z e rf o r a c c e s s p a t h s e l e c t i o n . T h i s a p -p r o a c h i s s i m i la r t o t h e q u e r y m o d -i f ic a t i o n t e c h n i q u e p r o p o s e d b yS t o n e b r a k e r [4 8]. T h e a l g o r i th m s d e -v e l o p e d f o r m e r g i n g p a r s e t r e es w e r es u f f i c i e n t l y g e n e r a l s o t h a t n e a r l ya n y S Q L s t a t e m e n t c o u l d b e e x e -c u t e d a g a i n s t a n y v i e w d e f i n i t i o n ,w i t h t h e r e s t r i c t i o n t h a t a v i e w c a nb e u p d a t e d o n l y i f i t i s d e r i v e d f r o ma s i n g l e t a b l e i n t h e d a t a b a s e . T h er e a s o n f o r t h i s r e s t r i c ti o n i s t h a t s o m eu p d a t e s t o v i e w s w h i c h a r e d e r i v e df r o m m o r e t h a n o n e t a b l e a r e n o tm e a n i n g f u l ( a n e x a m p l e o f s u ch a nu p d a t e i s g i v e n i n [ 2 4 ]) .

    T h e a u t h o r i z a t i o n s u b s y s t e m o fS y s t e m R i s b a s e d o n p r i v i l e g e sw h i c h a r e c o n t r o l l e d b y th e S Q Ls t a t e m e n t s G R A N T a n d R EV O KE . E a c hu s e r o f S y s t e m R m a y o p t i o n a l l y b eg i ven a p r i v i l ege ca l l ed RE SOU RCEw h i c h e n a b l e s h i m / h e r t o c r e a te n e wt a b l e s i n t h e d a t a b a s e . W h e n a u s e rc r e a t e s a t a b l e , h e / s h e r e c e i v e s a l lp r i v i l e g e s t o a c c e ss , u p d a t e , a n d d e -s t r o y t h a t t a b l e . T h e c r e a t o r o f at a b l e c a n t h e n g r a n t t h e s e p r i v i l e g e st o o t h e r i n d i v i d u a l u s e rs , a n d s u b s e -q u e n t l y c a n r e v o k e t h e s e g r a n t s i fd e s i re d . E a c h g r a n t e d p r i v i l e g e m a yo p t i o n a l l y c a r r y w i t h i t t h e G R A N To p t i o n , w h i c h e n a b l e s a r e c i p i e n t t og r a n t t h e p r i v i l e g e t o y e t o t h e r u s e r s .A R EV O K E d e s t r o y s t h e w h o l e c h a i no f g r a n t e d p r i v i l e g e s d e r i v e d f r o mt h e o r i g i n a l g r a n t . T h e a u t h o r i z a t i o ns u b s y s t e m i s d e s c r i b e d i n d e t a i l i n[ 37] an d d i sc us sed f u r t he r i n [ 3 1] .

    The Recovery SubsystemT h e k e y o b j e c t i v e o f th e r e c o v e r y

    s u b s y s t e m i s p r o v i s io n o f a m e a n sw h e r e b y t h e d a t a b a s e m a y b e r e -c o v e r e d t o a c o n s i s t e n t s t a t e i n th ee v e n t o f a f a i lu r e . A c o n s i s t e n t s t a t ei s d e f i n e d a s o n e i n w h i c h t h e d a t a -b a s e d o e s n o t r e f l e c t a n y u p d a t e sm a d e b y tr a n s a c t i o n s w h i c h d i d n o tc o m p l e t e s u c c e s s f u l l y . T h e r e a r et h r e e b a s i c t y p e s o f fa i l u r e : t h e d i s k

    m e d i a m a y f a il , th e s y s t e m m a y f a il ,o r a n i n d i v i d u a l t r a n s a c t i o n m a y f ai l.A l t h o u g h b o t h t h e s c o p e o f th e f a i l-u r e a n d t h e t i m e t o e f f e c t r e c o v e r ym a y b e d i f f e r e n t , a l l t h r e e t y p e s o fr e c o v e r y r e q u i r e t h a t a n a l t e r n a t ec o p y o f d a t a b e a v a i l a b le w h e n t h ep r i m a r y c o p y i s n o t .

    W h e n a m e d i a f a i l u r e o c c u r s ,d a t a b a s e i n f o r m a t i o n o n d i s k i s l o st .W h e n t h i s h a p p e n s , a n i m a g e d u m po f t h e d a ta b a s e p l u s a lo g o f b e f o r ea n d a f t e r c h a n g e s p r o v i d e t h e a l -t e r n a te c o p y w h i c h m a k e s r e c o v e r yp o s s ib l e . S y s t e m R ' s u s e o f d u a ll o g s e v e n p e r m i t s r e c o v e r y f r o mm e d i a f a i l u r e s o n t h e l o g i t s e l f . T or e c o v e r f r o m a m e d i a f a i l u re , t h ed a t a b a s e i s r e s t o r e d u s i n g t h e l a t e s ti m a g e d u m p a n d t h e r e c o v e ry p r o -c e s s r e a p p l i e s a l l d a t a b a s e c h a n g e sa s s p e c i fi e d o n t h e l o g f o r c o m p l e t e dt r a n s a c t i o n s .

    W h e n a s y s t e m f a i lu r e o c c u r s, t h ei n f o r m a t i o n i n m a i n m e m o r y i s l o s t .T h u s , e n o u g h i n f o r m a t i o n m u s t a l -w a y s b e o n d i s k t o m a k e r e c o v e r yp o s s ib l e . F o r r e c o v e r y f r o m s y s t e mf a i l u r e s , S y s t e m R u s e s t h e c h a n g el og m e n t i o n e d a b o v e p l u s s o m e t h in gc a l le d s h a d o w p a g e s . A s e a c h p a g ei n t h e d a t a b a s e i s u p d a t e d , t h e p a g ei s w r i t t e n o u t i n a n e w p l a c e o n d i s k ,a n d t h e o r i g i n a l p a g e i s r e t a i n e d . Ad i r e c to r y o f t h e o l d a n d n e wl o c a t io n s o f e a c h p a g e i s m a i n t a i n e d .P e r i o d i c a l l y d u r i n g n o r m a l o p e r a -t i o n , a c h e c k p o i n t o c c u r s i n w h i c ha l l u p d a t e s a r e f o r c e d o u t t o d is k , t h e

    o l d p a g e s a r e d i s c a r d e d , a n d t h en e w p a g e s b e c o m e o l d . I n t h e

    e v e n t o f a s y s t e m c r a sh , t h e n e wp a g e s o n d i s k m a y b e i n a n i n c o n -s i s t e n t s t a t e b e c a u s e s o m e u p d a t e dp a g e s m a y s t i l l b e i n t h e s y s t e mb u f f e r s a n d n o t y e t r e f l e c t e d o n d i sk .T o b r i n g t h e d a t a b a s e b a c k t o a c o n -s i s t e n t s ta t e , t h e s y s t e m r e v e r t s t o t h e

    o l d p a g e s , a n d t h e n u s e s t h e lo g t or e d o a l l c o m m i t t e d t r a n s a c t i o n s a n dt o u n d o a l l u p d a te s m a d e b y i n c o m -p l e t e t r a n s a c t i o n s . T h i s a s p e c t o f th eS y s t e m R r e c o v e r y s u b s y s t e m i s d e -s c r i b e d i n m o r e d e t a i l i n [ 3 6 ] .

    W h e n a tr a n s a c t i o n fa i l u r e o c -c u r s , a l l d a t a b a s e c h a n g e s w h i c hh a v e b e e n m a d e b y t h e f a i li n g tr a n s -a c t i o n m u s t b e u n d o n e . T o a c c o m -

    638 Communicationsofthe ACMOctober 1981Volume 24Number 10

  • 8/12/2019 System r

    8/15

    p l i s h t h i s, S y s t e m R s i m p l y p r o c e s s est h e c h a n g e l o g b a c k w a r d s r e m o v i n ga l l c h a n g e s m a d e b y t h e t r a n s a c t i o n .U n l i k e m e d i a a n d s y s t e m r e c o v e r yw h i c h b o t h r e q u i r e t h a t S y s t e m R b er e i n i t i a l i z e d , t r a n s a c t i o n r e c o v e r yt a k e s p l a c e o n - l i n e .

    The Locking SubsystemA g r e a t d e a l o f t h o u g h t w a s g i v e n

    t o t h e d e s i g n o f a l o c k i n g s u b s y s t e mw h i c h w o u l d p r e v e n t i n t e r f e r e n c ea m o n g c o n c u r r e n t u s e r s o f S y s t e mR . T h e o r i g i n a l d e s i g n i n v o l v e d t h ec o n c e p t o f p r e d i c a t e l o c k s , i nw h i c h t h e l o c k a b l e u n i t w a s a d a t a -b a s e p r o p e r t y s u c h a s e m p l o y e e sw h o s e lo c a t i o n i s E v a n s t o n . N o t et h a t , i n t h i s s ch e m e , a l o c k m i g h t b ehe ld on t he pre dic ate LOC = 'EVANS-T O N ', e v e n i f n o e m p l o y e e s c u r r e n t l ys a t i sf y t h a t p r e d i c a t e . B y c o m p a r i n gt h e p r e d i c a t e s b e i n g p r o c e s s e d b yd i f f e r e n t u s e r s , t h e l o c k i n g s u b s y s -t e m c o u l d p r e v e n t i n t e r f e r e n c e . T h e

    p r e d i c a t e l o c k d e s i g n w a s u l t i -m a t e l y a b a n d o n e d b e c a u s e : ( 1 ) d e -t e r m i n i n g w h e t h e r t w o p r e d i c a t e s a r em u t u a l l y s a t i s f i a b l e i s d i f f i c u l t a n dt i m e - c o n s u m i n g ; ( 2 ) t w o p r e d i c a t e sm a y a p p e a r t o c o n f l i c t w h e n , i n f a c t,t h e s e m a n t ic s o f t h e d a t a p r e v e n t a n yconf l i c t , a s in PRODUCT = AIR-C R A F T a n d MANUFACTURER ---~ACME STATIONERY CO. ; and (3) w ed e s i r e d t o c o n t a i n t h e l o c k i n g s u b -s y s t e m e n t i r e l y w i t h i n t h e R S S , a n dt h e r e f o r e t o m a k e i t i n d e p e n d e n t o fa n y u n d e r s t a n d i n g o f t h e p r e d i c at e sb e i n g p r o c e s s e d b y v a r i o u s u s e r s .T h e o r i g i n a l p r e d i c a t e l o c k i n gschem e i s desc r ibed in [29 ] .

    T h e l o c k i n g s c h e m e e v e n t u a l l yc h o s e n f o r S y s t e m R i s d e s c r i b e d i n[34 ] . Th i s s chem e invo lves a h ie ra r -c h y o f l o c k s , w i t h s e v e r a l d i f f e r e n ts iz e s o f l o c k a b le u n i t s , r a n g i n g f r o mindiv idua l records to s eve ra l t ab le s .T h e l o c k i n g s u b s y s t e m is t r a n s p a r e n tt o e n d u s e r s , b u t a c q u i r e s l o c k s o np h y s i c a l o b j e c t s i n t h e d a t a b a s e a st h e y a r e p r o c e s s e d b y e a c h u s e r .W h e n a u s e r a c c u m u l a t e s m a n ys m a l l l o c k s, t h e y m a y b e t r a d e dfor a l a rge r lockab le un i t (e . g . , lockso n m a n y r e c o r d s i n a t a b l e m i g h t b et r a d e d f o r a l o c k o n t h e ta b l e ). W h e nlocks a re acqu i red on sm a l l ob jec t s ,

    i n t e n t i o n l o c k s a r e s i m u l t a n e o u s l ya c q u i r e d o n t h e l a r g e r o b j e c t s w h i c hc o n t a i n t h e m . F o r e x a m p l e , u s e r Aa n d u s e r B m a y b o t h b e u p d a t i n ge m p l o y e e r e c o r d s . E a c h u s e r h o l d sa n i n t e n t i o n l o c k o n t h e e m p l o y e et a b l e , a n d e x c l u s i v e l o c k s o n t h ep a r t i c u l a r r e c o r d s b e i n g u p d a t e d . I fu s e r A a t t e m p t s t o tr a d e h e r i n d i v i d -u a l r e c o r d l o c k s f o r a n e x c l u s i v elock a t the t ab le l eve l , she m us t wa i tu n t i l u s e r B e n d s h i s t r a n s a c t i o n a n dr e l e as e s h i s i n t e n t i o n l o c k o n t h etab le .4 . P h a s e T w o : E v a l u a t i o n

    T h e e v a l u a t i o n p h a s e o f t h e S y s -t e m R p r o j e c t l a s t e d a p p r o x i m a t e l y2 '/ 2 yea rs a nd cons i s ted o f two pa r t s :( l ) e x p e r i m e n t s p e r f o r m e d o n t h es y s t e m a t t h e S a n J o s e R e s e a r c h L a b -o r a t o r y , a n d ( 2) a c t u a l u s e o f t h es y s te m a t a n u m b e r o f i n t e r n a l I B Ms i t e s a n d a t t h r e e s e l e c t e d c u s t o m e rs i te s . At a l l use r s i t e s, Sys te m R wasi n s t a l l e d o n a n e x p e r i m e n t a l b a s i sf o r s t u d y p u r p o s e s o n l y , a n d n o t a sa s u p p o r t e d c o m m e r c i a l p r o d u c t .T h e f i r s t i n s t a l l a t i o n s o f S y s t e m Rtook p lace in June 1977 .

    General User CommentsI n g e n e r a l , u s e r r e s p o n s e t o S y s -

    t e m R h a s b e e n e n t h u s i a s t i c . T h es y s t e m w a s m o s t l y u s e d i n a p p l i c a -t i o n s f o r w h i c h e a s e o f i n s t a l l a t i o n ,a h i g h - l e v e l u s e r l a n g u a g e , a n d a na b i l i t y t o r a p i d l y r e c o n f i g u r e t h ed a t a b a s e w e r e i m p o r t a n t r e q u i r e -m e n t s . S e v e r a l u s e r s i t e s r e p o r t e dt h a t t h e y w e r e a b l e t o i n s t a l l t h es y s t e m , d e s i g n a n d l o a d a d a t a b a s e ,a n d p u t i n t o u s e s o m e a p p l i c a t i o np r o g r a m s w i t h i n a m a t t e r o f d ay s .U s e r s i t e s a ls o r e p o r t e d t h a t i t w a sp o s s i b le t o t u n e t h e s y s t e m p e r f o r m -a n c e a f t e r d a t a w a s l o a d e d b y c r e a t -i n g a n d d r o p p i n g i n d e x e s w i t h o u ti m p a c t i n g e n d u s e r s o r a p p l i c a t i o np r o g r a m s . E v e n c h a n g e s in t h e d a t a -b a s e t a b l e s c o u l d b e m a d e t r a n s p a r -e n t t o u s e r s i f t h e t a b l e s w e r e r e a d -o n l y , a n d a l so i n s o m e c a s e s f o r u p -d a t e d t a b l e s .U s e r s f o u n d t h e p e r f o r m a n c ec h a r a c t e r i s t i c s a n d r e s o u r c e c o n -s u m p t i o n o f S y s t e m R t o b e g e n e r -a l l y s a t i sf a c t o r y f o r t h e i r e x p e r i m e n -

    t a l a p p l i c a t i o n s , a l t h o u g h n o s p e c i -f i c p e r f o r m a n c e c o m p a r i s o n s w e r ed r a w n . I n g e n e r a l , t h e e x p e r i m e n t a ld a t a b a s e s u s e d w i t h S y s t e m R w e r es m a l l e r t h a n o n e 3 3 3 0 d i s k p a c k ( 2 0 0M e g a b y t e s ) a n d w e r e t y p i c a l l y a c -c e ss e d b y f e w e r t h a n t e n c o n c u r r e n tu s e r s . A s m i g h t b e e x p e c t e d , i n t e r -a c t iv e r e s p o n se s l o w e d d o w n d u r i n gt h e e x e c u t i o n o f v e r y c o m p l e x S Q Ls t a t e m e n t s i n v o l v i n g j o i n s o f s e v e r a lt a b l e s . T h i s p e r f o r m a n c e d e g r a d a -t i o n m u s t b e t r a d e d o f f a g ai n s tt h e a d v a n t a g e s o f n o r m a l i z a t i o n[23 , 30 ], in whic h l a rge da ta baset a b l e s a r e b r o k e n i n t o s m a l l e r p a r t st o a v o i d r e d u n d a n c y , a n d t h e nj o i n e d b a c k t o g e t h e r b y t h e v i e wm e c h a n i s m o r u s e r a p p l i c a t i o n s .

    The SQL LanguageT h e S Q L u s e r i n te r f a ce o f S y s t e m

    R was gene ra l ly fe l t to be succes s fu li n a c h i e v i n g i t s g o a l s o f s i m p l i c i t y ,p o w e r , a n d d a t a i n d e p e n d e n c e . T h el a n g u a g e w a s s i m p l e e n o u g h i n i t sb a s i c s t r u c t u r e s o t h a t u s e r s w i t h o u tp r i o r e x p e r i e n c e w e r e a b l e t o l e a r n ausab le subse t on the i r f i r s t s i t t ing . Att h e s a m e t i m e , w h e n t a k e n a s aw h o l e , t h e l a n g u a g e p r o v i d e d t h eq u e r y p o w e r o f t h e f i r st - o r d e r p r e d -i c a t e c a l c u l u s c o m b i n e d w i t h o p e r a -t o r s f o r g r o u p i n g , a r i t h m e t i c , a n dbui l t - in func t ions suc h a s SUM andAVERAGE.U s e r s c o n s i s t e n t l y p r a i s e d t h eu n i f o r m i t y o f t h e S Q L s y n t a x a c ro s st h e e n v i r o n m e n t s o f a p p l i c a ti o n p r o -g r a m s , a d h o c q u e r y , a n d d a t a d e f i -n i t ion ( i . e . , de f in i t ion o f v iews ) .U s e r s w h o w e r e f o r m e r l y r e q u i r e d t ol e a r n i n c o n s i s t e n t l a n g u a g e s f o r t h e s ep u r p o s e s f o u n d i t e a s i e r t o d e a l w i t ht h e s i n g l e s y n t a x ( e .g ., w h e n d e b u g -g i n g a n a p p l i c a t i o n p r o g r a m b yq u e r y i n g t h e d a t a b a s e t o o b s e r v e i t se f fec t s ) . The s ing le syn tax a l so en-h a n c e d c o m m u n i c a t i o n a m o n g d i f -f e r e n t f u n c t i o n a l o r g a n i z a t i o n s ( e.g .,b e t w e e n d a t a b a s e a d m i n i s tr a t o r s a n da p p l i c a t i o n p r o g r a m m e r s ) .W h i l e d e v e l o p i n g a p p l i c a t i o n su s i n g S Q L , o u r e x p e r i m e n t a l u s e r sm a d e a n u m b e r o f s u g g e st i on s f o re x t e n si o n s a n d i m p r o v e m e n t s t o t h el a n g u a g e , m o s t o f w h i c h w e r e i m p l e -m e n t e d d u r i n g t h e c o u r s e o f t h e p r o j -

    639 Communicationsofthe ACMOctober 1981Volume 24Number 10

  • 8/12/2019 System r

    9/15

    C O M P U T I N GP R A C T I C E Se c t. S o m e o f t h e s e s u g g e s t i o n s a r es u m m a r i z e d b e lo w :

    ( 1) U s e r s r e q u e s t e d a n e a s y - t o -u s e s y n t a x w h e n t e s t in g f o r t h e e x i s t -e n c e o r n o n e x i s t e n c e o f a d a t a i t e m ,s u c h a s a n e m p l o y e e r e c o r d w h o s ed e p a r t m e n t n u m b e r m a t c h e s a g i v e nd e p a r t m e n t r e c o r d . T h i s f a c i l i t y w a si m p l e m e n t e d i n t h e f o r m o f a sp e c i alEXISTS predicate .

    ( 2) U s e r s r e q u e s t e d a m e a n s o fs e a c h i n g f o r c h a r a c t e r s t r i n g s w h o s ec o n t e n t s a r e o n l y p a r t i a l l y k n o w n ,s u c h a s a l l l i ce n s e p l a t e s b e g i n n i n gw i t h N V K . T h i s f a c il i ty w a s im p l e -m e n t e d i n t h e f o r m o f a s p e c i alL I K E p r e d i c a t e w h i c h s e a r c h e s f o rp a t t e r n s t h a t a r e a l l o w e d t o c o n -t a i n d o n ' t c a r e c h a r a c t e r s .

    ( 3) A r e q u i r e m e n t a r o s e f o r a na p p l i c a t i o n p r o g r a m t o c o m p u t e a nS Q L s t a t e m e n t d y n a m i c a l l y , s u b m i tt h e s t a t e m e n t to t h e S y s t e m R o p t i m -ize r fo r acces s pa th s e lec t ion , andt h e n e x e c u t e t h e s t a t e m e n t r e p e a t -e d l y f o r d i f f e r e n t d a t a v a l u e s w i t h o u tr e i n v o k i n g t h e o p t i m i z e r . T h i s f a c il -i t y w a s i m p l e m e n t e d i n t h e f o r m o fPREPARE a n d EXECUTE s t a t e m e n t sw h i c h w e r e m a d e a v a i l a b l e i n t h eh o s t - l a n g u a g e v e r s i o n o f S Q L .( 4) I n s o m e u s e r a p p l i c a t i o n st h e n e e d a r o s e f o r a n o p e r a t o r w h i c hC o d d h a s c a l l e d a n o u t e r j o i n [ 25 ].Suppose tha t two tab le s (e . g . , suP-PLIERS an d PROJECTS) are r e l a t e d b ya c o m m o n d a t a f i e l d ( e . g . , PARTNO).I n a c o n v e n t i o n a l j o i n o f t h e s e t ab l e s ,s u p p l i e r r e c o r d s w h i c h h a v e n om a t c h i n g p r o j e c t r e c o r d ( a n d v i c ev e r s a ) w o u l d n o t a p p e a r . I n a n

    o u t e r j o i n o f t h e s e t a b l es , s u p p l i e rr e c o r d s w i t h n o m a t c h i n g p r o j e c t r e c -o r d w o u l d a p p e a r t o g e t h e r w i t h as y n t h e t i c p r o j e c t r e c o r d c o n t a i n i n go n l y n u l l v a l u e s ( a n d s i m i l a r l y f o rp r o j e c ts w i t h n o m a t c h i n g s u p p l ie r ) .A n o u t e r - j o i n f a c i l i ty f o r S Q L i sc u r r e n t l y u n d e r s t u d y.

    A m o r e c o m p l e t e d i s c u s s i o n o fu s e r e x p e r i e n c e w i t h S Q L a n d t h er e s u l t i n g l a n g u a g e i m p r o v e m e n t s i sp resen ted in [19 ] .

    The Comp ilation ApproachT h e a p p r o a c h o f c o m p i l i n g S Q Ls t a t e m e n t s i n t o m a c h i n e c o d e w a s

    o n e o f t h e m o s t s u c c e s s f u l p a r t s o ft h e S y s t e m R p r o j e c t. W e w e r e a b l et o g e n e r a t e a m a c h i n e - l a n g u a g e r o u -t i n e to e x e c u t e a n y S Q L s t a t e m e n t o fa r b i t r a r y c o m p l e x i t y b y s e l e c t i n gc o d e f r a g m e n t s f r o m a l i b r a r y o f a p -p r o x i m a t e l y 1 0 0 f r a g m e n t s . T h e r e -s u l t w a s a b e n e f i c i a l e f f e ct o n t r a n s -a c t io n p r o g r a m s , a d h o c q u e r y , a n ds y s t e m s i m p l i c i ty .I n a n e n v i r o n m e n t o f s h o r t, r e -p e t i t i v e t r a n s a c t i o n s , t h e b e n e f i t s o f

    c o m p i l a t i o n a r e o b v i o u s . A l l t h eo v e r h e a d o f p a r s i n g , v a l i d i t y c h e c k -i n g , a n d a c c e s s p a t h s e l e c t i o n a r er e m o v e d f r o m t h e p a t h o f t h e r u n -n i n g t r a n s a c t i o n , a n d t h e a p p l i c a t i o np r o g r a m i n t e r a c t s w i t h a s m a l l , s p e -c i a l l y t a i l o r e d a c c e s s m o d u l e r a t h e rt h a n w i t h a l a r g e r a n d l e s s e f f i c i e n tg e n e r a l - p u r p o s e i n t e r p r e t e r p r o -g r a m . E x p e r i m e n t s [ 3 8 ] s h o w e d t h a tf o r a t y p i c a l s h o r t t r a n s a c t i o n , a b o u t8 0 p e r c e n t o f th e i n s t r u c t i o n s w e r ee x e c u t e d b y t h e R S S , w i t h t h e r e -m a i n i n g 2 0 p e r c e n t e x e c u t e d b y t h ea c c e s s m o d u l e a n d a p p l i c a t i o n p r o -

    Exa m p l e 1 :S E L E C T S U P P N O , P R I C EF R O M Q U O T E SW H E R E P A R T N O = ' 0 1 0 0 0 2 'A N D M I N Q < = 1 0 0 0 A N D M A X Q > = 1 0 0 0;

    O p e r a t i o nP a r s i n gA c c e s s P a t hS e l e c t i o nC o d eG e n e r a t i o nF e t c ha n s w e r s e t( p e r r e c o r d )

    C P U t i m e N u m b e r( m s e c o n 1 6 8 ) o f I / O s

    13 .3 04 0 . 0 9

    10.1 0

    1 .5 0 .7

    E x a m p l e 2 :S E L E C T O R D E R N O , O R D E R S . P A R T N O , D E S C R I P , D A T E , Q T YF R O M O R D E R S , P A R T SW H E R E O R D E R S . P A R T N O = PA R T S . P A R T N OA N D D A T E B E T W E E N ' 7 5 0 0 0 0 ' A N D ' 7 5 1 2 3 1 'A N D S U P P N O = ' 7 9 7 ' ;

    C P U t i m eO p e r a t i o n ( m s e c o n 1 6 8 )P a r s i n g 20 .7A c c e s s P a t h 7 3 . 2S e l e c t i o nC o d e 1 9 . 3G e n e r a t i o nF e t c h 8 . 7a n s w e r s e t( p e r r e c o r d )

    N u m b e ro f I / O s

    09

    0

    10 .7

    F ig . 5 . Me a s u re me n t s o f Co s t o f Co mp i la t io n .64O Communication s October 1981of Volume 24the ACM Numb er l0

  • 8/12/2019 System r

    10/15

  • 8/12/2019 System r

    11/15

    C O M P U T I N GP R A C T I C E S

    b u t t h a t h a s h i n g a n d l i n k s w o u l dh a v e e n h a n c e d t h e p e r f o r m a n c e o f

    c a n n e d t r a n s a c t i o n s w h i c h a c c e sso n l y a f e w r e c o r d s . A s a n i l l u s t r a ti o no f t hi s p r o b l e m , c o n s i d e r a n i n v e n -t o r y a p p l i c a t i o n w h i c h h a s t w ot ab l e s : a PRODUCT S ab l e , an d a mu chl a r g e r P A R T S t a b l e w h i c h c o n t a i n sd a t a o n t h e i n d i v i d u a l p a r ts u s e d f o re a c h p r o d u c t . S u p p o s e a g i v e n t ra n s -a c t i o n n e e d s t o f i n d t h e p r i c e o f t h eh e a t i n g e l e m e n t i n a p a r t i c u l a rt o a s t e r . T o e x e c u t e t h i s t r a n s a c t i o n ,S y s t e m R m i g h t r e q u i r e t w o I / O s t ot r a v e r s e a t w o - l e v e l i n d e x t o f i n d t h et o a s t e r r e c o r d , a n d t h r e e m o r e I / O st o t r a v e r s e a n o t h e r t h r e e - l e v e l i n d e xt o f i n d t h e h e a t i n g e l e m e n t r e c o r d . I fa c c e s s p a t h s b a s e d o n h a s h i n g a n dd i r e c t l i n k s w e r e a v a i l a b l e , i t m i g h tb e p o s s i b l e t o f i n d t h e t o a s t e r r e c o r di n o n e I / O v i a h a s h i n g , a n d t h e h e a t -i n g e le m e n t r e c o r d i n o n e m o r e I / Ov i a a l i n k . ( A d d i t i o n a l I / O s w o u l db e r e q u i r e d i n t h e e v e n t o f h a s h c o l -l i s io n s o r i f t h e t o a s t e r p a r t s r e c o r d so c c u p i e d m o r e t h a n o n e p a g e. ) T h u s ,f o r t h is v e r y s i m p l e t r a n s a c t i o n h a s h -i n g a n d l i n ks m i g h t r e d u c e t h e n u m -b e r o f I / O s f r o m f i v e to t h r e e , o re v e n t w o . F o r t r a n s a c t io n s w h i c h r e -t r i e v e a l a r g e s e t o f r e c o r d s , t h e a d -d i t i o n a l I / O s c a u s e d b y i n d e x e s c o m -p a r e d t o h a s h i n g a n d l i n k s a r e l e s si m p o r t a n t .

    The Op t imi zerA s e ri e s o f e x p e r i m e n t s w a s c o n -

    d u c t e d a t th e S a n J o s e IB M R e s e a r c hL a b o r a t o r y t o e v a l u a t e t h e su c c e ss o ft h e S y s t e m R o p t i m i z e r i n c h o o s i n ga m o n g t h e a v a i l a b l e a cc e s s p a t h s f o rt y p i c a l S Q L s t a t e m e n t s . T h e r e s u l t so f t h e se e x p e r i m e n t s a r e r e p o r t e d i n[ 6] . F o r t h e p u r p o s e o f t h e e x p e r i -m e n t s , t h e o p t i m i z e r w a s m o d i f i e d i no r d e r t o o b s e r v e i t s b e h a v i o r . O r -d i n a r i l y , t h e o p t i m i z e r s e a r c h e st h r o u g h a t r e e o f p a t h c h o i c es , c o m -p u t i n g e s t i m a t e d c o s t s a n d p r u n i n gt he t r ee un t i l i t a r r i ves a t a s i ng l ep r e f e r r e d a c c e ss p a t h . T h e o p t i m i z e r

    w a s m o d i f i e d i n s u c h a w a y t h a t i tc o u l d b e m a d e t o g e n e r a t e t h e c o m -p l e t e t r e e o f a c c e s s p a t h s , w i t h o u tp r u n i n g , a n d t o e s t i m a t e t h e c o s t o fe a c h p a t h ( c o s t i s d e f i n e d a s aw e i g h t e d s u m o f p a g e fe t c h e s a n dR S S c a l l s ) . M e c h a n i s m s w e r e a l s oa d d e d t o t h e s y s te m w h e r e b y i t c o u l db e f o r c e d t o e x e c u t e a n S Q L s t a t e -m e n t b y a p a r t i c u l a r a c ce s s p a t h a n dt o m e a s u r e t h e a c t u a l n u m b e r o fp a g e f e t c h e s a n d R S S c a ll s i n c u r r e d .I n t h i s w a y , a c o m p a r i s o n c a n b em a d e b e t w e e n t h e o p t i m i z e r ' s p r e -d i c t e d c o s t a n d t h e a c t u a l m e a s u r e dc o s t f o r v a r i o u s a l t e r n a t i v e p a t h s .

    I n [ 6 ], a n e x p e r i m e n t i s d e s c r i b e di n w h i c h t e n S Q L s t a t e m e n t s , i n c l u d -i n g s o m e s i n g l e - t a b l e q u e r i e s a n ds o m e j o i n s , a r e r u n a g a i n s t a t e s td a t a b a s e . T h e d a t a b a s e i s a r t i f ic i a l l yg e n e r a t e d t o c o n f o r m t o t h e t w ob a s ic a s s u m p t i o n s o f th e S y s t e m Ro p t i m i z e r : ( 1 ) t h e v a l u e s i n e a c h c o l -u m n a r e u n i f o r m l y d i st r ib u t e d f r o ms o m e m i n i m u m t o s o m e m a x i m u mv a l u e ; a n d ( 2 ) t h e d i s t r i b u t i o n o f v a l-u e s o f t h e v a r i o u s c o l u m n s a r e i n d e -p e n d e n t o f e a c h o th e r . F o r e a c h o ft h e t e n S Q L s t a te m e n t s , t h e o r d e r i n go f t h e p r e d i c t e d c o s ts o f t h e v a r i o u sa c c e s s p a t h s w a s t h e s a m e a s t h eo r d e r i n g o f t h e a c t u a l m e a s u r e d c o s ts( i n a f e w c a s e s t h e o p t i m i z e r p r e -d i c t e d t w o p a t h s t o h a v e t h e s a m ec o s t w h e n t h e i r a c t u a l c o st s w e r e u n -e q u a l b u t a d j a c e n t i n t h e o r d e r in g ) .

    A l t h o u g h t h e o p t i m i z e r w a s a b l et o c o r r e c t l y o r d e r t h e a c c e s s p a t h s i nt h e e x p e r i m e n t w e h a v e j u s t d e -s c r ib e d , t h e m a g n i t u d e s o f t h e p r e -d i c t e d c o s t s d i f f e r e d f r o m t h e m e a -s u r e d c o s t s i n s e v e r a l c a s e s . T h e s ed i s c r e p a n c i e s w e r e d u e t o a v a r i e t yo f c a u s e s , s u c h a s t h e o p t i m i z e r ' s i n -a b i l i t y t o p r e d i c t h o w m u c h d a t aw o u l d r e m a i n i n t h e s y s te m b u f f e r sd u r i n g s o r t i n g .

    T h e a b o v e e x p e r i m e n t d o e s n o ta d d r e s s t h e i s s u e o f w h e t h e r o r n o t av e r y g o o d a c c es s p a t h f o r a g i v e nS Q L s t a te m e n t m i g h t b e o v e r l o o k e db e c a u s e i t is n o t p a r t o f th e o p t i -m i z e r ' s re p e r t o i re . O n e s u c h e x a m p l ei s k n o w n . S u p p o s e t h a t t h e d a t a b a s ec o n t a i n s a t a b l e T i n w h i c h e a c h r o wh a s a u n i q u e v a l u e f o r t h e f ie l dS EQN O , a n d s u p p o s e t h a t a n i n d e x

    e x i s ts o n S EQN O . C o n s i d e r t h e f o l l o w -i n g S Q L q u e r y :SELECT * FROM T WHERE SEQNO IN(15, 17, 19, 21);

    T h i s q u e r y h a s a n a n s w e r s e t o f( a t m o s t ) f o u r r o w s , a n d a n o b v i o u sm e t h o d o f p r o c e s s i n g it is to u s e t h eS EQN O i n d e x r e p e a t e d l y : f i rs t t o f i n dt he r o w wi t h SE QNO = 15, the n SEQNO= 1 7, e t c . H o w e v e r , th i s a c c e s s p a t hw o u l d n o t b e c h o s e n b y S y s t e m R ,b e c a u s e t h e o p t i m i z e r i s n o t p r e s -e n t l y s t r u c t u r e d t o c o n s i d e r m u l t i p l eu s e s o f a n i n d e x w i t h i n a s i n g le q u e r yb l o c k . A s w e g a i n m o r e e x p e r i e n c ew i t h a c c e s s p a t h s e l e c t i o n , t h e o p t i -m i z e r m a y g r o w t o e n c o m p a s s t h i sa n d o t h e r a c c e ss p a t h s w h i c h h a v e s of a r b e e n o m i t t e d f r o m c o n s i d e r a t i o n .

    Views and Au thor i za t i onU s e r s g e n e r a l ly f o u n d t h e S y s t e mR m e c h a n i s m s f o r d e f i n i n g v ie w s

    a n d c o n t r o l l i n g a u t h o r i z a t i o n t o b ep o w e r f u l , f l e x i b l e , a n d c o n v e n i e n t .T h e f o l l o w i n g f e a t u r e s w e r e c o n s i d -e r e d t o b e p a r t i c u l a r l y b e n e f i c i a l :

    ( 1) T h e f u ll q u e r y p o w e r o fS Q L i s m a d e a v a i l a b l e f o r d e f i n i n gn e w v i e w s o f d a t a ( i. e. , a n y q u e r ym a y b e d e f i n e d a s a v i e w ) . T h i sm a k e s i t p o s s i b l e t o d e f i n e a r i c hv a r i e t y o f v i e w s , c o n t a i n i n g j o i n s ,s u b q u e r i e s , a g g r e g a t i o n , e t c ., w i t h o u th a v i n g t o l e a r n a s e p a r a t e d a t a d e f -i n i t io n l a n g u a g e . H o w e v e r , t h e v i e wm e c h a n i s m i s n o t c o m p l e t e l y t r a n s -p a r e n t t o t h e e n d u s e r , b e c a u s e o f t h er e s t r i c t i o n s d e s c r i b e d e a r l i e r ( e . g . ,v i e w s i n v o l v in g j o i n s o f m o r e t h a no n e t a b l e a r e n o t u p d a t e a b l e ) .

    ( 2) T h e a u t h o r i z a t i o n s u b s y s -t e m a l lo w s e a c h i n s t a ll a t io n o f S y s -t e m R t o c h o o s e a f u l l y c e n t r a l i z e dp o l i c y i n w h i c h a l l t a b l e s a r e c r e -a t e d a n d p r i v i l e g e s c o n t r o l l e d b y ac e n t r a l a d m i n i s t r a t o r ; o r a f u l l y d e -c e n t r a l i z e d p o l i c y i n w h i c h e a c hu s e r m a y c r e a t e t a b l e s a n d c o n t r o la c c e ss to t h e m ; o r s o m e i n t e r m e d i a t ep o l i c y .

    D u r i n g t h e tw o - y e a r e v a l u a t i o no f S y s t e m R , t h e f o l l o w i n g s u gg e s -t i o n s w e r e m a d e b y u s e r s f o r i m -p r o v e m e n t o f t h e v ie w a n d a u t h o r i-z a t i o n s u b s y s t e m s :

    642 Communicationsofthe ACM

    October 1981Volume 24Number 10

  • 8/12/2019 System r

    12/15

    ( 1) T h e a u t h o r i z a t i o n su b s y s -t e m c o u l d b e a u g m e n t e d b y t h e c o n -c e p t o f a g r o u p o f u s e rs . E a c hg r o u p w o u l d h a v e a g r o u p a d m i n -i s t ra t o r w h o c o n t r o l s e n r o l l m e n t o fn e w m e m b e r s i n t h e g r o u p . P r i v i -l e g e s c o u l d t h e n b e g r a n t e d t o t h eg r o u p a s a w h o l e r a t h e r t h a n t o e a c hm e m b e r o f th e g r o u p i n d i v id u a l l y .

    ( 2) A n e w c o m m a n d co u l d b ea d d e d t o t h e S Q L l a n g u a g e t oc h a n g e t h e o w n e r s h i p o f a t a b le f r o mo n e u s e r t o a n o t h e r . T h i s s u g g e s t io ni s m o r e d i f f i c u l t t o i m p l e m e n t t h a ni t s e e m s a t f i r s t g l a n c e , b e c a u s e t h eo w n e r ' s n a m e i s p a r t o f t h e f u l l yq u a l i f i e d n a m e o f a ta b l e ( i .e . , t w ot a b l e s o w n e d b y S m i t h a n d J o n e sc o u l d b e n a m e d S M I T H . P A R TS a n dJONES.PARTS). R e f e r e n c e s t o t h et ab l e SM I T H .PART S mi g h t ex i s t i nm a n y p l a ce s , s u c h a s v i e w d e f i n i ti o n sa n d c o m p i l e d p r o g r a m s . F i n d i n ga n d c h a n g i n g a l l t h e s e r e f e r e n c e sw o u l d b e d i f f i c u l t ( p e r h a p s i m p o s s i -b l e , a s i n t h e c a s e o f u s e r s ' s o u r c ep r o g r a m s w h i c h a r e n o t s t o r e d u n d e rS y s t e m R c o n t r o l ) .

    ( 3 ) O c c a s i o n a l l y i t i s n e c e s s a r yt o r e l o a d a n e x i s t i n g t a b l e i n t h ed a t a b a s e ( e .g . , t o c h a n g e i t s p h y s i c a lc l u s t e r i n g p r o p e r t i e s ) . I n S y s t e m Rt h is i s a c c o m p l i s h e d b y d r o p p i n g t h eo l d t a b l e d e f i n i t i o n , c r e a t i n g a n e wt a b l e w i t h t h e s a m e d e f i n i t i o n , a n dr e l o a d i n g t h e d a t a i n t o t h e n e w t a b le .U n f o r t u n a t e l y , v i e w s a n d a u t h o r i z a -t i o n s d e f i n e d o n t h e t a b l e a r e l o s tf r o m t h e s y s t e m w h e n t h e o l d d e f i -n i t i o n is d r o p p e d , a n d t h e r e f o r e t h e yb o t h m u s t b e r e d e f i n e d o n t h e n e wt a b l e . I t h a s b e e n s u g g e s t e d t h a tv i e w s a n d a u t h o r i z a t i o n s d e f i n e d o na d r o p p e d t a b l e m i g h t o p t i o n a l l y b eh e l d i n a b e y a n c e p e n d i n g r e a ct i-v a t i o n o f t h e t a b l e .

    The Recovery SubsystemT h e c o m b i n e d s h a d o w p a g e

    a n d l o g m e c h a n i s m u s e d i n S y s t e mR p r o v e d t o b e q u i t e s u c c e s s f u l i ns a f e g u a r d i n g t h e d a t a b a s e a g a i n s tm e d i a , s y s t e m , a n d t r a n s a c t i o n f a i l -u r e s. T h e p a r t o f t h e r e c o v e r y s u b -s y s t e m w h i c h w a s o b s e r v e d t o h a v et h e g r e a t e s t i m p a c t o n s y s t e m p e r -f o r m a n c e w a s t h e k e e p i n g o f as h a d o w p a g e f o r e a c h u p d a t e d p a g e .

    T h i s p e r f o r m a n c e i m p a c t i s d u e p r i -m a r i l y t o t h e f o l l o w i n g f a c t o r s :

    ( 1 ) S i n c e e a c h u p d a t e d p a g e isw r i t t e n o u t t o a n e w l o c a t i o n o n d i s k ,d a t a t e n d s t o m o v e a b o u t . T h i s l im i t st h e a b i l i ty o f t h e s y s t e m t o c l u s t e rr e l a t e d p a g e s i n s e c o n d a r y s t o r a g e t om i n i m i z e d i s k a r m m o v e m e n t f o r s e-q u e n t i a l a p p l i c a t i o n s .

    ( 2 ) S i n c e e a c h p a g e c a n p o t e n -t i al l y h a v e b o t h a n o l d a n d n e wv e r s io n , a d i r e c t o r y m u s t b e m a i n -t a i n e d t o l o c a t e b o t h v e r s io n s o f e a c hp a g e . F o r l a r g e d a t a b a s e s , t h e d i r e c -t o r y m a y b e l a r g e e n o u g h t o r e q u i r ea p a g i n g m e c h a n i s m o f it s o w n .

    ( 3) T h e p e r i o d i c c h e c k p o i n t sw h i c h e x c h a n g e t h e o l d a n d n e wp a g e p o i n t e r s g e n e r a t e I / O a c t iv i tya n d c o n s u m e a c e r t a i n a m o u n t o fC P U t i m e .

    A p o s s i b l e a l t e r n a t i v e t e c h n i q u ef o r r e c o v e r i n g f r o m s y s t e m f a i l u r e sw o u l d d i s p e n s e w i t h t h e c o n c e p t o fs h a d o w p a g e s , a n d s i m p l y k e e p a lo go f a ll d a t a b a s e u p d a t e s . T h i s d e s i g nw o u l d r e q u i r e t h a t a l l u p d a t e s b ew r i t t e n o u t t o t h e l o g b e f o r e t h e u p -d a t e d p a g e m i g r a t e s t o d i sk f r o m t h es y s t e m b u f f er s . M e c h a n i s m s c o u l d b ed e v e l o p e d t o m i n i m i z e I / O s b y r e -t a i n i n g u p d a t e d p a g e s i n t h e b u f f e r su n t i l s e v e r a l p a g e s a r e w r i t t e n o u t a to n c e , s h a r in g a n I / O t o t h e lo g .

    The Locking SubsystemT h e l o c k i n g s u b s y s t e m o f S y s t e mR p r o v i d e s e a c h u s e r w i t h a c h o i c e

    o f t h r e e l e v e l s o f i s o l a ti o n f r o m o t h e ru s e r s . I n o r d e r t o e x p l a i n t h e t h r e el e ve l s, w e d e f i n e u n c o m m i t t e dd a t a a s t h o s e r e c o r d s w h i c h h a v eb e e n u p d a t e d b y a t r a n s a c t io n t h a t i ss t i l l i n p r o g r e s s ( a n d t h e r e f o r e s t i l ls u b j e c t t o b e i n g b a c k e d o u t ) . U n d e rn o c i r c u m s t a n c e s c a n a t r a n s a c t i o n ,a t a n y i s o l a t i o n l e v e l , p e r f o r m u p -d a t e s o n t h e u n c o m m i t t e d d a t a o fa n o t h e r t r a n s a c t i o n , s i n c e t h is m i g h tl e a d t o l o st u p d a t e s i n t h e e v e n t o ft r a n s a c t i o n b a c k o u t .

    T h e t h r e e l e v e l s o f i s o l a t io n i nS y s t e m R a r e d e f i n e d a s f o l l o w s :

    L e v e l 1 : A t r a n s a c t i o n r u n n i n ga t L e v e l 1 m a y r e a d ( b u t n o t u p d a t e )u n c o m m i t t e d d a t a . T h e r e f o r e , s uc -c e s si v e r e ad s o f th e s a m e r e c o r d b y

    a L e v e l - 1 t r a n s a c t io n m a y n o t g i v ec o n s i s t e n t v a l u e s . A L e v e l - l t r a n s -a c t i o n d o e s n o t a t t e m p t t o a c q u i r ea n y l o c k s o n r e c o r d s w h i l e r e a d i n g .

    L e v e l 2 : A t r a n s a c t i o n r u n n i n ga t L e v e l 2 is p r o t e c t e d a g a i n s t r e a d -i n g u n c o m m i t t e d d a t a . H o w e v e r ,s u c c e s s i v e r e a d s a t L e v e l 2 m a y s t i l ly i e l d i n c o n s i s t e n t v a l u e s i f a s e c o n dt r a n s a c t i o n u p d a t e s a g i v e n r e c o r da n d t h e n t e r m i n a t e s b e t w e e n t h e f ir s ta n d s e c o n d r e a d s b y t h e L e v e l - 2t r a n s a c t io n . A L e v e l - 2 t ra n s a c t i o nl o c k s e a c h r e c o r d b e f o r e r e a d i n g i t t om a k e s u r e i t i s c o m m i t t e d a t t h e t i m eo f t h e r e a d , b u t t h e n r e le a s e s t h e l o c ki m m e d i a t e l y a f t e r r e a d i n g .

    L e v e l 3 : A t r a n s a c t io n r u n n i n ga t L e v e l 3 is g u a r a n t e e d t h a t s u c c e s -s iv e r e a d s o f t h e s a m e r e c o r d w i l ly i e l d t h e s a m e v a l u e . T h i s g u a r a n t e ei s e n f o r c e d b y a c q u i r i n g a l o c k o ne a c h r e c o r d r e a d b y a L e v e l - 3 tr a n s -a c t i o n a n d h o l d i n g t h e l o c k u n t i l th ee n d o f t h e t r a n sa c t i o n . ( T h e l o c k a c -q u i r e d b y a L e v e l - 3 r e a d e r i s a

    s h a r e l o c k w h i c h p e r m i t s o t h e ru s e r s t o r e a d b u t n o t u p d a t e t h el o c k e d r e c o r d . )

    I t w a s o u r i n t e n t i o n t h a t I s o l a ti o nL e v e l 1 p r o v i d e a m e a n s f o r v e r yq u i c k s c a n s t h r o u g h t h e d a t a b a s ew h e n a p p r o x i m a t e v a l u e s w e r e a c -c e p t a b l e , s i n c e L e v e l - 1 r e a d e r s a c -q u i r e n o l o c k s a n d s h o u l d n e v e r n e e dt o w a i t f o r o t h e r u s e r s . I n p r a c t i c e ,h o w e v e r , i t w a s f o u n d t h a t L e v e l - 1r e a d e r s d i d h a v e t o w a i t u n d e r c e r -t a i n c i r c u m s t a n c e s w h i l e t h e p h y s -i c a l c o n s i s t e n c y o f t h e d a t a w a ss u s p e n d e d ( e . g . , w h i l e i n d e x e so r p o i n t e r s w e r e b e i n g a d j u s t e d ) .T h e r e f o r e , t h e p o t e n t i a l o f L e v e l 1f o r i n c r e a s i n g s y s t e m c o n c u r r e n c yw a s n o t f u l l y r e a l i z e d .

    I t w a s o u r e x p e c t a t i o n t h a t at r a d e o f f w o u l d e x i s t b e t w e e n I s o la -t i o n L e v e l s 2 a n d 3 i n w h i c h L e v e l 2w o u l d b e c h e a p e r a n d L e v e l 3s a f e r . I n p r a c ti c e , h o w e v e r , i t w a so b s e r v e d t h a t L e v e l 3 a c t u a l ly i n -v o l v e d le s s C P U o v e r h e a d t h a nL e v e l 2 , s i n c e i t w a s s i m p l e r t o a c -q u i r e l o c k s a n d k e e p t h e m t h a n t oa c q u i r e l o c k s a n d i m m e d i a t e l yr e l e a s e t h e m . I t i s t r u e t h a t I s o l a t i o nL e v e l 2 p e r m i t s a g r e a t e r d e g r e e o f

    6 4 3 Communicationso fthe ACMOctober 1981Volume 24Num ber 10

  • 8/12/2019 System r

    13/15

    C O M P U T I N GP R A C T I C E S

    a c c es s to t h e d a t a b a s e b y c o n c u r r e n tr e a d e r s a n d u p d a t e r s t h a n d o e s L e v e l3 . H o w e v e r , t h i s i n c r e a s e i n c o n c u r -r e n c y w a s n o t o b s e r v e d t o h a v e a ni m p o r t a n t e f f e c t i n m o s t p r a c t i c a l a p -p l i ca t i ons .

    A s a r e s u l t o f t h e o b s e r v a t i o n sd e s c r i b e d a b o v e , m o s t S y s t e m Ru s e r s r a n t h e i r q u e r i e s a n d a p p l i c a -t i o n p r o g r a m s a t L e v e l 3 , w h i c h w a st h e s y s t e m d e f a u l t .

    The Convoy PhenomenonE x p e r i m e n t s w i t h t h e l o c k i n g

    s u b s y s t e m o f S y s t e m R i d e n t if i e d ap r o b l e m w h i c h c a m e t o b e k n o w n a st h e c o n v o y p h e n o m e n o n [9 ].T h e r e a r e c e r t a i n h i g h - t r a f f i c l o c k si n S y s t e m R w h i c h e v e r y p r o c e s sr e q u e s ts f r e q u e n t l y a n d h o l d s f o r as h o r t t im e . E x a m p l e s o f t h e s e a re t h el o c k s w h i c h c o n t r o l a c c e s s t o t h eb u f f e r p o o l a n d t h e s y s t e m l o g. I n a

    c o n v o y c o n d i t i o n , i n t e r a c t io n b e -t w e e n a h i g h - t ra f f i c l o c k a n d t h e o p -e r a t i n g s y s t e m d i s p a t c h e r t e n d s t os e r i a l i z e a l l p r o c e s s e s i n t h e s y s t e m ,a l l o w i n g e a c h p r o c e s s t o a c q u i r e t h el o c k o n l y o n c e e a c h t i m e i t i s d i s -p a t c h e d .

    I n t h e V M / 3 7 0 o p e r a t i n g s y s t e m ,e a c h p r o c e s s i n t h e m u l t i p r o g r a m -m i n g s e t r e c e iv e s a s e r i e s o f s m a l l

    q u a n t a o f C P U t i m e . E a c h q u a n -t u m t e r m i n a t e s a f t e r a p r e s et a m o u n to f C P U t im e , o r w h e n t h e p r o c e s sg o e s i n t o p a g e , 1 / O , o r l o c k w a i t . A tt h e e n d o f t h e s e ri e s o f q u a n t a , t h ep r o c e s s d r o p s o u t o f th e m u l t i p r o -g r a m m i n g s et a n d m u s t u n d e r g o al o n g e r t i m e s l ic e w a i t b e f o r e i to n c e a g a i n b e c o m e s d i s p a t c h a b l e .M o s t q u a n t a e n d w h e n a p r o c e s sw a i t s f o r a p a g e , a n I / O o p e r a t i o n ,o r a l o w - t r a f f i c l o c k . T h e S y s t e m Rd e s i g n e n s u r e s t h a t n o p r o c e s s w i l le v e r h o l d a h i g h - t r a f f i c l o c k d u r i n ga n y o f t h e s e t y p e s o f w a it . T h e r e i sa s l i g h t p r o b a b i l i t y , h o w e v e r , t h a t ap r o c e s s m i g h t g o in t o a l o n g t i m es l ic e w a i t w h i l e i t i s h o l d i n g a h i g h -t r a f f i c l o c k . I n t h i s e v e n t , a l l o t h e r

    d i s p a t c h a b l e p r o c e s s e s w i l l s o o n r e -q u e s t t h e s a m e l o c k a n d b e c o m e e n -q u e u e d b e h i n d t h e s l e e p i n g p r o c e s s .T h i s p h e n o m e n o n i s c a l le d a c o n -v o y .

    I n t h e o r i g i n a l S y s t e m R d e s i g n ,c o n v o y s a r e s t a b le b e c a u s e o f t h ep r o t o c o l f o r r e l e a si n g l o c k s. W h e n ap r o c e s s P r e l e a s e s a l o c k , th e l o c k i n gs u b s y s t e m g r a n t s t h e l o c k t o t h e f i rs tw a i t in g p r o c e s s i n t h e q u e u e ( t h e r e b ym a k i n g i t u n a v a i l a b l e t o b e r e a c -q u i r e d b y P ) . A f t e r a s h o r t t i m e , Po n c e a g a i n r e q u e s t s t h e l o c k , a n d i sf o r c e d t o g o t o th e e n d o f t h e c o n v o y .I f t h e m e a n t i m e b e t w e e n r e q u e s t sf o r t h e h i g h - t r a f f i c l o c k i s 1 , 0 0 0 i n -s t ru c t io n s , e a c h p r o c e s s m a y e x e c u t eo n l y 1 ,0 0 0 i n s t r u c t i o n s b e f o r e i td r o p s t o t h e e n d o f th e c o n v o y . S i n c em o r e t h a n 1 ,0 00 i n s t r u c t i o n s a r e t y p -i c a l l y u s e d t o d i s p a t c h a p r o c e s s , t h es y s t e m g o e s i n t o a t h r a s h i n g c o n -d i t i o n i n w h i c h m o s t o f t h e c y c l e s a r es p e n t o n d i s p a t c h i n g o v e r h e a d .

    T h e s o l u t io n t o t h e c o n v o y p r o b -l e m i n v o l v e d a c h a n g e t o t h e l o c kr e le a s e p r o t o c o l o f S y s t e m R . A f t e rt h e c h a n g e , w h e n a p r o c e s s P r e l e a s e sa l o c k , a l l p r o c e s s e s w h i c h a r e e n -q u e u e d f o r t h e l o c k a r e m a d e d i s -p a t c h a b l e , b u t t h e l o c k i s n o t g r a n t e dt o a n y p a r t i c u l a r p r o ce s s . T h e r e f o r e ,t h e l o c k m a y b e r e g r a n t e d t o p r o c e s sP i f i t m a k e s a s u b s e q u e n t r e q u e s t .P r o c e s s P m a y a c q u i r e a n d r e l ea s et h e l o c k m a n y t i m e s b e f o r e i t s t i m es l i c e i s e x h a u s t e d . I t i s h i g h l y p r o b -a b l e t h a t p r o c e s s P w i l l n o t b e h o l d -i n g t h e l o c k w h e n i t g o e s i n t o a l o n gw a i t. T h e r e f o r e , i f a c o n v o y s h o u l de v e r f o r m , i t w i l l m o s t l i k e l y e v a p o -r a t e a s s o o n a s a l l t h e m e m b e r s o ft h e c o n v o y h a v e b e e n d i s p a t c h e d .

    dditional ObservationsO t h e r o b s e r v a t i o n s w e r e m a d e

    d u r i n g t h e e v a l u a t i o n o f S y s t e m Ra n d a r e l i s t e d b e l o w :

    ( 1 ) W h e n r u n n i n g i n a c a n n e dt r a n s a c t i o n e n v i r o n m e n t , i t w o u l db e h e l p f u l f o r t h e s y s t e m t o i n c l u d ea d a t a c o m m u n i c a t i o n s f r o n t e n d t oh a n d l e t e r m i n a l i n t e ra c t i o n s , p r i o r it ys c h e d u l i n g , a n d l o g g i n g a n d r e s t a r ta t t h e m e s s a g e l e v e l . T h i s f a c i l i t y w a sn o t i n c l u d e d i n t h e S y s t e m R d e s ig n .A l s o , s p a c e w o u l d b e s a v e d a n d t h e

    w o r k i n g s e t r e d u c e d i f s e v e r a l u s e r se x e c u t i n g t h e s a m e c a n n e d tr a n s -a c t i o n c o u l d s h a r e a c o m m o n ac c e ssm o d u l e . T h i s w o u l d r e q u i r e t h e S y s -t e m R c o d e g e n e r a t o r t o p r o d u c er e e n t r a n t c o d e . A p p r o x i m a t e l y h a l ft h e s p a c e o c c u p i e d b y t h e m u l t i p l ec o p i e s o f t h e a c c e s s m o d u l e c o u l d b es a v e d b y t h i s m e t h o d , s i n ce t h e o t h e rh a l f c o n s i st s o f w o r k i n g s t o r ag ew h i c h m u s t b e d u p l i c a t e d f o r e a c huse r .

    ( 2 ) W h e n t h e r e c o v e r y s u b s y s -t e m a t t e m p t s t o t a k e a n a u t o m a t i cc h e c k p o i n t , i t i n h i b i t s t h e p r o c e s s i n go f n e w R S S c o m m a n d s u n t il a l l u s er sh a v e c o m p l e t e d t h e i r c u r r e n t R S Sc o m m a n d ; t h e n t h e c h e c k p o i n t i st a k e n a n d a l l u s e r s a r e a l l o w e d t op r o c e e d . H o w e v e r , c e rt a in R S S c o m -m a n d s p o t e n t i a l l y i n v o l v e l o n g o p -e r a t i o n s , s u c h a s s o r t i n g a f i l e . I ft h e s e l o n g R S S o p e r a t i o n s w e r em a d e i n t e r ru p t i b l e , it w o u l d a v o i da n y d e l a y i n p e r f o r m i n g c h e c k p o i n t s .

    ( 3 ) T h e S y s t e m R d e s ig n o f a u -t o m a t i c a l l y m a i n t a i n i n g a s y s t e mc a t a l o g a s p a r t o f t h e o n - l i n e d a t a -b a s e w a s v e r y w e l l li k e d b y u s e r s ,s i n c e i t p e r m i t t e d t h e m t o a c c e s s t h ei n f o r m a t i o n i n t h e c a t a l o g w i t h e x -a c t l y t h e s a m e q u e r y l a n g u a g e t h e yu s e f o r a c c e s s i n g o t h e r d a t a .5 . C o n c l u s i o n s

    W e f e e l t h a t o u r e x p e r i e n c e w i t hS y s t e m R h a s c l e a r l y d e m o n s t r a t e dt h e f e a s i b i l i t y o f a p p l y i n g a r e l a -t i o n a l d a t a b a s e s y s t e m t o a r e a l p r o -d u c t i o n e n v i r o n m e n t i n w h i c h m a n yc o n c u r r e n t u s e r s a r e p e r f o r m i n g am i x t u r e o f a d h o c q u e r i e s a n d r e p e t -i t i v e t r a n s a c t i o n s . W e b e l i e v e t h a tt h e h i g h - l e v e l u s e r i n t e r f a c e m a d ep o s s i b le b y t h e r e l a t i o n a l d a t a m o d e lc a n h a v e a d r a m a t i c p o s i t i v e e f f e c to n u s e r p r o d u c t i v i t y in d e v e l o p i n gn e w a p p l i c a t i o n s , a n d o n t h e d a t ai n d e p e n d e n c e o f q u e ri e s a n d p r o -g r a m s . S y s t e m R h a s a l s o d e m o n -s t r a t e d t h e a b i l i t y to s u p p o r t a h i g h l yd y n a m i c d a t a b a s e e n v i r o n m e n t i nw h i c h a p p l i c a t i o n r e q u i r e m e n t s a r er a p i d l y c h a n g i n g .

    I n p a r t i c u l a r , S y s t e m R h a s i l lu s -t r a t e d t h e f e a s i b i l i ty o f c o m p i l i n g av e r y h i g h - l e v e l d a t a s u b l a n g u a g e ,S Q L , i n t o m a c h i n e - l e v e l c o d e . T h e

    644 Communicationsofthe ACMOctober 1981Volume 24Number 10

  • 8/12/2019 System r

    14/15