计算机专业英语6.docx

上传人:b****3 文档编号:11766002 上传时间:2023-06-02 格式:DOCX 页数:7 大小:718.16KB
下载 相关 举报
计算机专业英语6.docx_第1页
第1页 / 共7页
计算机专业英语6.docx_第2页
第2页 / 共7页
计算机专业英语6.docx_第3页
第3页 / 共7页
计算机专业英语6.docx_第4页
第4页 / 共7页
计算机专业英语6.docx_第5页
第5页 / 共7页
计算机专业英语6.docx_第6页
第6页 / 共7页
计算机专业英语6.docx_第7页
第7页 / 共7页
亲,该文档总共7页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

计算机专业英语6.docx

《计算机专业英语6.docx》由会员分享,可在线阅读,更多相关《计算机专业英语6.docx(7页珍藏版)》请在冰点文库上搜索。

计算机专业英语6.docx

计算机专业英语6

Unit6Database

SectionA

DatabaseOverview

I.Introduction

Datastoragetraditionallyusedindividual,unrelatedfiles,sometimescalledHatfiles.Inthepast,eachapplicationprograminanorganizationuseditsownfile.Inauniversity,forexample,eachdepartmentmighthaveitsownsetoffiles:

therecordofficekeptafileaboutthestudentinformationandtheirgrades,thefinancialaidofficekeptitsownfileaboutstudentsthatneededfinancialaidtocontinuetheireducation,theschedulingofficekeptthenamesoftheprofessorsandthecoursestheywereteaching,thepayrolldepartmentkeptitsownfileaboutthewholestaff(includingprofessors),andsoon.Today,however,alloftheseflatfilescanbecombinedinasingleentity,thedatabaseforthewholeuniversity.

Althoughitisdifficulttogiveauniversallyagreeddefinitionofadatabase,weusethefollowingcommondefinition:

adatabaseisacollectionofrelated,logicallycoherent,datausedbytheapplicationprogramsinanorganization.

II.DatabaseManagementSystems

Adatabasemanagementsystem(DBMS)defines,create,andmaintainsadatabase.TheDBMSalsoallowscontrolledaccesstodatainthedatabase.ADBMSisacombinationoffivecomponents:

hardware,software,data,users,andprocedures.

1.Hardware

Thehardwareisthephysicalcomputersystemthatallowsaccesstodata.Forexample,theterminals,harddisk,maincomputer,andworkstationsareconsideredpartofthehardwareinaDBMS.

2.Software

Thesoftwareistheactualprogramthatallowsuserstoaccess,maintain,andupdatedata.Inaddition,thesoftwarecontrolswhichusercanaccesswhichpartsofthedatainthedatabase.

3.Data

Thedatainadatabaseisstoredphysicallyonthestoragedevice.Inadatabase,dataisaseparateentityfromthesoftwarethataccessesit.Thisseparationallowsanorganizationtochangethesoftwarewithouthavingtochangethephysicaldataorthewayinwhichitisstored.IfanorganizationdecidestouseaDBMS,thenalltheinformationneededbytheorganizationshouldbekepttogetherasoneentity,tobeaccessiblebythesoftwareintheDBMS.

4.Users

ThetermusersinaDBMShasabroadmeaning.Wecandivideusersintotwocategories:

endusersandapplicationprograms.

Endusersarethosehumanswhocanaccessthedatabasedirectlytogetinformation.Therearetwotypesofendusers:

databaseadministrators(DBAs)andnormalusers.DatabaseadministratorshavethemaximumlevelofprivilegesandcancontrolotherusersandtheiraccesstotheDBMS,grantsomeoftheirprivilegestosomebodyelse,butretaintheabilitytorevokethematanytime.Anormaluser,ontheotherhand,canonlyusepartofthedatabaseandhaslimitedaccess.

Theotherusersofdatainadatabaseareapplicationprograms.Applicationsneedtoaccessandprocessdata.Forexample,apayrollapplicationprogramneedstoaccesspartofthedatainadatabasetocreatepaychecksattheendofthemonth.

5.Procedures

ThelastcomponentofaDBMSisasetofproceduresorrulesthatshouldbeclearlydefinedandfollowedbytheusersofthedatabase.

III.DatabaseArchitecture

TheAmericanNationalStandardsInstituteStandardsPlanningandRequirementsCommittee(ANSI/SPARC)hasestablishedathree-levelarchitectureforaDBMS:

internal,conceptual,andexternal(Figure6A-1).

1.InternalLevel

Theinternalleveldetermineswheredataisactuallystoredonthestoragedevices.Thisleveldealswithlow-levelaccessmethodsandhowbytesaretransferredtoandfromstoragedevices.Inotherwords,theinternallevelinteractsdirectlywiththehardware.

2.ConceptualLevel

Theconceptualleveldefinesthelogicalviewofthedata.Thedatamodelisdefinedonthislevel,andthemainfunctionsoftheDBMS,suchasqueries,arealsoonthislevel.TheDBMSchangestheinternalviewofdatatotheexternalviewthatusersneedtosee.Theconceptuallevelisanintermediaryandfreesusersfromdealingwiththeinternallevel.

3.ExternalLevel

Theexternallevelinteractsdirectlywiththeuser(enduserorapplicationprograms).Itchangesthedatacomingfromtheconceptualleveltoaformatandviewthatisfamiliartotheusers.

IV.DatabaseModels

Adatabasemodeldefinesthelogicaldesignofdata.Themodelalsodescribestherelationshipsbetweendifferentpartsofthedata.Inthehistoryofdatabasedesign,threemodelshavebeeninuse:

thehierarchicalmodel,thenetworkmodel,andtherelationalmodel.

1.HierarchicalDatabaseModel

Inthehierarchicalmodel,dataisorganizedasaninvertedtree.Eachentityhasonlyoneparentbutcanhaveseveralchildren.Atthetopofthehierarchy,thereisoneentity,whichiscalledtheroot.Figure6A-2showsalogicalviewofanexampleofthehierarchicalmodel.Thehierarchicalmodelisnowobsolete.

2.NetworkDatabaseModel

Inthenetworkmodel,theentitiesareorganizedinagraph,inwhichsomeentitiescanbeaccessedthroughseveralpaths(Figure6A-3).Thereisnohierarchy.Thismodelisnowalsoobsolete.

 

3.RelationalDatabaseModel

Intherelationalmodel,dataisorganizedintwo-dimensionaltablescalledrelations.Thereisnohierarchicalornetworkstructureimposedonthedata.Thetablesorrelationsare,however,relatedtoeachother(Figure6A-4).Therelationaldatabasemanagementsystem(RDBMS)organizesthedatasothatitsexternalviewisasetofrelationsortables.Thisdoesnotmeanthatdataisstoredastables:

thephysicalstorageofthedataisindependentofthewayinwhichthedataislogicallyorganized.Figure6A-5showsanexampleofarelation.ArelationinanRDBMShas

thefollowingfeatures:

●Name.Eachrelationinarelationaldatabaseshouldhaveanamethatisuniqueamongotherrelations.

●Attributes.Eachcolumninarelationiscalledanattribute.TheattributesarethecolumnheadingsinthetableinFigure6A-5.Eachattributegivesmeaningtothedatastoredunderit.Eachcolumninthetablemusthaveanamethatisuniqueinthescopeoftherelation.Thetotalnumberofattributesforarelationiscalledthedegreeoftherelation.Forexample,inFigure6A-5,therelationhasadegreeof3.Notethattheattributenamesarenotstoredinthedatabase:

theconceptuallevelusestheattributestogivemeaningtoeachcolumn.

●Tuples.Eachrowinarelationiscalledatuple.Atupledefinesacollectionofattributevalues.Thetotalnumberofrowsinarelationiscalledthecardinalityoftherelation.Notethatthecardinalityofarelationchangeswhentuplesareaddedordeleted.Thismakesthedatabasedynamic.

Therelationalmodelisoneofthecommonmodelsinusetoday.Theothertwocommonmodelsthatarederivedfromtherelationalmodelarethedistributedmodelandtheobject-orientedmodel.

4.DistributedDatabaseMode)

Thedistributeddatabasemodelisnotanewmodel,butisbasedontherelationalmodel.However,thedataisstoredonseveralcomputersthatcommunicatethroughtheInternetoraprivatewideareanetworkEachcomputer(orsite)maintainseitherpartofthedatabaseorthewholedatabase.Inotherwords,dataiseitherfragmented,witheachfragmentstoredatonesite,ordataisreplicatedateachsite.

Inafragmenteddistributeddatabase,dataislocalized—locallyuseddataisstoredatthecorrespondingsite.However,thisdoesnotmeanthatasitecannotaccessdatastoredatanothersite,butaccessismostlylocal,butoccasionallyglobal.Althougheachsitehascompletecontroloveritslocaldata,thereisglobalcontrolthroughtheInternetorawideareanetwork.

Forexample,apharmaceuticalcompanymayhavemultiplesitesinmanycountries.Eachsitehasadatabasewithinformationaboutitsownemployees,butacentralpersonneldepartmentcouldhavecontrolofallthedatabases.

Inareplicateddistributeddatabase,eachsiteholdsanexactreplicaofanothersite.Anymodificationtodatastoredinonesiteisrepeatedexactlyateverysite.Thereasonforhavingsuchadatabaseissecurity.Ifthesystematonesitefails,usersatthesitecanaccessdataatanothersite.

5.Object-OrientedDatabaseModel

Therelationaldatabasehasaspecificviewofdatathatisbasedonthenatureofthedatabase'stuplesandattributes.Thesmallestunitofdatainarelationaldatabaseistheintersectionofatupleandanattribute.However,someapplicationsneedtolookatdataasotherforms,forexa.'dataasastructure,suchasarecordcomposedoffields.

Anobject-orienteddatabasetriestokeeptheadvantagerelationalmodelandatthesametimeallowsapplications|structureddata.Inanobject-orienteddatabase,objectsandtheiraredefined.Inaddition,eachobjectcanhaveattributesthaexpressedasfields.

Forexample,inanorganization,onecoulddefineobject!

employee,department,andcustomer.Theemployeeclasscoulddattributesofanemployeeobject(firstname,lastname,socialnumber,salary,andsoon)andhowtheycanbeaccessed.Thedeobjectcoulddefinetheattributesofthedepartmentandhowthe]accessed.Inaddition,thedatabasecouldcreatearelationbeemployeeobjectandadepartmentobjecttodenotethattheworksinthatdepartment.

V.DatabaseDesign

Thedesignofanydatabaseisalengthyandinvolvedtaskthatabedonethroughastep-by-stepprocess.Thefirststepnormallyinvilotofinterviewingofpotentialusersofthedatabasetocollainformationneededtobestoredandtheaccessrequirementodepartment.Thesecondstepistobuildanentity-relationshipmodel(thatdefinestheentitiesforwhichsomeinformationmustbemaintainattributesoftheseentities,andtherelationshipbetweentheseentities.

Thenextstepindesignisbasedonthetypeofdat

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 工作范文 > 行政公文

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2