You are on page 1of 336
| MODERN DATABASE | MANAGEMENT SYSTEM (MDBMS) B.Sc Ill Year (For All Streams) of All Universities Written By: Mr. G. GANESH MCA Department of Computer Science Sri Sarada Degree College for women Yellareddy Guda, Ameerpet Hyderabad-73. PRESENTED BY GS SOLUTIONS Nirmal, Adilabad. Like us on: mylovelyinfo4u@gmail.com UNiT-fP | IRTERACTION Lie DATABASES | ANID CONSTRUCTION Of dhene arte ‘Aumesous Wwostons of Sot dhe oojgieal Veusfon) uoos developed! dl Tere San doce Reseasrh Loborile i >dhis larquoge , ontgtrally Called Sequel Us08 ‘replementel| 05 pont af the " System 8! payfect fo the Saly R05 | > dhe Sequel! l ge hos Bvolved Ond 8 rome has | ed to Sel (shsucturted queny darguage) | | >In 86;the Arnezican Nakgoral Stardands (ANsD) Published an Sal Stancland : STem has published ts cu ‘corposcila’ Sou. Sk A the Spiers Appltcalion anchitedtuse Deilabase Treaoce \ (saa - S6e) S86. hog cleouly Established ftselh os te Storvlord oelabtonat dala! lonquoge. Co allows Users “lo access dal. to relational délakase Monogemert Systems, Such 05 ovacle , Sohoom'x , Sybase, Access Etc.» in a ddtabase Sel allass usens to waripulodi ard define the. dab. \ Gol {San ONT Stancloned Compiler > Sol % mone than a queny tool, b -thel was tie original pustpose andl metieving dab. ts Suill one of th “most Smpestart ofunctdons |? Sot fs VSed to coast all 4 “the fundlions Ge | Which Poovides Ba gis Usens, including i Ty DDL USem debihe the Stoucluse and ‘izcilicn) ; 4, the Stove dala. and selationshtpe among the Stoel , dala Stems, | bale. Rebdeval Janquege:- | 9 application pega to nebBeve. Stoxea! dab. | Lom “the dalakase and use Tt *Déla mantiputotion lenguoges- DML nies os an appleotion pooper to updale the ddbbose ba addling neu ios vero old dole; arc roodtytng previously Stosed da 1 * pola Cofleot Uage ¢ - i Dez can be Used “lo Seskict 2 Usens ability fo seteeve add andl roodify dab. ; podlecling Stoned | dala aénst unauthorigec! cess |x pala. Shasfing :~ | Ft tg used! ‘te Co-exclincile eee a USens, Ensusing thal -the: . , one another! a d to Pal Voleoene with Delo, nlegofly ¢- R delines inlegornty corélaatnile In ‘the délabose, Paslecdling Ft err Covatplion due ‘lo intorsislerst Updales 08 syeler fottures ee ee & Dalobose Axchttectune > AN Sol -bosed melattonat database application Involves use -*lew{oce. pe ecu of 4obles in +the ckilabase and a ae lolional ddlobase erent SySlern (RDBMS) reith a7 Sot Capability Sudihin the RDBMS ,SoL will be uses! do cneae the tables, tanslole veer gequests maintain the dala diclt and Syslern cotlolog updole and maintain the tables , gstablfeh Seeualty 7 i out back up ard secov poorecines sa relatisnal DAME CRD@MS) 7S o data re 4 Het stern —thot ‘rnplernents a selalicnad ¢ rene dole. ane Stowad 99 2 Collect 1 Model, ore Lene and the dala Melalionships are \ Role af Soe Je i E-fon +obles, i mepmesenled ot comnnnn values, not Hoks, j Poo >dhi ¢ dhe ontginn) puaposes the sol Soreloed ane 28 follewrs:- >To Spect{y -the Syriion and Semanlics 4 SOL dal. depintiion ond nan puleibian danquoges sto defhe the dole Shauclures and bosic cperitline fos designing - accessing » maintaining ,conteolling and Ppevledirg an Sol dailabase fo peovicle o vehicle for portability o dalboLase delinftion or application modules between Soe -rfing DBMS > Spectty bo hich pearl t dt} Podludle >TO peouicle an faftiol Standard » to tnclude Spaxttt- —calions sad handling Such topics 0% Nelenerol aritegnity » lansaclion warogement , Lsen-depined opentaloe s and Cone * Beneytl >Taatning an © anizaction Can Corventacile on one danguoge. a hogs laboz poo! 2 Ps Paves | ctonals bsalnedl ta @ Common danquoge weckies | netaining ushen Hiaing evo Erployees. | minienal and complele Slanclasde | ferent degaees 4 acloption in ® 2. ppooluctivity ois pejessionals con lean Sol ‘thowoughly and becemne proficient wstth Ho fon Continued Use and Since they ane gamflfan with ~the “anquoge n Wlh?ch 5 ane oritlen, Peogaromeens @n move quickly malotatn Existing “Progmens. 3. opplicaition postability +- 4 2 Appliatlions con be moved poo mackine tmochine ushen Goch mochine Uses got. fisrthes, Gt t4 Beonomicol fox the Compiiler Diffsent. DBMS onc Application pacy mose Eastly Commuricole ond Coupenile in rraraging Set sen IONS . cae ond pees SE * Sol Enhsonmerst an sol Enisonment fncludes on eee an Sol dlilabase ™ erent dere, along Ubtth the dalabases acestble that § DBMS arc! the vSena and moms thot ma4 use -thal DBMs 4to Access the dalohases, . > Gach ddlabase 16 Contatned 'p a Catalog , Which deserfbes any Obgfect thot f6 a pont gy the ddilabose , mragosra les s ¥ Lhich ane Credled that Obfe ct > dhe ‘learn Schema fs Not Cle defined in the GAancand it mou be taker tn erat 0 tombe) deseeipton gy the. Objects , Such ag-the bose lables Views, Condiaainis and Go 6 PIL moe thon oe Usen has Credited objects In the dabbese , ana? Goposrndtion abot all ) Lsens, Schernas usill Viet npoamechion per the Enlthe dalatase. NUNS CO @ 2£ach catalog must Contain an % cibion Schema, ushich dontauns oksealptons all Sdema: lin -the colalog , tables, Vewss allath es, pobvllages, | constsainls and dorrains the tgune below fs o Sienpliftia Scherralic 4 an Sal Envisonments a Regul a=. othe ‘operation Contained ty the aatale "5 mutta | the Dems as O mesult af the Sv Commonels ‘sued the UR And cles nox tine Conscious — action the User, to butld it. > USens Gain bepuse the Golo colents by cst G Select Ctalemeris 7 Pb Ss ee ees ee) ae ty DDdlo. cefirstion longuege: {> dhe Sol pt Psoviclas Commands pre int erelalibn Schemes, deleting sreldlions, Cedlié indices Onc Modifying melation schemes 1) pdo waripulsbien languege -—- > dhe Sol pml fnetudes a Ouery e based both the seleléerat algobsa and ‘the ‘ep a Coleubuss D Tt includes Commands -10 indent ,delele and Modify laples ty -the dela. hase paid coated loyguage Pdhese Commands help the 08a to Coral the | cdlabose and Srelude Cormands grant Zvoke privileges +o acess the aolobase Pasilicuon obfecls votthin the dolohose and to | Stone os semove bansnctions thal Looutl effect © the ddlakase v) Embectled dele maripulction ei >4he he Erbedted fer qj Sol fe dledigned spr Use usithin genesat —pupos® a language Such aS pet» COBOL, PRSCAL fOR TRON and ¢. VY) views9 NITION : sJhe Sor OPL fncluaks Commands Pp defining Views, vw fuithosgiion ¢ - Ihe Sol DDL includes tommands Gut Occese, AQgh’s to reloads and Views ie Pyg vi?) Dntegor'ety s— Sdhe oxtgira! stern -R Sequel l woge frcbuck 4 Comenands m ch fy fn ; é cores be RR Mp compen hp DNewen vessfons a Sol, Focluding the PNST Standlas d , powide cond a Limited per q | tntegont recking | vil) Tooncactioy Corkuot ¢ - >So. Includes rebeles comneronds per Spock} a the keginntng anc endér “hansoclions. Several aie 2acludéng IBM (sAA- 1) alloc Commands USed *n Bala bse “osious i fetes portess u % Shera arc) table clefénition * Dalobose Schesra.t- A Dalbbose Schema te desctibed jin a foomal lope: “fe Supported! ‘4 “the dalokase “anagernerit Sfslom (DBMs5> PIN @& Meldlfonal Ddlobose the scherno. dehines ~he tables , the _-fiells in Each “table, and the - © ane lalonships beéluccen pies and tables schemas ae fer Sicwed % Dalla eae saltiough O Stherna fs defined in ext dalabase Languoge, the “eam is Often used to aefer eo grephtcas! okepickion 4, the dalabage Struclune Sol cbf ines a calalog as a rammed Collection of Schemas but does not indicate how o csloling Shout -be dedined DDelining 0 calabase chemo. fm Col te Shsafghy foass00r6 table hos a spectie! Durcben 4 Qolurong hut Gan howe any Nurmben Ch Pouas | \ fae) eeu 5 tclerstffioa! 4y the tatues eppearing ion | OQ posilicutor Column Libse+ which has cheery | fake 2 S fe Q i cbntinfeed os a. unique a a @ 2h chilabose “berng ,a cable & Besponstbe Jor Ste5ng chila §n ~the dalabose .Dalobose tables Consist ~mUsS And Columns | Reus contains ach wecoxd tn the ‘table, and the | Column % desponsible tos defining the type ab. that into an & #4 Ui 3 >thestejore » i we need +t) add anew person to Ou table , ve Loud cnecle a news 20u9 with “the Percorig cletails ee a ithe Crock Table ' Duer! : >Ddual % an predefined Visliuol table ushich Contains one seu9 and one Column 7ey aa duat table Cdumn Aalatype fs Varchore > presally thio table f uted to lest pociorolity means to est prreclepired! Coa) Uxen defined -functions [fen chtonallity Testing] >And alco duct table % Used ‘lo gererele | the seguance numben from Sequence object | tn dual table we ant Pexfown Dm ‘ae | because cuol table 4s Pre -de fhe Vistial ‘table } | | Golsdesc duals Nome Null2 Type. | Dumeny Vorchan2t1) { | i Sol>select * fron dual, 2 | x | >To acklttale Such Caleulaiiions via @ Select, Cacle poovides a dureny table alled Hvac. Biamples Sgt >Select Qk 2 from duals : QKQ Output a | dhe Cunment dale an he obtained por tte lable dual fn tHe *equinec! -foormat 05 Choum -belovoe ISDATE ¢~ © edale fs 2 péeudo Column thot Contashs e Cunment dole and time. Te requiass no cagumenis naher Selected orn the toble. DUAL and velurns the cunment dole LEt+- Sons Select Sy sdolle porn clual Oullput Syspare 06 ~feB-9Q ee ee NON Ca * NULL valve Concepts 5 2 fs an Undefined sunknewn , unavailable valus| >And astithenclie opesnitions one Performed on null Values ~then tnt ustll become null onl oa Qa Column %9 O& table % OPHonal, we Can Insemt a new Delors ox dtpelotle an Busty, | Jecord usithout edbling ao value +o this Column) | dhie means that -the fed will he saxed with | a Nol value DNuL values axe treoled ifferentty form othes | values jenwl fs Used 26 a placeholden Jor Unknecn | oe frapplicable talues |NoTe¢- 7). fe met possthl to > NulZ and o; they ane not Gutalest a) a Column in a zou has no Va lire ters Uys |) Column fe Sard to be rullox to contain anol | > eny Osh thetic. Expaesston contaihing anulL | t i 6 Galvales to null ir Absa Tas, n frample ~ NvLL ackkes to lo fs nulls fojact,all | Peecipale of Hale olues ‘N)Sélling a null value ts appropéotla vahen the \ ach Uvlue fe enknowen iit) a NULL value fs not Equivalent to a | vuus al geno 4 -the alatotype 8g numbenord | Paces ‘h the dail type is Chosen lar) @ Nule value voll Gualuate to NvlL fo ony s5fon fgs-Null multeplted by to is NULL Null value GN be Ingsiled ‘le: Columns ol | den sire ea) -the Column 5 the UNIQUE FOREIGN REY: has a Nvlt value, ovacle cHeck Corskain {gnove. | peoy be Atlached to the Coluron, ee s Iw | ( 3elhat i Sot? Explain bevetly a |= Sex(ctauctuned Query anquoge ‘© 0 database language that is Compallcble uoith the RPBMs | and ft dlees not need to meleasn the basfes Ahem signals n > KOU > Ib another | py foom one nquoge j>dhus, te & : | S, fs meprsed “lo ax a posible larguoge eae enene nate ay Nhose Sysox cure) Command! Steuctune CHet cently | les, than oo ucorals) ane ae a a | shough gol have Several cliffererl afomng there ase. | minite differences amo their Clioralities | Nee ebetett ami ibe! cpesvilacl wa ae | >Basfendly , Sot Penrfosns the plowing functions: Dinecite table and ddlahose Stuctunes 1) Pearfexsn adblttton ,olelélion arc mock ection dablosd Souclines 110) pesrfcom oliffreutl |Corplex questes So tal Mus dale ges haneposrned Slo *ofooratkion seh ee Us these gpercliens coe Perifosned voithod Much human “fe andl they can be Categorized Sole “he ‘lasing Pail. Dafinttfon farpoge b) Dol. Marfpuldttor larpu oDaile Repinivfen lenguoge (DRL >DpL ae toa that Consist of Sol | Commands Jos the Creation 4, clallabote objects | like Tables, Views, Indexes »£tc. >Tt also Contains Commards that axe Used to Specify, access 2tphis +o thee dabkose objack, > dhe yelling ame the dhifferent ab. abfinition coment | fo Sols |1-CReate ScHenne RumioriZATion?- Ihis Comrrand ts Ose jor cnedhig a ciblase Schema | { 120 | Geatt Qa new table in the LSeag clalahase Scheme. Tt Snctudes the - Unlor Nulte- This Corshalet 6 Used Pr ersuaing 1) Unigues-Shis Congleaist %s Used por ersttng primary keys. this Congleatnt ¢ cuted spo REATe TARle:-Jfhig Cornmond ts Used fom lloustng Conélaaints -thett nut values do not Exist tn Any Colum then duplicate values. do net Safer an Any Column potty @a eco key fpr the. table W) foreign Key t-Shis Cohaint fe used pr Spectfitn a fovetin key Cfo o Colurred tm bble ) Defautre- dhfs corébatint 's usec! fsx Speshyig O delawt value im able vi) Checkk- Shig Conetsaint % Usedl Prictdaitirg cha. fn an alletbule | 38-CRente INDE: - Gig Command & Used prceating: an fader 7 oa table | Mt Repre view? dhis Gomerand ' Used fpr Ceali | la logfeot Subset of ale (orcoe/Columns) clenivedl fom ore ox mone tase tables 1 5 © 6 BUER Table t~ dbis Cormmand fe Used Fi Q tables definition 4 weblog tly ny the atteibiles | Corso ink | (6 Reare TABLE A8:- hig Command (6 Used fox ! | a table by using eee thal Els jn oe | Users celabase Suhemo. Beep JABLES- this Command is Used! ckléting an Table Po Porreresty S: Deep index t—fhis Command % Used PP Parorentty | cklelirg an Snokx (7-BRep viewle-Ihtg Command 's Used PP Porranentty a View +b) pate. masypulotion Coml)2- > Ome SPa age that consists Of Soe Comrne S $2.08 to perfsenn chile. Opendilions Like Ingeaxt rdelete, update and ebieve fr the chtakase tables | >the following are the difenent data manipulation © Gommands $m SOL + | knee Ts~ Ihe Command fg used sbs insesting Q anon | : a table P td }2.$elecre- dhs command ' Used tox eleching Some Seclfic atlithules pom the tables B.iieRes- this Command 1s axed 7pr Specifytn conclitions, on OW by Cees Cond ftonal Eqpomessions . | i \ | | H. Group Bye-dhis Command fs used for groups Some Speclfite lot [zxoves based! on the’ Spectfied Geouping conclf for 1S. dewng sis command ie used pr eae {Condt#fons On gxoups by ea] condlltoral apres 6.0RDER Bys- This Command f used pe cokeg Specific yours based on the Spectfecl oll (hulos +. Uppare s- Ths Comrmond %s usec! pr moslifgt 4 values o allihules in tabks : S.peleres- dhig Command fs usec! jer lei, mna6 from a table 4. Comte ghis Command % tet for Peamanentiy ' Qufrq the Changes §n the chibose (0. Rolt BacKt~ dhis cornmand fs Used Pr ae the obia fock to the Orghrot ob the pov algo wcluaks dome operas lke, ‘Yeerposfison opercilorsethese Cpencilows ane used fe conposting between M0 diffinent Expressrons Such opesniloss Include =,<,>2=5>=5,<2> i) lepfeo! eparotoss *~ dhese opearilowrs come uted fpr Lo cag two diffenent Expressions. Gch oper | Include ed, OR ard NoT |? Specto! Openctoss?— yedhese cpesuilors ase also Used pe Compaoring too ‘ Expressions, Such openaloss fnclucl the following : . w Deemieen'~his qpescilos {6 Used pied ee | an atheituG value lies wither the ne not DIN s-dhis Opescilow ts Used pe checking whetten an | attlatbute value matches any of the vedo tn the i Spechftiel list |i) Null §—Jhig operailos> f6 Used jf a Wheiten| | an allethte value zetumrs a null talus | waec- This opesalos fg Used j= checking Lihethes| [an atlhibuite value moitches a Speci Rillesr V) Ex'STa 8~ dhig opescilor is used eng the thes a Set woUs Osfutny ‘tions we 1 "ot salsfuing the: Conclil lus i) Distiners— jhie opemilos fs ted je vetslevtng unique, "9 duplic anus Lwalues from the tabk he. % | awn the final sesult Set. . ile Opeorcitcrss ¢ — | > dhese. cps, ane Used with the Selecr | Stdlernent and gerade. a vesult Set thot tnathernatically | Survrrenizes the Columns % the table lsdhe follosing ane the vegeta 590 lows, shel 1 S@et q “tt a “ra 4 Deounr :-dhfs openalos is Used # setroving toto! nu of tuples consisting of non null values in “he Spf £ Glam iin) minie-dhis, Openntis fs used for sebieing a mininuny value fon a set af values present fn the Secftead | | Column tin)opes—dhis operettom ts Used Berle fv) Sume— {hig openailos fe used Y) AVG E- ghis opemolo» 's usec) versiov’ PSce fs referee! to 0% a nen ~ Speci pies any the Sol fs L323 ce SOL-99 >A stancand Sor Called) ANST SOL Stordosds ts Sdhisg Gtandand $ also used by the Inlexreihforod Ooganteciiion -fos StandandfzationCiso) > dhe ovesnmnent and Conmmescibl chtahkose Seek _ -cations sequine the ecl ANSI [50 SOL. Stordond 6 ane rode to the Standard by most RDBms vendotts sdhus an Sol bated applicilfons Gn be mf lad snameliy from one RDBMs “lo another an | Perfesrrfing ony en Ga the Standond. i iN NN —™" vatne per a sl 4 yalues Present tn the Specified ee! by the prreStan Nlalfonal Stance trstiile, CANS) eT a Sum Ce au the \aluss paesert im the Speck Zo Column value ef all the velues Freaky in Be el le pore thal tng “that ane +o be penfemred without Specifying the Coy PRafoores 4 thern - dhe Cumrent vession | ~* DaTATYpES (SQL) ee entafées type of abl ino Colunn, > Dalla Stewed % a melahional cbilabote Gon de Stora) | using a vonks of dol. 25 > dhe pak oRACLE clala ‘pes ane AIUMBER VARCHAR, And GHAR Stovirg rumben ard Text dle. > Constant ,Vanfable » Nal parameles fos adda tape Calso Glled a type) that delesmines Ms St’ fosrmat , Conskainls volta vange of talus, and opendlions thot can be perrfesrreal or > SoL Provides reany prec, dala Upes and Sublypes. > dhe cle. ‘Types Supposed by GOL , axe, Fenbumente-s- Jhis dbiatype $5 used pw Storing oolo values , webich ane of type 'numbex!. F has Geet clifferert formals Uke» Dalunaben (LD)? Try thi , 2! alendles the number of dligils thal Gan be Incluckel and ‘b! obnots the | decimal place that 's to be Specified | > fos Example Numben6 3) Seciis thal the nurrhers thet Con be Slowed ufth -bsee clectol places ond | tray howe upto Six fs and also a Sip before | the decimal >Such type of dala ‘nclude the Pllousieg Bamples | 8195-94. 111 +2931-00 1 Minlegen sft Stoses only the filegen valunsg See, ) H deesnit frcluae decimal values Tt fs abetted 3 |e) Srna INT?~ Ft aleo Storms oty the thik but ont uflo a linfted value te. Uplo six §) Decinna C2,D) + T46 Spechpfoléns %S Simflan ‘to Number (2,D) But hene , the Stesoge lergths must be (Predlen Uke ; Decfrrasc 1a, 3) , Declnalc#,Q) , Btc., @.chamacler :- ghis abila type % used yox Sioa: cia values that ane of type Chonocless, Tt has several diffenent fosmals like Achanth):- 7 can Stowe a ffxecl—lenglh 7 Coil fer) foors, 1 t0 955 Chasxoclees + fox Instance, voackancis) Bowe Uuplo 16 Choraclers. But fh this ,the dale types cloesn't leave any Unused! | | i *S Space. Consequently, the RDEMs fe-, osack autorrotically Convesls Vanchan to Vazxchasia’) Spectifes thot fl can Stove uplo 1% Chonackes. [end ‘1 the Stating s cused 7 Cesttain Charackng 425% Chanacless -then the pean) Spaces \ ane left unused [22 fs Used 0 -to Store fixed! length alpha puree ——— ee i aS INT | | dito in byles srrartmum Ufmfl ts upto 2000 Aylés 2By cleppustt cha» dlotetype oad one bile | [eee Columorome ¢ _ Chaacenaxsig)| Be pchoat'o) - | [Sousnya. | (ste To [mTy [aT Tk Cy | Vezxchoonce) e% Vanchonacs)t Ff Gn Stowe a Varfobk th Chonacler leila. - foe: instance, VanchanCib) | Siose uplo 16 Chozadkss.But fo this, the dll types | doesn't leove any Unused Space. Consequently the | Rpanns e+, Ovacle automertfeally Convesls Ve to Vanchona . loft fs used to Stowe Vvaxfable ‘length alpha numese cata fn byles | Sitalmun Umtt fs ooo bylés 1 SHene verraining Spaces ane Autoren celleci af\ (3 yptox + t-Colurnorame Vvonchand(max 2)| Ty Vonchonacio) | &s- [name J" i [eco [sto Te |olyyo} ! : a no Leastage of memory BDalet Jie dela. type fs used Jor dale values fn the qulian foomat Tt Con focluce \eon month and day values. j Tt Is Used to Store doles §n osacle dole | foornot [ Syrians. colurmnrarne lee | >In osacle bydlefoust dale -foomal *s [BB=roon - VY | Hene mon fs menthrame 4 Tle t- dhts dala’ type fe Used yor Stoning the cola that Conta.ds foun, enue and Second Values, [5 Timestarmpe- dls dbilotype ’s sect Jos cee the data tat Contax® Yeon, rnevth, day, hour, } eofeute and Seen value s. 6 fleat:- jhig dota type fs lege for Stoatng the | dala that Contain cecal values it Reale-dhis dala. type fe Used Daal stoning -the | dala. that Confarhs 0 Single -psectsfon fieaiting | point numben. (Double peecison?- this dolatype f6 UBedd pe Stertng the daa thot contains a dasble -PPetion, Foaling point numben, ~ — — a = = 4. Inlesvols~ dis dala type fe used pr te | culo. +thot ref a Poortfauslon Peated of me. | has the pilewsing 1490 foro, | )Yean-month Mmiléats-7e stoxes the abla thal Gorstiing a Yeon, month os both values dos. time Interval? Tt Stoxes the dab. tat Contung a day , minule os Second values, (0. logical jhfs dala type & used jor Steatng the dala Values that Specty efthen a fue 8 flee value te Genrrencys—fhis dola. type fs Used je Stoning chil, Vvolues thot Ane or ee end feral 2. Qullonuecbert—Jhis clalatype fs used joo dala lalues that aulomdlt gererales 2 numdes, DH te basteally Supporiedl by ms. pccess 18. Sequence *- hig dala “ype fs usedl fp Stextrg the | chia. values tol ane fh a Sequence Orden, Tt & bash Supperiled Ay exocle, Hr LONG: Chanacler dale oF \osfoble Sfze Up t 26h in kergth only one long Column mag be ef ered [Pen | table LONG Coluumng ceo) not e Used ih Subqueries, [fanchions, 2xeperesstons, blhere Clauses, os indexes.9 be | Gntatrfng long dala ray not be clustered | ~ 47 15: long RAWs-Rans binoty data. othewutse the Same as LONG (used PrP frooges) 6. LONG VARCHAR? Somme as long ie Smaluinire- Sarre as Number Ig. Reni ésize)>- Rave Hroag cbib., Size byles long, mate Sire =a5 byes 9. RoNIDt- A value tHyt uniquely Blerstifies @ DUD In an ovacle cobbue fe fs setusnecl by the pseuclo_ Column RewiD: Table Columns mary 06 be Assigned ths ve Ne *pibfetenice Genter! HOR wRRCHBR sNoveRctineg | cee ) fixed length rrernenay Stosage CHAR takes up I hile pen chomac én B.use Chor vohen the dala eniies fm a Column ore Expected to be the Same Size a. EXs Declane ‘lest chanticc): test =" Tose” _ dhen Ntest” Occuples joo bylés fxst Pus bales With values and vest uhth blank dala wo vagctior |. Varfable length memo Stosage Khangechke) R. VARCHAR takes up | bye per chosaclin, +2 djles to hold length fo 3.Lanchan usher the dala Entsles ba Column ose Expected to vos Consfalesably fn Size A xe Declane “est Varchoncioo)s test = "Fest" - dhen “est” occupies Hab bylee + frrct foun leg os vole ancl other 400 &jles pr vanfoble length infosinotion VARCHAR + 1.8 repbocernent for van thos. $n news versions a osacle . ln. yarcine Con Sioze upto 000 bjles of Chamilars tohyle VARCHAR Con Store up lo dodo tiles Of Chonaclirs . 3. Of VARCHOR 36 Used {in declanalliion -then it cout occupy Space fox NULL Values, Tn Cose Saas dala. ‘ype ft voll not octuypy ony pace. EO a a eee NNN | Enlespotse Edftfon ig bétler to lood! crncle > Scott is the Username ashth fs available In Enilespaise Lditfon only pe i Bian | > foorn onacle log onusoencle USeaname Lott Ss: d (Tee POSSt20%% (Ten. | Al CAMO: Account loc kel * Unlock? Oo Bens— vserame (le ai GSE Possusd [Sys] Bs alee user Let! Account unlocks 2! Ssconn Scott [thes | Poscucoad ¢ tif Coniom Passconsd tigee >Heme Conn IS Connect > we usar to Shows the User, ther, Gel>showw User +2] Soiruses, fe “Scorr’ 1 we coat to Views all -tables | | (eee seleot fawn bs) a table fs ‘plage JP] oe Wart -to clear the Screen | [ancl sexs) | —.. O&. | the Sneen fs Cleaned) _ [9Sal Gan be dividkad fnlo © ator languages :. ® Dor (oi Defirirfon larguoge)s ~ >(reale | salle, > dlaigp > touncale ? vename (Or0cle 9) pm: Coch. Manipulation dorguoged¢~ ~> firsesit ~Pupdale ioe Cosacle 9%) op Dal %ehstal lorquoge.:- Select D Taoncachion conta! ( CTCL >Commft (Save) ra : sll back Cundo) > Sone |O nila Contact lo Cot) :- Grant Cyst pesrigsions) | sRevoke Caarcel pearniesions) | | | cereal es the creation of dlalobose objects [nBile Deysnftion Lenquage (20!) Comenondler- a lene woge ~that Censis & Sol | Dbl mepers to ! | | CED) like tables , Views, nolexes Ftc, 2H alse Contains Commands tat ane used to Speck adess Bis +o “these dalobose objecls « the all oxding ane the cbiffesenst otk aleiot-Hon Gmrrands | 19 Dl ppl Common ane used to clescaibe Stuctume Ccolumns) of the -table +corecile ¢ - | ott te Used +o Credle dalobose obfects ke tables, | Views, peocedunes Etc-, | Corecitin on stable Fyre nedile stable. 2 tableraone (tot cbse ge, cola cblotype(stze), ~---d8 | heme Col 4s. Column Exs- Sly eel ~tabl Neuyeor(Sno numbercin), rame VarchorAlios)s | < Table Creda 1ST view Stoudclune e| the tables — [ot wee Siting tebe | SOL> cesc ablenames | =Jhe Struclune 4 the Newsyere table is *~ i i | Sol>desc PeUMYEOR s | | | | ———— ae Name “nile “Np, Sno Nlurnber tio) Nase voachon20to) Syplee coetile Command (Spi fe ce cone CRepte table table-nameor chil At Constsaintt , . Cola ok 2 Cnehainte, (ors, chilalipe 3 Cordhaints, t Coln ck Censbaintn, PRomARY key Colt, cota ~~), ce IN key Colt, colg ~~) Gn Key cd cee tobe name on ConlsteAinty CorSleaint—name)s [walrere (>the ALTER TABle Command Makes all Changes ir | the Shudlune Y otabe. zt 16 follows by one 4 | the -follousing three keywords. | AoD-To © Column, “lo 0 teble | Mooifys- 7 charge Galuron chondlstites ¥ «table | [Deept-e delle 0. Columo fore on Bilsttng table. | add \ a i weet Se @ - Spe ALIER TABLE ‘tablenamne FADD /modrHy/3 Column name clip (Aceling & Celumm +0 0 tables | | PAN Existing 4, ne vou te lable Gan be altored by acting ene ox >In the above Borple, User @n ad! Meus column, Parned Erop — Ernalil to -the Errployee -lale as -follouss Spplon:clten table tatename acdlcott dabtipetstee), Col chitatpetsize), es eT we usant to ack only one. Column ‘ito “the " Siisting table. dhen Soisaltee table pees adel Gal rambesttods | Table altired Solvdesc newyears Name nlult 2 TRpe_ Sno Nlumbes Co) Name Varchonacie) Sat NurbesCio) Con) 3D ue usart to add only ene Column félo the j Suisting fable - dher joe : Sol7 alle table newyeos. doll (Salt neurone) ) -table altered Sol >dese Meuayeaa.s Nome Nolte Npe_ Sno NumBeRCo) Nome VARCHERAUO) SAL NUMBERCIO) Su NumBercio) Exe golsaliee -table Meusyeor add S6rome Vaschorstio) Seat Numbeaciode Eascee invalid alter -tabe. Option Resons- I, the aboe Siorple we one ca -tusg Coluumnng “>So, ff use sont lo Coll 4us0 Cox) mone-than 1 fiom Colunens Solo the Existing table we Show | Use posonthests, [Solsaltéa table Neuyens add srame \bachoratie) | Ssal — nurmbescio))¢ i 7 el | Table allered. | | Wr velese ; Sol >close Meusyens 5 Null? “pe — rurmbeacto) Narne VARCHARQCO) | Sex Number Coo) Sant rumbeacio) Salome varcharrcis) Sa Numbe22010) News. TE 6 posstble ‘to ackl number of Colurns trl -the table at lost positfen only but pst to middle 4 -the -table Ete-7) the toble Contains the columns So, Same. 4 woe wont io Ok! St Colurnn into Hat abe tan CO Crore) alte) Fovortfng @. Columeb wala types PATER TABIE Command Can Clo be Used to Corge Columns cto. “pe. (ox) Colum leila: Sie. oly elane— ates table tablename. rod ify (Colt, letedyr Ca) | Cola clotaiye (Sie), a= = =28 = Bey toe sant -to modify only ene Colurory cbilatype . Sol>allé. table newer a Sno voachoaQUeds | table alfexed iL 4 Sl>cese Neus pass Name. NULL? Sno Name SAL Ssnio SenlAme SeAL SAL Se use usant to rrodity tw Cox) rnote thou tux. NPE. VORCHARACIO) VARCHARQCIO) NlUMBERCID, NomeERCIO) VERCHORQLIO) Novum BERCIO) NUMBERCIO) Glurnn chitetypes then oe Stow! tse posenthests othensise TH ges Seam a "eval aller abl: option! Solsalteg table rewigria oe aa numberciods | Sd vaschoa Xctos)s table allerel Sot>desc Neumerrs | Name. Nutt Npe SNo - VERCHERAMD) Name ‘ NuMBERCIO) Seb VARCHAR Q (to) SsNo NUMBER Clo) SaNAme VARCHAR (10) ScaL AIUMBER CID) SALL NemBercio) EX Sol cuttén lable newyears rectly Sno Vaschoaaaoy table alleaed Solsdesc Meuyeors Narne cee eos Sno VARCHARA20) Name NUMBERCIO) SA VORGHPRALIO) Sénlo NUMBER( (0) ee VERCHARAIO) Sse NomeeRco) SAU NomBeRt0) *dn -the above Gample Sho hasing dallodype sige & Charged foo vaschoaaug to Waachaxa620): Nob ¢~ We can e, foorn one dala pe to arothes, pe pUthen the elated Column fe rnply (es) toher | _ the ‘melded Column fg 2m shen only we Can Charge fren me cblolpe to Another dabrtype Exe Slo Nterne | 6 dhe abwe table Conlaing nusmbea clatotype 10 SNO & Neschor, e to Rame lumn >a ase sant to rroalify Sno numbeq loilodype 4to varchar (ow) any othes obdalype oihey than number Cor) TD we oant +o modr, nore, a veachas chia +o any other dolatipe other than \aschaa, then tt | qves an e120 AS | Ganozs. Column ‘to be modified must be Empby to | charge ablatype. *DeapING @ Column ‘fox a lables >Tt fe used to dep cela Columns folo the | Sudaténg table Gethede— Ty we Wart to coop a "strale colusnl al a Life whthout using Ponarrthesta ws > -follouch Spe Sylax e- alle, table teblerame dbp © Calum laroranes Tn -the aboe Siren Column 5 el | 2%¢- Sot salle, tale — Neusyenx dep colurnn Gals doable altined SeL>desc rensyense Nasne Nolte Type Sno VARCHAR A(20) Nane- Num GeRUd) Ssnio NUMPERCIC) Ssname VARCHARALIC) ae NuUMBERCIO) SALL Num BERCIO) method © :- coe coant to chop a Single Go) reldiple Columns poith vin postarthest s ue ane Using foleuseg Sinbox Sypbss- alter - “table ‘tabbrame bepCott Col, ~ --~)5 | Eee Sot>alBn any rewyena dep (EN, SExlAME, AL) 23] doable allered Sols dese. meunyenn 5 | ia i anae eSOIED Ape. 1 Skto VARCHAR QWN0) Nee NUMRERCIO) | Celt. NUMBERCIO) | Sy sGolsalle, table revsyeas ceopGart); J Table alliad lsdesc NeLOyEn ; Nome Nol? pe. Snio VERTHARR(Q0) nlame- NUMBER) Note s— tue Cannot deo AU Columns % a table aT) cur able Contains oly one. Colunnn then Comet clamp that Column HQRope- STL fs Used to Berne meee Obits fon ctibbog [Splars—chop _obfecttype coop objecttype objectrames i Exe- chop table. tablename - Exs-Cemp pootedune Portedinercne Eye cloop Views viewsname + L @® Ng e—Uple oracle Clog) Y we usart to delete table, then fable fg deleled Pemmoarentig “fom omnele lop tp hene table %e Clie table fs moved +b Reqgle Bint) 2D) woe coat to get H back i, Reycle alee | Sydlea—floshkack able Teblename | |__ #0 _befowe chops. _ hene to, befone ane teypaonds: ¥ gbep fable Pexvanertlys— | [ere for foo oracle Clog) Sols tos table memsyeors able clooppedt Solzclese Meusyeors Easong Object Newyeor does not Exist ¥ Sots flashback table. neusyear do bofone . eps) Ffloghbock Corple Golrclese newyeors Norme Noltp Ne. - Kio Num Berto) % Spt >chsop table nevoyene Pusge | ble chepped Sl sdese Meusyeors Ba0r+-obfect newsyeaa does Mol Silat | Note e- 4 “the Table fs eer chappeed then use. can't ge Gt fon wecyele bin (0%) fom ony ushene so we can complete the Command 6 urge ° L> chop table eucyen Puage s Ofles this we Conk use & BHloflashtork table newwyn2 to before chop. Dbheranse nznolig -the table nie leeppec! * Teuncale e_ this Command 's used to cbléle “Yatatdib perrone feo the table but. Columns ane not deleted axe touncale table Jablerame ¢ Ke Gorrcnecite table NeurReay as select * from Eps °r) dhe. rneantn 4 the abeve Sol Command f6 the dala udlich fs avallable fn Emp, 's altg cwaibble §n Mevoyjeng table cradled Sol> select fore feces scat “feb | man. pinecone | sa. [amma «(plo 909 |N-Dee-fo | Bao | 0 1 SPIESIAN F698 12o-pb 20 | 200 26 Warp |Sevesmet| | te9e [98-Pb-s1 199 | geo |30 663 |ypnies ree 1659 ODA Saas i ie feed martin | Salesman! ma Bes) 29> 1400 ‘ps 1698 | Blake | menage | \ “#629 en rRY-6) jasso l30 (HER | eek meningee 7639. bon, ijet81 |auso ho A686 | ScoTr | anedyst | 1566 lia. ~Ape-6H | 2000 loo [729] king | Pees! Iu. nisi | Sooo | i is BHY |-orner Here jADAMS [CERK HSE parray $3) W100 20 [4900 |YJemes \clerk |469% lea.tec-s1 Aco ! 30 P1802, fERD |ANBNNET | 3o06 e8.DeS) \g00 26 49By | Miller | Clerk [36a [P3-drisa/ B00 | 'o yt Pai " Seleéled Solstauncote -table moe oo Table tuncailed SoL>select -x form neiwyenr, / No wows Seleiled Sdsdesc. et (aca Name. NuLeg ‘pe. Tt §5 Used to bename atable and derame a Shleonen\ 169% os-sep-si isco | 0 | 20 | _ —.

You might also like