Database Management System ETCS 357: Maharaja Agrasen Institute of Technology
Database Management System ETCS 357: Maharaja Agrasen Institute of Technology
INDEX
+ro&ra m No. 1. 2. /. 0. !. 1. 2. . 3. 10. 11. 12. 1/. 10. 1!. 11. 12. 1 .
+ro&ram
Date
,eacher Si&natur e
-ar.s "10*
-em%ership and su%scription mailin& lists #ccountin& and %oo..eepin& in$ormation ,he data o%tained $rom scienti$ic research :ustomer in$ormation 'n)entory in$ormation +ersonal records ;i%rary in$ormation
ADVANTAGES &/ DATABASE MANAGEMENT SYSTEM
"0pr(1ed a1a$la2$l$#y: 7ne o$ the principle ad)anta&es o$ a D6-S is that the same in$ormation can %e made a)aila%le to di$$erent users. M$n$0$3ed red%ndancy: ,he data in a D6-S is more concise %ecause, as a &eneral rule, the in$ormation in it appears <ust once. ,his reduces data redundancy, or in other words, the need to repeat the same data o)er and o)er a&ain. -inimi5in& redundancy can there$ore si&ni$icantly reduce the cost o$ storin& in$ormation on hard dri)es and other stora&e de)ices. 'n contrast, data $ields are commonly repeated in multiple $iles when a $ile mana&ement system is used. Acc%racy: #ccurate, consistent, and up4to4date data is a si&n o$ data inte&rity. D6-Ss $oster data inte&rity %ecause updates and chan&es to the data only ha)e to %e made in one place. ,he chances o$ ma.in& a mista.e are hi&her i$ you are re=uired to chan&e the same data in se)eral di$$erent places than i$ you only ha)e to ma.e the chan&e in one place.
*r( ra0 and '$le c(n!$!#ency: (sin& a data%ase mana&ement system, $ile $ormats and system pro&rams are standardi5ed. ,his ma.es the data $iles easier to maintain %ecause the same rules and &uidelines apply across all types o$ data. ,he le)el o$ consistency across $iles and pro&rams also ma.es it easier to mana&e data when multiple pro&rammers are in)ol)ed. .!er4'r$endly: Data is easier to access and manipulate with a D6-S than without it. 'n most cases, D6-Ss also reduce the reliance o$ indi)idual users on computer specialists to meet their data needs. "0pr(1ed !ec%r$#y: #s stated earlier, D6-Ss allow multiple users to access the same data resources. ,his capa%ility is &enerally )iewed as a %ene$it, %ut there are potential ris.s $or the or&ani5ation. Some sources o$ in$ormation should %e protected or secured and only )iewed %y select indi)iduals. ,hrou&h the use o$ passwords, data%ase mana&ement systems can %e used to restrict data access to only those who should see it. TY*ES &/ DATABASES: 1. &2jec#4(r$en#ed da#a2a!e!: #%le to handle many new data types, includin& &raphics, photo&raphs, audio, and )ideo, o%<ect4oriented data%ases represent a si&ni$icant ad)ance o)er their other data%ase cousins. >ierarchical and networ. data%ases are all desi&ned to handle structured data? that is, data that $its nicely into $ields, rows, and columns. ,hey are use$ul $or handlin& small snippets o$ in$ormation such as names, addresses, 5ip codes, product num%ers, and any .ind o$ statistic or num%er you can thin. o$. 7n the other hand, an o%<ect4oriented data%ase can %e used to store data $rom a )ariety o$ media sources, such as photo&raphs and te8t, and produce wor., as output, in a multimedia $ormat. 5.6$erarch$cal da#a2a!e! commonly used on main$rame computers, ha)e %een around $or a lon& time. 't is one o$ the oldest methods o$ or&ani5in& and storin& data, and it is still used %y some or&ani5ations $or ma.in& tra)el reser)ations. # hierarchical data%ase is or&ani5ed in pyramid $ashion, li.e the %ranches o$ a tree e8tendin& downwards. Related $ields or records are &rouped toðer so that there are hi&her4le)el records and lower4le)el records, <ust li.e the parents in a $amily tree sit a%o)e the su%ordinated children. /.Ne#7(r8 da#a2a!e: are similar to hierarchical data%ases %y also ha)in& a hierarchical structure. ,here are a $ew .ey di$$erences, howe)er. 'nstead o$ loo.in& li.e an upside4down tree, a networ. data%ase loo.s more li.e a co%we% or interconnected networ. o$ records. 'n networ. data%ases, children are called mem%ers and parents are called owners. ,he most important di$$erence is that each child or mem%er can ha)e more than one parent "or owner*. 9.+ela#$(nal da#a2a!e! the relationship %etween data $iles is relational, not hierarchical. >ierarchical and networ. data%ases re=uire the user to pass down throu&h a hierarchy in order to access needed data. Relational data%ases connect data in di$$erent $iles %y usin& common data elements or a .ey $ield. Data in relational data%ases is stored in di$$erent ta%les, each ha)in& a .ey $ield that uni=uely identi$ies each row. Relational data%ases are more $le8i%le than either the hierarchical or networ. data%ase structures. 'n relational data%ases, ta%les or $iles $illed with data are called relations: tuples desi&nates a row or record, and columns are re$erred to as attri%utes or $ields.
E)*E+"MENT N&: ,5 A"M: D"//E+ENCE BET;EEN <("): =("): -,(G) VE+S"&NS &/ DATABASE MANAGEMENT SYSTEM
,he &racle Da#a2a!e "commonly re$erred to as &racle +DBMS or simply as &racle* is an o%<ect4 relational data%ase mana&ement system @2Aproduced and mar.eted %y 7racle :orporation. ;arry Bllison and his $riends, $ormer co4wor.ers 6o% -iner and Bd 7ates, started the consultancy So$tware De)elopment ;a%oratories "SD;* in 1322. SD; de)eloped the ori&inal )ersion o$ the 7racle so$tware. ,he name Oracle comes $rom the code4name o$ a :'#4$unded pro<ect Bllison had wor.ed on while pre)iously employed %y #mpe8.
AB&.T <$
S#(ra e
&racle <$ is a )ersion o$ the 7racle Data%ase. ,he i stands $or I'nternetI to indicate that i is I'nternet readyI.
Features introduced
7racle i " .1.2* 4 #u&ust 2000 7racle i " .1.1* 4 No)em%er 1333 7racle i " .1.!* 4 Fe%ruary 1333
AB&.T =$ S#(ra e
&racle =$ is a )ersion o$ the 7racle Data%ase. ,he i stands $or I'nternetI to indicate that 3i is I'nternet readyI.
7racle 3i Release 2 "3.2.0* 4 -ay 2002 7racle 3i Release 1 "3.0.1* 4 Lune 2001
AB&.T -, S#(ra e
&racle -, is a )ersion o$ the 7racle Data%ase. ,he & stands $or I&ridI to indicate that 10& is I&rid4computin& readyI.
7racle 10& Release 1 "10.1.0* 4 Lanuary 2000 7racle 10& Release 2 "10.2.0* 4 Septem%er 200!
D"//E+ENCES:
,he IiI and I&I Eersions Startin& in 1333 with Eersion i, 7racle added the IiI to the )ersion name to re$lect support $or the 'nternet with its %uilt4in La)a Eirtual -achine "LE-*. 7racle 3i added more support $or M-; in 2001. 'n 200/, 7racle 10& was introduced with emphasis on the I&I $or &rid computin&, which ena%les clusters o$ low4cost, industry standard ser)ers to %e treated as a sin&le unit. 10& is 7racle9s &rid computin& product &roup includin& "amon& other thin&s* a data%ase mana&ement system "D6-S* and an application ser)er. 'n addition to supportin& &rid computin& $eatures such as resource sharin& and automatic load %alancin&, 10& products automate many data%ase mana&ement tas.s. ,he Real #pplication :luster "R#:* component ma.es it possi%le to
install a data%ase o)er multiple ser)ers. 10& $ollows 7racle9s 3i plat$orm. 7racle says that the & "instead o$ the e8pected i* in the name sym%oli5es the company9s commitment to the &rid model. >owe)er, accordin& to some reports, many early adopters are deployin& 10& solely $or its automation $eatures and ha)e no immediate plans o$ implementin& a &rid en)ironment.
E)*E+"MENT N&: ,3
A"M: "M*>EMENT T6E /&>>&;"NG C&MMANDS : -.C+EATE 5."NSE+T 3.DE>ETE 9..*DATE 5.SE>ECT -. C+EATE :reate ta%le ta%leFname?" #ttri%uteFname1 dataFtype"si5e*, #ttri%uteFname2 dataFtype"si5e*, #ttri%uteFname/ dataFtype"si5e*, NNNNN..*?
SJ;S create ta%le stud" 2 Name )archar2"20*, / Rollno )archar2"10*, 0 6ranch )archar2"10*, ! #ddress )archar2"20**? ,a%le created. SJ;S insert into stud )alues"9#9 ,9019 ,9:SB9, 9Rohini9*? 1 row created. SJ;S insert into stud )alues"969 ,9029 ,9B:B9, 9Rohini9*? 1 row created. SJ;S insert into stud )alues"9:9 ,90/9 ,9:SB9, 9Shahadra9*? 1 row created. SJ;S insert into stud )alues"9D9 ,9009 ,9',9, 9Rohini9*? 1 row created. SJ;S insert into stud )alues"9B9 ,90!9 ,9B:B9, 9Rohini9* 1 row created. SJ;S selectR $rom stud? N#-B R7;;N7 6R#N:> #DDRBSS 44444444444444444444 4444444444 4444444444 44444444444444444444 # 01 :SB Rohini 6 02 B:B Rohini : 0/ :SB Shahadra D 00 ', Rohini B 0! B:B Rohini SJ;S select R $rom stud where 6ranchQ9:SB9? N#-B R7;;N7 6R#N:> #DDRBSS 44444444444444444444 4444444444 4444444444 44444444444444444444 # 01 :SB Rohini : 0/ :SB Shahadra SJ;S select Name $rom Stud? N#-B # 6 : D B SJ;S update stud set NameQ9F9 where RollnoQ9019? 1 row updated. SJ;S selectR $rom stud? N#-B R7;;N7 6R#N:> #DDRBSS 44444444444444444444 4444444444 4444444444 44444444444444444444 # 01 :SB Rohini 6 02 B:B Rohini : 0/ :SB Shahadra D 00 ', Rohini B 0! B:B Rohini
SJ;S delete $rom stud where NameQ9B9? 1 row deleted. SJ;S selectR $rom stud? N#-B R7;;N7 6R#N:> #DDRBSS 4444444444444444444 4444444444 4444444444 44444444444444444444 # 01 :SB Rohini 6 02 B:B Rohini : 0/ :SB Shahadra D 00 ', Rohini