1DatabaseSystems1.FundamentalConceptsofDatabaseDatabaseanddatabasetechnologyarehavingamajorimpactonthegrowinguseofcomputers.Itisfairtosaythatdatabasewillplayacriticalroleinalmostallareaswherecomputersareused,includingbusiness,engineering,medicine,law,education,andlibraryscience,tonameafew.Theworddatabaseisinsuchcommonusethatwemustbeginbydefiningwhatadatabaseis.Ourinitialdefinitionisquitgeneral.Adatabaseisacollectionofrelateddata.Bydata,wemeanknownfactsthatcanberecordedandthathaveimplicitmeaning.Forexample,considerthenames,telephonenumbers,andaddressesofallthepeopleyouknow.Youmayhaverecordedthisdatainanindexedaddressbook,oryoumayhavestoreditonadisketteusingapersonalcomputerandsoftwaresuchasDBASEIIIorLotus1-2-3.Thisisacollectionofrelateddatawithanimplicitmeaningandhenceisadatabase.Theabovedefinitionofdatabaseisquitegeneral;forexample,wemayconsiderthecollectionofwordsthatmakeupthispageoftexttoberelateddataandhenceadatabase.However,thecommonuseofthetermdatabaseisusuallymorerestricted.Adatabasehasthefollowingimplicitproperties:.Adatabaseisalogicallycoherentcollectionofdatawithsomeinherentmeaning.Arandomassortmentofdatacannotbereferredtoasadatabase..Adatabaseisdesigned,built,andpopulatedwithdataforaspecificpurpose.Ithasanintendedgroupofusersandsomepreconceivedapplicationsinwhichtheseusersareinterested..Adatabaserepresentssomeaspectoftherealworld,sometimescalledtheminiworld.Changestotheminiworldarereflectedinthedatabase.Inotherwords,adatabasehassomesourcefromwhichdataarederived,somedegreeofinteractionwitheventsintherealworld,andanaudiencethatisactivelyinterestedinthecontentsofthedatabase.Adatabasecanbeofanysizeandofvaryingcomplexity.Forexample,thelistofnamesandaddressesreferredtoearliermayhaveonlyacoupleofhundredrecordsinit,eachwitha2simplestructure.Ontheotherhand,thecardcatalogofalargelibrarymaycontainhalfamillioncardsstoredunderdifferentcategories-byprimaryauthor’slastname,bysubject,bybooktitle,andthelike-witheachcategoryorganizedinalphabeticorder.AdatabaseofevengreatersizeandcomplexitymaybethatmaintainedbytheInternalRevenueServicetokeeptrackofthetaxformsfiledbytaxpayersoftheUnitedStates.Ifweassumethatthereare100milliontaxpayersandeachtaxpayerfilesanaverageoffiveformswithapproximately200charactersofinformationperform,wewouldgetadatabaseof100*(106)*200*5characters(bytes)ofinformation.AssumingtheIRSkeepsthepastthreereturnsforeachtaxpayerinadditiontothecurrentreturn,wewouldgetadatabaseof4*(1011)bytes.Thishugeamountofinformationmustsomehowbeorganizedandmanagedsothatuserscansearchfor,retrieve,andupdatethedataasneeded.Adatabasemaybegeneratedandmaintainedmanuallyorbymachine.Ofcourse,inthiswearemainlyinterestedincomputerizeddatabase.Thelibrarycardcatalogisanexampleofadatabasethatmaybemanuallycreatedandmaintained.Acomputerizeddatabasemaybecreatedandmaintainedeitherbyagroupofapplicationprogramswrittenspecificallyforthattaskorbyadatabasemanagementsystem.Adatabasemanagementsystem(DBMS)isacollectionofprogramsthatenablesuserstocreateandmaintainadatabase.TheDBMSishenceageneral-purposesoftwaresystemthatfacilitatestheprocessesofdefining,constructing,andmanipulatingdatabasesforvariousapplications.Definingadatabaseinvolvesspecifyingthetypesofdatatobestoredinthedatabase,alongwithadetaileddescriptionofeachtypeofdata.ConstructingthedatabaseistheprocessofstoringthedataitselfonsomestoragemediumthatiscontrolledbytheDBMS.Manipulatingadatabaseincludessuchfunctionsasqueryingthedatabasetoretrievespecificdata,updatingthedatabasetoreflectchangesintheminiworld,andgeneratingreportsfromthedata.Notethatitisnotnecessarytousegeneral-purposeDBMSsoftwareforimplementingacomputerizeddatabase.Wecouldwriteourownsetofprogramstocreateandmaintainthedatabase,ineffectcreatingourownspecial-purposeDBMSsoftware.Ineithercase-whetherweuseageneral-purposeDBMSornot-weusuallyhaveaconsiderableamountofsoftwaretomanipulatethedatabaseinadditiontothedatabaseitself.Thedatabaseandsoftwarearetogethercalledadatabasesystem.2.DataModelsOneofthefundamentalcharacteristicsofthedatabaseapproachisthatitprovidessomelevelofdataabstractionbyhidingdetailsofdatastoragethatarenotneededbymostdatabaseusers.Adatamodelisthemaintoolforprovidingthisabstraction.Adataisasetofconceptsthatcanbe3usedtodescribethestructureofadatabase.Bystructureofadatabase,wemeanthedatatypes,relationships,andconstraintsthatshouldholdonthedata.Mostdatamodelsalsoincludeasetofoperationsforspecifyingretrievalsandupdatesonthedatabase.CategoriesofDataModelsManydatamodelshavebeenproposed.Wecancategorizedatamodelsbasedonthetypesofconceptstheyprovidetodescribethedatabasestructure.High-levelorconceptualdatamodelsprovideconceptsthatareclosetothewaymanyusersperceivedata,whereaslow-levelorphysicaldatamodelsprovideconceptsthatdescribethedetailsofhowdataisstoredinthecomputer.Conceptsprovidedbylow-leveldatamodelsaregenerallymeantforcomputerspecialists,notfortypicalendusers.Betweenthesetwoextremesisaclassofimplementationdatamodels,whichprovideconceptsthatmaybeunderstoodbyendusersbutthatarenottoofarremovedfromthewaydataisorganizedwith