S t o r a g e a n d D i s k s S t o r a g e a - - PowerPoint PPT Presentation

s t o r a g e a n d d i s k s s t o r a g e a n d d i s k
SMART_READER_LITE
LIVE PREVIEW

S t o r a g e a n d D i s k s S t o r a g e a - - PowerPoint PPT Presentation

S t o r a g e a n d D i s k s S t o r a g e a n d D i s k s G e n e r a l O v e r v i e w G e n e r a l O v e r v i e w R e l a t i o n a l m o d e l - S Q L F o


slide-1
SLIDE 1

S t

  • r

a g e a n d D i s k s S t

  • r

a g e a n d D i s k s

slide-2
SLIDE 2

1 1 . 2 D a t a b a s e S y s t e m C

  • n

c e p t s

G e n e r a l O v e r v i e w G e n e r a l O v e r v i e w

  • R

e l a t i

  • n

a l m

  • d

e l

  • S

Q L

  • F
  • r

m a l & c

  • m

m e r c i a l q u e r y l a n g u a g e s

  • F

u n c t i

  • n

a l D e p e n d e n c i e s

  • N
  • r

m a l i z a t i

  • n
  • P

h y s i c a l D e s i g n

  • I

n d e x i n g

  • Q

u e r y e v a l u a t i

  • n
  • Q

u e r y

  • p

t i m i z a t i

  • n
  • ….

A p p l i c a t i

  • n

O r i e n t e d S y s t e m s O r i e n t e d

slide-3
SLIDE 3

1 1 . 3 D a t a b a s e S y s t e m C

  • n

c e p t s

S t

  • r

a g e M e d i a : T y p e s S t

  • r

a g e M e d i a : T y p e s

  • C

a c h e

– f a s t e s t a n d m

  • s

t c

  • s

t l y f

  • r

m

  • f

s t

  • r

a g e ; v

  • l

a t i l e ; m a n a g e d b y t h e c

  • m

p u t e r s y s t e m h a r d w a r e .

  • M

a i n me mo r y

:

  • f

a s t a c c e s s ( 1 s t

  • 1

s

  • f

n a n

  • s

e c

  • n

d s ; 1 n a n

  • s

e c

  • n

d = 1

– 9

s e c

  • n

d s )

  • g

e n e r a l l y t

  • s

m a l l (

  • r

t

  • e

x p e n s i v e ) t

  • s

t

  • r

e t h e e n t i r e d a t a b a s e ( b u t f

  • r

s

  • m

e a p p l i c a t i

  • n

s , t h i s i s c h a n g i n g )

  • V
  • l

a t i l e — c

  • n

t e n t s

  • f

m a i n m e m

  • r

y a r e u s u a l l y l

  • s

t i f a p

  • w

e r f a i l u r e

  • r

s y s t e m c r a s h

  • c

c u r s .

  • B

u t … C P U

  • p

e r a t e s

  • n

l y

  • n

d a t a i n m a i n m e m

  • r

y

slide-4
SLIDE 4

1 1 . 4 D a t a b a s e S y s t e m C

  • n

c e p t s

S t

  • r

a g e M e d i a : T y p e s ( c

  • n

t . ) S t

  • r

a g e M e d i a : T y p e s ( c

  • n

t . )

  • D

i s k

  • P

r i m a r y m e d i u m f

  • r

t h e l

  • n

g

  • t

e r m s t

  • r

a g e

  • f

d a t a ; t y p i c a l l y s t

  • r

e s e n t i r e d a t a b a s e .

  • r

a n d

  • m
  • a

c c e s s – p

  • s

s i b l e t

  • r

e a d d a t a

  • n

d i s k i n a n y

  • r

d e r , u n l i k e m a g n e t i c t a p e

  • N
  • n
  • v
  • l

a t i l e : d a t a s u r v i v e a p

  • w

e r f a i l u r e

  • r

a s y s t e m c r a s h , d i s k f a i l u r e l e s s l i k e l y t h a n t h e m

  • F

l a s h M e mo r y

  • n
  • s

e e k s

  • C

h e a p r e a d s , e x p e n s i v e w r i t e s

  • e

x p e r i m e n t a l u s e f

  • r

D B ’ s

  • N

V M

  • C
  • m

i n g s

  • n
slide-5
SLIDE 5

1 1 . 5 D a t a b a s e S y s t e m C

  • n

c e p t s

M e mo r y H i e r a r c h y M e mo r y H i e r a r c h y

c a c h e M a i n m e m

  • r

y F l a s h d i s k O p t i c a l s t

  • r

a g e H i g h e r s p e e d L

  • w

e r p r i c e T r a v e l i n g t h e h i e r a r c h y : 1 . s p e e d ( h i g h e r = f a s t e r ) 2 . c

  • s

t ( l

  • w

e r = c h e a p e r ) 3 . v

  • l

a t i l i t y ( b e t w e e n M M a n d D i s k ) 4 . D a t a t r a n s f e r ( M a i n m e m

  • r

y t h e “ h u b ” ) 5 . S t

  • r

a g e c l a s s e s ( P = p r i m a r y , S = s e c

  • n

d a r y , T = t e r t i a r y ) V

  • l

a t i l e N

  • n
  • V
  • l

a t i l e

slide-6
SLIDE 6

1 1 . 6 D a t a b a s e S y s t e m C

  • n

c e p t s

H a r d D i s k M e c h a n i s m H a r d D i s k M e c h a n i s m

slide-7
SLIDE 7

1 1 . 7 D a t a b a s e S y s t e m C

  • n

c e p t s

  • R

e a d

  • w

r i t e h e a d

  • P
  • s

i t i

  • n

e d v e r y c l

  • s

e t

  • t

h e p l a t t e r s u r f a c e ( a l m

  • s

t t

  • u

c h i n g i t )

  • S

u r f a c e

  • f

p l a t t e r d i v i d e d i n t

  • c

i r c u l a r t r a c k s

  • E

a c h t r a c k i s d i v i d e d i n t

  • s

e c t

  • r

s .

  • A

s e c t

  • r

i s t h e s m a l l e s t u n i t

  • f

d a t a t h a t c a n b e r e a d

  • r

w r i t t e n .

  • T
  • r

e a d / w r i t e a s e c t

  • r
  • d

i s k a r m s w i n g s t

  • p
  • s

i t i

  • n

h e a d

  • n

r i g h t t r a c k

  • p

l a t t e r s p i n s c

  • n

t i n u a l l y ; d a t a i s r e a d / w r i t t e n a s s e c t

  • r

p a s s e s u n d e r h e a d

  • B

l

  • c

k : a s e q u e n c e

  • f

s e c t

  • r

s

  • C

y l i n d e r i c

  • n

s i s t s

  • f

i

t h

t r a c k

  • f

a l l t h e p l a t t e r s T

  • p

v i e w

slide-8
SLIDE 8

1 1 . 8 D a t a b a s e S y s t e m C

  • n

c e p t s

P e r f

  • r

ma n c e M e a s u r e s

  • f

D i s k s P e r f

  • r

ma n c e M e a s u r e s

  • f

D i s k s

M e a s u r i n g D i s k S p e e d

  • A

c c e s s t i me – c

  • n

s i s t s

  • f

:

  • S

e e k t i me – t i m e i t t a k e s t

  • r

e p

  • s

i t i

  • n

t h e a r m

  • v

e r t h e c

  • r

r e c t t r a c k .

  • (

R

  • t

a t i

  • n

a l ) l a t e n c y t i me – t i m e i t t a k e s f

  • r

t h e s e c t

  • r

t

  • b

e a c c e s s e d t

  • a

p p e a r u n d e r t h e h e a d .

  • D

a t a

  • t

r a n s f e r r a t e – t h e r a t e a t w h i c h d a t a c a n b e r e t r i e v e d f r

  • m
  • r

s t

  • r

e d t

  • t

h e d i s k . A n a l

  • g

y t

  • t

a k i n g a b u s : 1 . S e e k t i m e : t i m e t

  • g

e t t

  • b

u s s t

  • p

2 . L a t e n c y t i m e ; t i m e s p e n t w a i t i n g a t b u s s t

  • p

3 . D a t a t r a n s f e r t i m e : t i m e s p e n t r i d i n g t h e b u s

slide-9
SLIDE 9

1 1 . 9 D a t a b a s e S y s t e m C

  • n

c e p t s

R a n d

  • m

v s s e q u e n t i a l I / O R a n d

  • m

v s s e q u e n t i a l I / O

  • E

x :1 K B B l

  • c

k

  • R

a n d

  • m

I / O :  2 m s .

  • S

e q u e n t i a l I / O :  1 m s .

R u l e

  • f

R u l e

  • f

R a n d

  • m

I / O : E x p e n s i v e R a n d

  • m

I / O : E x p e n s i v e T h u m b T h u m b S e q u e n t i a l I / O : M u c h l e s s ~ 1

  • 2

t i me s S e q u e n t i a l I / O : M u c h l e s s ~ 1

  • 2

t i me s

slide-10
SLIDE 10

1 1 . 1 D a t a b a s e S y s t e m C

  • n

c e p t s

P e r f

  • r

ma n c e M e a s u r e s ( C

  • n

t . ) P e r f

  • r

ma n c e M e a s u r e s ( C

  • n

t . )

  • M

e a n t i me t

  • f

a i l u r e ( M T T F ) – t h e a v e r a g e t i m e t h e d i s k i s e x p e c t e d t

  • r

u n c

  • n

t i n u

  • u

s l y w i t h

  • u

t a n y f a i l u r e .

  • T

y p i c a l l y 5 t

  • 1

y e a r s

  • P

r

  • b

a b i l i t y

  • f

f a i l u r e

  • f

n e w d i s k s i s q u i t e l

  • w

, c

  • r

r e s p

  • n

d i n g t

  • a

“ t h e

  • r

e t i c a l M T T F ”

  • f

3 , t

  • 1

, 2 , h

  • u

r s f

  • r

a n e w d i s k

  • E

. g . , a n M T T F

  • f

1 , 2 , h

  • u

r s f

  • r

a n e w d i s k m e a n s t h a t g i v e n 1 r e l a t i v e l y n e w d i s k s ,

  • n

a n a v e r a g e

  • n

e w i l l f a i l e v e r y 1 2 h

  • u

r s

  • M

T T F d e c r e a s e s a s d i s k a g e s