【精品】it专业英语unit9 database(可编辑.ppt
IT专业英语UNIT9 DatabaseUNIT 9 DatabaseUNIT 9 DatabaseUNIT 9 Database9-1 Technical Part 9-1-1 DefinitionAdatabaseisalsocalledanelectronicdatabase,referringtoanycollectionofdata,orinformation,thatisspeciallyorganizedforrapidsearchandretrievalbyacomputer.Adatabasehasthefollowingimplicitproperties:UNIT 9 DatabaseAdatabaseisalogicallycoherentcollectionofdatawithsomeinherentmeaning.Arandomassortmentofdatacannotbereferredtoasadatabase.Adatabaseisdesigned,built,andpopulatewithdataforaspecificpurpose.Ithasanintendedgroupofusersandsomepreconceivedapplicationsinwhichtheseusersareinterested.Adatabaserepresentssomeaspectoftherealworld,sometimescalledtheminiworld.Changestotheminiworldarereflectedinthedatabase.UNIT 9 DatabaseUNIT 9 DatabaseUNIT 9 Database2.BankingandFinanceBanking:forcustomerinformation,accounts,loans,andbankingtransactions.Creditcardtransactions:forpurchasesoncreditcardsandgenerationofmonthlystatements.Finance:forstoringinformationaboutholdings,sales,andpurchasesoffinancialinstrumentssuchasstocksandbonds;alsoforstoringreal-timemarketdatatoenableonlinetradingbycustomersandautomatedtradingbythefirm.UNIT 9 Database3.Universities:forstudentinformation,courseregistrations,andgrades(inadditiontostandardenterpriseinformationsuchashumanresourcesandaccounting).4.Airlines:forreservationsandscheduleinformation.Airlineswereamongthefirsttousedatabasesinageographicallydistributedmanner.UNIT 9 Database5.Telecommunication:forkeepingrecordsofcallsmade,generatingmonthlybills,maintainingbalancesonprepaidcallingcards,andstoringinformationaboutthecommunicationnetworks.Asthelistillustrates,databasesformanessentialpartofeveryenterprisetoday,storingnotonlytypesofinformationthatarecommontomostenterprises,butalsoinformationthatisspecifictothecategoryoftheenterprise.UNIT 9 DatabaseData ModelsUnderlyingthestructureofadatabaseisthedatamodel:acollectionofconceptualtoolsfordescribingdata,datarelationships,datasemantics,andconsistencyconstraints.Adatamodelprovidesawaytodescribethedesignofadatabaseatthephysical,logical,andviewlevels.Thereareanumberofdifferentdatamodels.Thedatamodelscanbeclassifiedintofollowingcategories:UNIT 9 Database1.RelationalModelTherelationalmodelusesacollectionoftablestorepresentbothdataandtherelationshipsamongthosedata.Eachtablehasmultiplecolumns,andeachcolumnhasauniquename.Tablesarealsoknownasrelations.Therelationalmodelisanexampleofarecord-basedmodel.Record-basedmodelsaresonamedbecausethedatabaseisstructuredinfixed-formatrecordsofseveraltypes.Eachtablecontainsrecordsofaparticulartype.Eachrecordtypedefinesafixednumberoffields,orattributes.Thecolumnsofthetablecorrespondtotheattributesoftherecordtype.Therelationaldatamodelisthemostwidelyuseddatamodel,andavastmajorityofcurrentdatabasesystemsarebasedontherelationalmodel.UNIT 9 Database2.Entity-RelationshipModelTheentity-relationship(E-R)datamodelusesacollectionofbasicobjects,calledentities,andrelationshipsamongtheseobjects.Anentityisa“thing”or“object”intherealworldthatisdistinguishablefromotherobjects.Theentity-relationshipmodeliswidelyusedindatabasedesign.UNIT 9 Database3.Object-BasedDataModelObject-orientedprogramming(especiallyinJava,C+,orC#)hasbecomethedominantsoftware-developmentmethodology.Thisledtothedevelopmentofanobject-orienteddatamodelthatcanbeseenasextendingtheE-Rmodelwithnotionsofencapsulation,methods(functions),andobjectidentity.Theobject-relationaldatamodelcombinesfeaturesoftheobject-orienteddatamodelandrelationaldatamodel.UNIT 9 Database4.SemistructuredDataModelThesemistructureddatamodelpermitsthespecificationofdatawhereindividualdataitemsofthesametypemayhavedifferentsetsofattributes.Thisisincontrasttothedatamodelsmentionedearlier,whereeverydataitemofaparticulartypemusthavethesamesetofattributes.TheExtensibleMarkupLanguage(XML)iswidelyusedtorepresentsemistructureddata.UNIT 9 Database5.XMLDatabaseAnXMLdatabaseisadatapersistencesoftwaresystemthatallowsdatatobestoredinXMLformat.Thisdatacanthenbequeried,exportedandserializedintothedesiredformat.XMLdatabasesareusuallyassociatedwithdocument-orienteddatabases.OConnellgivesonereasonfortheuseofXMLindatabases:theincreasinglycommonuseofXMLfordatatransport,whichhasmeantthat“dataisextractedfromdatabasesandputintoXMLdocumentsandvice-versa”.Itmayprovemoreefficient(intermsofconversioncosts)andeasiertostorethedatainXMLformat.UNIT 9 DatabaseTwomajorclassesofXMLdatabaseexist:XML-enabled:thesemapallXMLtoatraditionaldatabase(suchasarelationaldatabase),acceptingXMLasinputandrenderingXMLasoutput.Thistermimpliesthatthedatabasedoestheconversionitself(asopposedtorelyingonmiddleware).NativeXML(NXD):theinternalmodelofsuchdatabasesdependsonXMLandusesXMLdocumentsasthefundamentalunitofstorage,whichare,however,notnecessarilystoredintheformoftextfiles.UNIT 9 Database6.MultimediaDatabaseMultimediadatatypicallymeansdigitalimages,audio,video,animationandgraphicstogetherwithtextdata.Theacquisition,generation,storageandprocessingofmultimediadataincomputersandtransmissionovernetworkshavegrowntremendouslyintherecentpast.UNIT 9 DatabaseThehugeamountofdataindifferentmultimedia-relatedapplicationswarrantedtohavedatabasesasdatabasesprovideconsistency,concurrency,integrity,securityandavailabilityofdata.Fromanuserperspective,databasesprovidefunctionalitiesfortheeasymanipulation,queryandretrievalofhighlyrelevantinformationfromhugecollectionsofstoreddata.UNIT 9 DatabaseMultiMediaDatabases(MMDBs)havetocopeupwiththeincreasedusageofalargevolumeofmultimediadatabeingusedinvarioussoftwareapplications.Theapplicationsincludedigitallibraries,manufacturingandretailing,artandentertainment,journalismandsoon.Someinherentqualitiesofmultimediadatahavebothdirectandindirectinfluenceonthedesignanddevelopmentofamultimediadatabase.UNIT 9 DatabaseMMDBsaresupposedtoprovidealmostallthefunctionalities,atraditionaldatabaseprovides.Apartfromthose,aMMDBhastoprovidesomenewandenhancedfunctionalitiesandfeatures.MMDBsarerequiredtoprovideunifiedframeworksforstoring,processing,retrieving,transmittingandpresentingavarietyofmediadatatypesinawidevarietyofformats.Atthesametime,theymustadheretonumericalconstraintsthatarenormallynotfoundintraditionaldatabases.UNIT 9 DatabaseConcept of DBMSAdatabasemanagementsystem(DBMS)isasoftwarepackagewithcomputerprogramsthatcontrolsthecreation,maintenance,anduseofadatabase.Itallowsorganizationstoconvenientlydevelopdatabasesforvariousapplications.Adatabaseisanintegratedcollectionofdatarecords,files,andotherobjects.ADBMSallowsdifferentuserapplicationprogramstoconcurrentlyaccessthesamedatabase.DBMSsmayuseavarietyofdatabasemodels,suchastherelationalmodelorobjectmodel,toconvenientlydescribeandsupportapplications.UNIT 9 DatabaseIttypicallysupportsquerylanguages,whichareinfacthigh-levelprogramminglanguages,dedicateddatabaselanguagesthatconsiderablysimplifywritingdatabaseapplicationprograms.Databaselanguagesalsosimplifythedatabaseorganizationaswellasretrievingandpresentinginformationfromit.ADBMSprovidesfacilitiesforcontrollingdataaccess,enforcingdataintegrity,managingconcurrencycontrol,andrecoveringthedatabaseafterfailuresandrestoringitfrombackupfiles,aswellasmaintainingdatabasesecurity.UNIT 9 Database9-1-3 Application Case or ExampleSQL Server MonitorMicrosoftSQLServerisarelationaldatabase-managementsystemthatscalesfromlaptopsanddesktopstoenterpriseservers,withacompatibleversion,basedontheWindowsMobileoperatingsystem,availableforhandhelddevicessuchasPocketPCs,SmartPhones,andPortableMediaCenters.UNIT 9 DatabaseSQLServerprovidesasuiteoftoolsformanagingallaspectsofSQLServerdevelopment,querying,tuning,testing,andadministration.MostofthesetoolscenteraroundtheSQLServerManagementStudio.SQLServerManagementStudioprovidesacommonshellforadministeringallservicesassociatedwithSQLServer,whichincludesDatabaseEngine,AnalysisServices,ReportingServices,SQLServerMobile,andIntegrationServices.UNIT 9 DatabaseSQL(StructuredQueryLanguage,referredtoassequelorbythelettersS-Q-L)isalanguagethatgivesusersaninterfacetoarelationaldatabasewheretheycanfindandprocessdatastoredwithin.Atthepresenttime,itisthemostwidelyuseddatabaselanguage.UNIT 9 DatabaseInthedatabase,informationisstoredintablesthataremadeupofmanycolumnsandrows.Eachcolumnhandlesaspecifictypeofinformation,andeachrowrepresentsarecordenteredintothetable.Arowmayrepresentacustomer,andeachcolumnmaycontainspecificsaboutthatcustomer.UNIT 9 DatabaseMicrosoftSQLServerisapackagedbrandofSQLthatmanycompaniesuseanddependonfortheirdailyoperation.WhenacompanyinstallsSQLServer,itisusuallyusedforseveralpurposes,withtheserveradministratorcreatingadatabaseforeachuse.FormoreinformationaboutMicrosoftSQLServer,visitM:UNIT 9 Databasehttp:/ 9 DatabaseNomatterwhichversionofSQLServeryouuse,youshouldalwaysbeconcernedwithitsproperfunctionandconstantavailability.Withoutit,theinformationinthedatabasecannotberetrievedandmanyofyourapplicationsthatrelyonthedatabasewillsimplynotwork.UsinganetworkmonitoringtoollikeWhatsUpGoldPremiumEditionyoucankeepaconstantwatchoverspecificitemsorparametersinyourSQLserver.Thefollowingsectiondescribestheapplicationandhowyoucanuseittomonitoryourdatabases.UNIT 9 DatabaseMonitoring SQL Server WhatsUpGoldStandardandPremiumEditionscanmonitorandreportthestatusofthestandardservicesassociatedwithstandardTCP/IPservers,suchasSMTP,POP3,andIMAP,FTP,HTTP.Ifanyoftheseservicesfail,youruserswillbeunabletogetmail,transferfiles,orusetheweb.Itisagoodideatosetupmonitoringontheseservicessothatyouarethefirsttoknowiftheyfail.UNIT 9 DatabaseTheSQLServerMonitorextendsmonitoringtoparametersreportedbyMicrosoftSQLServer(andMicrosoftMSDE),allowingyoutogetanearlywarningofadegradationinperformance.Forexample,youcanmonitorsystemparametersonyourSQLServerdatabaseservertoseeifperformanceiswithinanexpectedrange,andifnot,youcanintervenebeforetheSQLServerfails.Inotherwords,youcandetectaloomingproblembeforeitcausesanapplicationorservicefailure.TheSQLServerMonitorsupportsmonitoringofMicrosoftSQLServer2000orlaterversions,andMSDE2000orlaterversions,whichcanbeonanymachineinyournetwork.UNIT 9 DatabaseGetting Started With the SQL Monitor BeforeconfigureuringyourSQLmonitor(s),youshoulddeterminewhichparametersandservicesyouneedtomonitor.Youshouldalsoconsiderwhetheryouwanttocreateasinglemonitorwithmultipleparameters,severalmonitorswithoneparameterorservice,oracombinationofthetwo.Ifyoucreateasinglemonitortowatchalloftheparameters,youwillnotknowwhichparameterhastheproblemuntilyoudoalittleresearch.Thereismoresetuptimewiththeotheroptions,butthetroubleshootingtimeisgreatlyreduced.UNIT 9 DatabaseNote:Tousesomeoftheparameters,youmustconfigureyourSystemDataSource(ODB)namefortheSQLServer.ThisisdoneintheWindowsDataSources(ODB)Administrator.Duringthecreationofyourmonitors,youalsoassignthealertsandactionsyouwantWhatsUptofirewhenoneofthemonitorsgoesdown.UNIT 9 DatabaseUNIT 9 DatabaseConfiguring a SQL Monitor ToconfigureaninstanceoftheSQLServerMonitor,youmustfirsthaveWhatsUpGoldPremiumEditioninstalled.Then:1.FromtheConfiguremenu,selectActiveMonitorLibrary.2.TheActiveMonitorLibraryisthestartingpointforcreatinganyActiveMonitorinWhatsUpGold.ThisdialogshowsalloftheActiveMonitorsinyourdatabase.UNIT 9 Database3.AddanSQLmonitor:ClickNew.TheSelectActiveMonitorTypedialogappears.SelectSQLServiceMonitorandclickOK.TheNewSQLServiceMonitor(SeeFigure9-1)dialogappears.UNIT 9 Database4.Selecttheparametersandorprocessestoaddtothemonitor.OncetheActiveMonitoriscreated,youcanassignthatmonitortothedevicerepresentingthecomputerrunningtheSQLServer.Youmayalsousethemonitorduringdevicediscovery.UNIT 9 DatabaseFigure9-1NewSQLServerMonitorUNIT 9 DatabaseAn ExampleTomonitoruseractivity,wellcreateamonitorcalled“SQLUser,”thenselectUsersastheonlyparametertomonitor.1.AccesstheSQLServerMonitorpropertiesasdescribedinthesectionabove.2.Namethemonitor“SQLUser.”UNIT 9 Database3.MakesurethatUsersistheonlyparameterthathasacheckintheboxtothelefttoit.Youwillneedtocleartheselectionsfortheotherparametersandalsofortheprocesses.4.ClicktheUsersparametertoselectit,andthenclickConfigure.TheUsersThresholddialogappears.Youshouldhaveinmindhowmanyusersorconnectionsyouwanttoconsiderasathreshold,andenterthosevaluesintheappropriateboxesonthedialog.UNIT 9 Database5.Whenfinished,clickOKtoaddtheSQLUsermonitortotheActiveMonitorLibrary.Oncethemonitorhasbeencreated,youarereadytoaddthe“SQLUser”monitortoyourSQLserverdevice.1.SelectthedevicethatrepresentstheSQLserver.Double-clickthedevicetodisplayitsproperties.2.SelecttheActiveMonitorsicon.3.OntheActiveMonitordialog,clickAdd.TheActiveMonitorwizardappears.4.Followthewizardtoaddtheactivemonitortothedevice.UNIT 9 Database9-2 Reading Material 9-2-1 Reading comprehensionApplication Programs and User InterfacesAlthoughmanypeopleinteractwithdatabases,veryfewpeopleuseaquerylanguagetointeractwithadatabasesystemdirectly.Themostcommonwayinwhichusersinteractwithdatabasesisthroughanapplicationprogramthatprovidesauserinterfaceatthefrontend,andinterfaceswithadatabaseatthebackend.UNIT 9 DatabaseSuchapplicationstakeinputfromusers,typicallythroughaforms-basedinterface,andeitherenterdataintoadatabaseorextractinformationfromadatabasebasedontheuserinput,andgenerateoutput,whichisdisplayedtotheuser.UNIT 9 DatabaseAsanexampleofanapplication,considerauniversityregistrationsystem.Likeothersuchapplications,theregistrationsystemfirstrequiresyoutoidentifyandauthenticateyourself,typicallybyausernameandpassword.Theapplicationthenusesyouridentitytoextractinformation,suchasyournameandthecoursesforwhichyouhaveregistered,fromthedatabaseanddisplaystheinformation.Theapplicationprovidesanumberofinterfacesthatletyouregisterforcoursesandqueryavarietyofotherinformationsuchascourseandinstructorinformation.Organizationsusesuchapplicationstoautomateavarietyoftasks,suchassales,purchases,accountingandpayroll,human-resourcesmanagement,andinventorymanagement,amongmanyothers.UNIT 9 DatabaseApplicationprogramsmaybeusedevenwhenitisnotapparentthattheyarebeingused.Forexample,anewssitemayprovideapagethatistransparentlycustomizedtoindividualusers,eveniftheuserdoesnotexplicitlyfillanyformswheninteractingwiththesite.Todoso,itactuallyrunsanapplicationprogramthatgeneratesacustomizedpageforeachuser;customizationcan,forexample,bebasedonthehistoryofarticlesbrowsedbytheuser.UNIT 9 DatabaseAtypicalapplicationprogramincludesafront-endcomponent,whichdealswiththeuserinterface,aback-endcomponent,whichcommunicateswithadatabase,andamiddlelayer,whichcontains“businesslogic,”thatis,codethatexecutesspecificrequestsforinformationorupdates,enforcingrulesofbusinesssuchaswhatactionsshouldbecarriedouttoexecuteagiventask,orwhocancarryoutwhattask.UNIT 9 DatabaseApplicationarchitectureshaveevolvedovertime,asillustratedinFigure9-2.Applicationssuchasairlinereservationshavebeenaroundsincethe1960s.Intheearlydaysofcomputerapplications,applicationsranonalarge“mainframe”computer,andusersinteractedwiththeapplicationthroughterminals,someofwhichevensupportedforms.UNIT 9 DatabaseFigure9-2ApplicationarchitecturesindifferenterasUNIT 9 DatabaseWiththewidespreaduseofpersonalcomputers,manyorganizationsusedadifferentarchitectureforinternalapplications,withapplicationsrunningontheuserscomputer,andaccessinga