欢迎来到天天文库
浏览记录
ID:49601774
大小:151.73 KB
页数:49页
时间:2020-03-02
《db2学习总结文档.docx》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、`1.Adatabasemanagementsystemprovidesasetofintegrateddatamanagementservicesortoolswhichareusedtomaintainandmanagelogicalgroupingsofdataorinformation.Inthisbranchofmathematics,atableiscalledarelation.2.Codd'soriginaltheorywasbasedon12principles.(1)ThefirstisthatalldatainanRDBMSi
2、sstoredintables.(2)Anotherprincipleisthatyouneedalanguagetoretrieveormanipulatedatainthesetables.ThislanguageisknownasSQLandispartoftherelationaltheory.3.Atableconsistsofcolumnsandrows.Columnsaretheattributesoftheentity.Theyarethesameforeveryparticularinstanceoftheentity.Every
3、particularinstanceoftheentityisarow.Rowsarenotusuallystoredinanyparticularorder.Thereisonlyonevalueateveryrowandcolumnpositioninatable.Thismeansthatalldatavaluesareatomic.4.Theremustbesomewaytoidentifyuniquelyjustoneinstanceorrowofatableinordertomanipulatethedatainit.Theunique
4、keywillallowyoutodojustthat.5.TherearetwotermsyoumayheartodescribeSQL.Thefirstisnon-navigational.ThismeansthatyouonlyneedtotellDB2,throughSQL,whatdatayouwant.YoudonotneedtospecifyhowDB2istogetthatdata.Byusingtheoptimizer,DB2determinesthebestaccesspath.Forexample,itdecideswheth
5、ertouseanindextoretrievedata.SQLisalsoanon-procedurallanguage.AprocedurallanguageisaprogramminglanguagesuchasCorCOBOL.SQLisnotaprogramminglanguage.Itdoesnotdoloopingorgothroughextensiveif-then-elsestepsonerecordatatime.SQLhandlesasetofrecordsinatableandcanbeembeddedintoaprogra
6、mminglanguagetotakeadvantageofthecapacityofthelanguagetocarryoutprocedurallogiconthatdata.6.DataManipulationLanguage(DML)allowsyoutoretrieveandmanipulatedata.SELECTisyourbasicreadstatement.BothSELECTandUPDATEworkatthecolumnlevel.INSERTandDELETEfunctionattherowlevel.DataDefinit
7、ionLanguage(DDL)allowsyoutoCREATEandmaintainthephysicaldatastructuresorobjectsinyourdatabase.YouCREATEatableorindex.TheALTERstatementallowsyoutoaddacolumntotheendofatable.Ifyounolongerneedanobject,youcansimplyDROPthatobject.ControlLanguageprovidesthecontrolstatementsthatgovern
8、datasecurity.YoumustbeauthorizedtousevariousobjectsinDB2.Youn
此文档下载收益归作者所有