1 C h apte r 1 1 A D atabase M anagem e n t S y ste m s 1 D atabase M anagem e n t S y ste m s D atabase m anagem e n t sy ste m (D B M S ) S to re larg e co lle ctio n s o f d ata O rg anize th e d ata B e co m e s a d ata sto rage sy ste m 2 T h e D atabase S to re s a co lle ctio n o f re late d ite m s C o llectio n is arrang ed in a structure O rganizes and describes the data O fte n in clu d e s h e lp e r d o cum e n ts T w o d iffe re n t ty p e s 3
2 D atabase S tru ctu re Fie ld N am e Fie ld R e co rd 4 T h e D atabase Fie ld s H old an individual piece of data A re nam ed descriptively O ften called a colum n Phone book exam ples Nam e, address, e -m ail, phone num ber Fields m ay contain no data 5 T h e D atabase R e co rd s O n e fu ll se t o f fi e ld s O ften called a row Phone book exam ple Sm ith, Joe, 123 Som e Street, 412-555- 7 7 7 7 D atabases m ay have unlim ited row s 6
3 T h e D atabase T able s O ne com plete collection of records D atabases m ay have thousands of table s 7 Form s D atabase H e lp e r D o cum e n ts P re se n t o n e re co rd to th e u se r O ften used to change or view data 8 R e p o rts D atabase H e lp e r D o cum e n ts P ro d u ce p rin te d re su lts fro m th e d atabase Includes tools to sum m arize data 9
4 Flat-fi le D atabase s T y p ically h as o n ly o n e table If m ultiple, each has a separate file U se fu l fo r sim p le d ata sto rage n e e d s H ard to m anage larg e d ata n e e d s C an w aste d isk sp ace 1 0 R e latio n al D atabase s M ade o f tw o o r m o re table s T able s are re late d b y a co m m o n fi e ld Called a relationship or join C an h e lp o rg anize d ata M o st co m m o n fo rm o f d atabase M aintaining d ata is easier than fl atfi le N o w aste d d isk sp ace 1 1 T h e D B M S P ro g ram s th at co n tro l th e d atabase A llo w s E n te rin g d ata Q u e ry in g d ata P rin tin g re p o rts S u p p o rts th o u sands o f u se rs In clu d e s to o ls to p ro te ct th e d ata 1 2
5 C re atin g table s L ist th e n e cessary fi e ld s S te p s to d e fi n e a fi e ld D e scrip tiv e ly n am e th e fi e ld S p e cify th e fi e ld ty p e D e te rm in e th e fi e ld size 1 3 Fie ld ty p e s Describes the type of data stored M ost DBM S use the sam e types T e xt fi e ld s sto re le tte rs and n u m b e rs N u m e ric fi e ld sto re n u m b e rs D ate and tim e fi e ld Logical field stores yes or no Binary field stores images or sounds Counter field generates sequential numbers Memo fields store large amounts of data 1 4 Entering d ata into a tab le U se rs ty p e d ata in to a fi e ld D ata m ust be entered accurately C o n strain ts h e lp to v e rify d ata Form s are typically used for data entry 1 5
6 V ie w in g re co rd s D atasheet view show s all records Filters can lim it the records show n D isp lay o n ly re co rd s m atchin g a crite ria Form s allow view ing one record 1 6 S o rtin g re co rd s O rder records based on a field M ultiple sub sorts resolve ties Several types of sorts A lp h abetic N u m e ric C h ro n o lo g ical A scendin g D e scendin g 1 7 Q u e ry in g a d atabase Statem ent that describes desired data List of fields can be m odified Uses of querying Fin d d ata C alculate v alu e s p e r re co rd D e le te re co rd s M o st im p o rtant D B M S skill 1 8
7 Q uery languages All DBM S use a query language M o st D B M S m o d ify th e language S tru ctu re d Q u e ry L anguage (S Q L ) M o st co m m o n q u e ry language xb ase Query language for dbase systems Query by exam ple (QBE) Interface to SQL or xbase In te ractiv e q u e ry d e sig n 1 9 Q u e ry E xam p le s S Q L Select FirstNam e, LastNam e, Phone From tblphonenum bers W here LastNam e= Norton ; xb ase Use tblphonenum bers List FirstNam e, LastNam e, Phone For LastNam e= N orton 2 0 G e n e ratin g re p o rts Printed inform ation extracted from a d atabase C an calculate d ata C alculate d ata p e r ro w C alculate fo r e n tire table Pictures and form atting can be included 2 1
8 C h apte r 1 1 A E n d o f C h apte r 2 2 C h apte r 1 1 B S u rv e y o f D atabase S y ste m s 2 3 E n te rp rise S o ftw are E n te rp rise d e fi n itio n s System s throughout the entire o rg anizatio n V ery large scale com puter system s H istorically found on m ainfram es M odern enterprise runs on PC servers 2 4
9 E n te rp rise S o ftw are S u ite o f p ro g ram s H andle s th o u sands o f u se rs at o n ce A ccess to m illio n s o f re co rd s L o o ks and acts like a D B M S 2 5 E n te rp rise S o ftw are D istrib u te d applicatio n s Softw are installed on several m achines D ata stored on several m achines D ata p laced clo se st to appro p riate u se rs W ork load is balanced am ong m achines 2 6 E n te rp rise S o ftw are T ie rs Softw are betw een user and data Tiers control one part of enterprise T w o tie r sy ste m s D ata sto rage C lie n t in te rface Three tier system s A d d calculatio n There is no lim it to the tiers 2 7
1 0 E n te rp rise S o ftw are M e e t th e n e e d s o f m any u se rs A pplications are very com plex Support m any types of users Supports m any different nationalities M ust support large data flow 2 8 E n te rp rise S o ftw are E le ctro n ic d o cum e n t m anagem e n t E D M Tracks and organizes docum ents Collaboration betw een team m em bers D atabase tracks all changes 2 9 E n te rp rise S o ftw are D isco n n e cte d d atabase s Connections are given a copy of data Reduces the num ber of open co n n e ctio n s R e d u ces th e d ata fl o w n e e d s M ay result in different versions of data 3 0
1 1 D atabase s at W o rk R eq uired in nearly every b usiness C an auto m ate tasks In cre ase s b u sin e ss e ffi cie n cy 3 1 D atabase s at W o rk K n o w le d g e d isco v e ry Technique of databases G enerates questions for the database T h o se y o u d id n o t th in k to ask 3 2 D ata m in in g D atabase s at W o rk Type of know ledge discovery Searches for trends and patterns M akes predictions on events S u p p lie s id e as fo r im proving business 3 3
1 2 D atabase s at W o rk In te rn e t u se s Com m ercial w ebsites use databases Supply im age and price inform ation S p e cialty d atabase s e xist o n lin e S e arch e n g in e s track lin ks 3 4 D atabase s at W o rk D atabase s fo r in d iv id u als M anage aspects of your life O rganizes hobbies for school M icrosoft A ccess is the m ost popular 3 5 C o m m o n C o rp o rate D B M S O racle M ost popular enterprise -level D BM S V ery flexible storage system Can be very com plex P latfo rm in d e p e n d e n t O ffers a w ide range of solutions http ://w w w.oracle.com /index.htm l 3 6
1 3 C o m m o n C o rp o rate D B M S D B 2 V enerable IBM database P latfo rm in d e p e n d e n t O nly database using pure SQ L h ttp ://w w w - 306.ibm.com /softw are /data/db2/ 3 7 C o m m o n C o rp o rate D B M S M icro so ft S Q L S e rv e r Faste st g ro w in g D B M S O nly runs on M icrosoft platform s E ig h t d iffe re n t v e rsio n s e xist Extrem ely scalable architecture Softw are can grow w ith the data 3 8 C o m m o n C o rp o rate D B M S M y S Q L L e adin g D B M S fo r L in u x V ery inexpensive Featu re s are th o se n e e d e d in b u sin e ss O fte n faste r th an o th e r D B M S P latfo rm in d e p e n d e n t 3 9
1 4 C h apte r 1 1 B E n d o f C h apte r 4 0