计算机数据库系统网站 外文文献 英文文献翻译_第1页
计算机数据库系统网站 外文文献 英文文献翻译_第2页
计算机数据库系统网站 外文文献 英文文献翻译_第3页
计算机数据库系统网站 外文文献 英文文献翻译_第4页
计算机数据库系统网站 外文文献 英文文献翻译_第5页
已阅读5页,还剩14页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

外文资料原文DatabaseSystemsIntroductiontoDatabaseSystemToday,morethanatanyprevioustime,thesuccessofanorganizationdependsonitsabilitytoacquireaccurateandtimelydataaboutitsoperation,tomanagethisdataeffectively,andtouseittoanalyzeandguideitsactivities.Phrasessuchastheinformationsuperhighwayhavebecomeubiquitous,andinformationprocessingisarapidlygrowingmultibilliondollarindustry.Theamountofinformationavailabletousisliterallyexploding,andthevalueofdataasanorganizationalassetisbeingwidelyrecognized.Thisparadoxdrivestheneedforincreasinglypowerfulandflexibledatamanagementsystems.Adatabaseisacollectionofdata,typicallydescribingtheactivitiesofoneormorerelatedorganizations.Forexample,auniversitydatabasemightcontaininformationaboutthefollowing.●Entitiessuchasstudents,faculty,courses,andclassrooms.●Relationshipsbetweenentities,suchasstudents’enrollmentincourses,facultyteachingcourses,andtheuseofroomsforcourses.Adatabasemanagementsystem,orDBMS,issoftwaredesignedtoassistinmaintainingandutilizinglargecollectionsofdata,andtheneedforsuchsystems,aswellastheiruse,isgrowingrapidly.ThealternativetousingaDBMSistouseadhocapproachesthatdonotcarryoverfromoneapplicationtoanother,forexample,tostorethedatainfilesandwriteapplication-specificcodetomanageit.Theareaofdatabasemanagementsystemsisamicrocosmofcomputerscienceingeneral.Theissuesaddressedandthetechniquesusedspanawidespectrum,includinglanguages,object-orientationandotherprogrammingparadigms,compilation,operatingsystemsconcurrentprogramming,datastructures,algorithms,theory,parallelanddistributedsystems,userinterfaces,expertsystemsandartificialintelligence,statisticaltechniques,anddynamicprogramming.Databasemanagementcontinuestogainimportanceasmoreandmoredataisbroughton-line,andmadeevermoreaccessiblethroughcomputernetworking.Todaythefieldisbeingdrivenbyexcitingvisionssuchasmultimediadatabases,interactivevideo,digitallibraries,ahostofscientificprojectssuchasthehumangenomemappingeffortandNASA’sEarthObservationSystemproject,andthedesireofcompaniestoconsolidatetheirdecision-makingprocessesandminetheirdatarepositoriesforusefulinformationabouttheirbusiness.Commercially,databasemanagementsystemsrepresentoneofthelargestandmostvigorousmarketsegments.Thusthestudyofdatabasesystemscouldprovetoberichlyrewardinginmorewaysthanone.DatabaseconsistsAdatabaseconsistsofafileorasetoffiles.Theinformationinthesefilesmaybebrokendownintorecords,eachofwhichconsistsofoneormorefields.Fieldsarethebasicunitsofdatastorage,andeachfieldtypicallycontainsinformationpertainingtooneaspectorattributeoftheentitydescribedbythedatabase.Usingkeywordsandvarioussortingcommands,userscanrapidlysearch,rearrange,group,andselectthefieldsinmanyrecordstoretrieveorcreatereportsonparticularaggregatesofdata.Databaserecordsandfilesmustbeorganizedtoallowretrievaloftheinformation.Earlysystemswerearrangedsequentially(i.e.,alphabetically,numerically,orchronologically);thedevelopmentofdirect-accessstoragedevicesmadepossiblerandomaccesstodataviaindexes.Queriesarethemainwayusersretrievedatabaseinformation.Typically,theuserprovidesastringofcharacters,andthecomputersearchesthedatabaseforacorrespondingsequenceandprovidesthesourcematerialsinwhichthosecharactersappear.Ausercanrequest,forexample,allrecordsinwhichthecontentofthefieldforaperson’slastnameisthewordSmith.Inflatdatabases,recordsareorganizedaccordingtoasimplelistofentities;manysimpledatabasesforpersonalcomputersareflatinstructure.Therecordsinhierarchicaldatabasesareorganizedinatreelikestructure,witheachlevelofrecordsbranchingoffintoasetofsmallercategories.Unlikehierarchicaldatabases,whichprovidesinglelinksbetweensetsofrecordsatdifferentlevels,networkdatabasescreatemultiplelinkagesbetweensetsbyplacinglinks,orpointers,toonesetofrecordsinanother;thespeedandversatilityofnetworkdatabaseshaveledtotheirwideuseinbusiness.Relationaldatabasesareusedwhereassociationsamongfilesorrecordscannotbeexpressedbylinks;asimpleflatlistbecomesonetable,or“relation”,andmultiplerelationscanbemathematicallyassociatedtoyielddesiredinformation.Object-orienteddatabasesstoreandmanipulatemorecomplexdatastructures,called“objects”,whichareorganizedintohierarchicalclassesthatmayinheritpropertiesfromclasseshigherinthechain;thisdatabasestructureisthemostflexibleandadaptable.StructureoftheRelationaldatabaseTherelationalmodelisthebasisforanyrelationaldatabasemanagementsystem(RDBMS).Arelationalmodelhasthreecorecomponents:acollectionofobjectsorrelations,operatorsthatactontheobjectsorrelations,anddataintegritymethods.Inotherwords,ithasaplacetostorethedata,awaytocreateandretrievethedata,andawaytomakesurethatthedataislogicallyconsistent.Arelationaldatabaseusesrelations,ortwo-dimensionaltables,tostoretheinformationneededtosupportabusiness.3.1.Tables,Row,andColumnsAtableinarelationaldatabase,alternativelyknownasarelation,isatwo-dimensionalstructureusedtoholdrelatedinformation.Adatabaseconsistsofoneormorerelatedtables.Note:Don'tconfusearelationwithrelationships.Arelationisessentiallyatable,andarelationshipisawaytocorrelate,join,orassociatetwotables.Arowinatableisacollectionorinstanceofonething,suchasoneemployeeoronelineitemonaninvoice.Acolumncontainsalltheinformationofasingletype,andthepieceofdataattheintersectionofarowandacolumn,afield,isthesmallestpieceofinformationthatcanberetrievedwiththedatabase'squerylanguage.Forexample,atablewithinformationaboutemployeesmighthaveacolumncalledLAST_NAMEthatcontainsalloftheemployees'lastnames.Dataisretrievedfromatablebyfilteringonboththerowandthecolumn.3.2.PrimaryKeys,Datatypes,andForeignKeysRelation:Atwo-dimensionalstructureusedtoholdrelatedinformation,alsoknownasatable.Row:Agroupofoneormoredataelementsinadatabasetablethatdescribesaperson,place,orthing.Column:Thecomponentofadatabasetablethatcontainsallofthedataofthesamenameandtypeacrossallrows.PrimaryKey:Acolumn(orcolumns)inatablethatmakestherowinthetabledistinguishablefromeveryotherrowinthesametable.Datatypes:numericvalues,characteroralphabeticvalues,anddatevalues.Aforeignkeyenforcestheconceptofreferentialintegrityinarelationaldatabase.ForeignKey:Acolumn(orcolumns)inatablethatdrawsitsvaluesfromaprimaryoruniquekeycolumninanothertable.Aforeignkeyassistsinensuringthedataintegrityofatable.ReferentialIntegrityAmethodemployedbyarelationaldatabasesystemthatenforcesone-to-manyrelationshipsbetweentables.3.3.DataModelingInthisprocess,thedeveloperconceptualizesanddocumentsallthetablesforthedatabase.OneofthecommonmethodsformodelingadatabaseiscalledERA,whichstandsforentities,relationships,andattributes.Thedatabasedesignerusesanapplicationthatcanmaintainentities,theirattributes,andtheirrelationships.Ingeneral,anentitycorrespondstoatableinthedatabase,andtheattributesoftheentitycorrespondtocolumnsofthetable.DataModeling:Aprocessofdefiningtheentities,attributes,andrelationshipsbetweentheentitiesinpreparationforcreatingthephysicaldatabase.Thedata-modelingprocessinvolvesdefiningtheentities,definingtherelationshipsbetweenthoseentities,andthendefiningtheattributesforeachoftheentities.Onceacycleiscomplete,itisrepeatedasmanytimesasnecessarytoensurethatthedesigneriscapturingwhatisimportantenoughtogointothedatabase.Let'stakeacloserlookateachstepinthedata-modelingprocess.3.4.DefiningtheEntitiesFirst,thedesigneridentifiesalloftheentitieswithinthescopeofthedatabaseapplication.Theentitiesarethepersons,places,orthingsthatareimportanttotheorganizationandneedtobetrackedinthedatabase.Entitieswillmostlikelytranslateneatlytodatabasetables.3.5.DefiningtheRelationshipsBetweenEntitiesOncetheentitiesaredefined,thedesignercanproceedwithdefininghoweachoftheentitiesisrelated.Often,thedesignerwillpaireachentitywitheveryotherentityandask,"Istherearelationshipbetweenthesetwoentities?"Somerelationshipsareobvious;somearenot.Inthewidgetcompanydatabase,thereismostlikelyarelationshipbetweenEMPandDEPT,butdependingonthebusinessrules,itisunlikelythattheDEPTandSALGRADEentitiesarerelated.Ifthebusinessrulesweretorestrictcertainsalarygradestocertaindepartments,therewouldmostlikelybeanewentitythatdefinestherelationshipbetweensalarygradesanddepartments.Thisentitywouldbeknownasanassociativeorintersectiontableandwouldcontainthevalidcombinationsofsalarygradesanddepartments.AssociativeTable:Adatabasetablethatstoresthevalidcombinationsofrowsfromtwoothertablesandusuallyenforcesabusinessrule.Anassociativetableresolvesamany-to-manyrelationship.Ingeneral,therearethreetypesofrelationshipsinarelationaldatabase:One-to-manythemostcommontypeofrelationshipisone-to-many.Thismeansthatforeachoccurrenceinagivenentity,theparententity,theremaybeoneormoreoccurrencesinasecondentity,thechildentity,towhichitisrelated.Forexample,inthewidgetcompanydatabase,theDEPTentityisaparententity,andforeachdepartment,therecouldbeoneormoreemployeesassociatedwiththatdepartment.TherelationshipbetweenDEPTandEMPisone-to-many.One-to-oneInaone-to-onerelationship,arowinatableisrelatedtoonlyoneornoneoftherowsinasecondtable.Thisrelationshiptypeisoftenusedforsubtyping.Forexample,anEMPLOYEEtablemayholdtheinformationcommontoallemployees,whiletheFULLTIME,PARTTIME,andCONTRACTORtablesholdinformationuniquetofull-timeemployees,part-timeemployees,andcontractors,respectively.TheseentitieswouldbeconsideredsubtypesofanEMPLOYEEandmaintainaone-to-onerelationshipwiththeEMPLOYEEtable.Theserelationshipsarenotascommonasone-to-manyrelationships,becauseifoneentityhasanoccurrenceforacorrespondingrowinanotherentity,inmostcases,theattributesfrombothentitiesshouldbeinasingleentity.Many-to-manyinamany-to-manyrelationship,onerowofatablemayberelatedtomanyrowsofanothertable,andviceversa.Usually,whenthisrelationshipisimplementedinthedatabase,athirdentityisdefinedasanintersectiontabletocontaintheassociationsbetweenthetwoentitiesintherelationship.Forexample,inadatabaseusedforschoolclassenrollment,theSTUDENTtablehasamany-to-manyrelationshipwiththeCLASStable—onestudentmaytakeoneormoreclasses,andagivenclassmayhaveoneormorestudents.TheintersectiontableSTUDENT_CLASSwouldcontainthecombinationsofSTUDENTandCLASStotrackwhichstudentsareinwhichclasses.4.DBMSIntroductionThetermdatabaseisoftentodescribeacollect:onofrelatedfilesthatisorganizedintoaninte-.7atedstructurethatprovidesdifferentpeoplevariancestothesamedata.Forexample,thedepartmentmotorvehicleshasadatabaseofalltheinformal:ondriver'slicensesinallcountiesandcitiesinstate.Someoftheinformationinthefiles(e.g.pastcriminalrecord,convictions,andthelike)maybemadeavailabletopolicedepartments,otherinformation(e.g.abalancedueonaspeedingticket)maybemadeavailabletolicensingbureaus,andstillotherinformation(e.g.numberandtypeofconvictions)maygotoinsurancecompanies.ADataBaseManagementSystem(DBMS)isanextremelycomplicatedsetofsoftwareprogramsthatcontrolstheorganization,storageandretrievalofdata(felids,recordsandfiles)inaDatabase.Italsocontrolsthesecurityandintegrityofthedatabases.TheDBMSacceptsrequestsfordatafromtheapplicationprogramandinstructstheoperatingsystemtotransfertheappropriatedata.Tasksthatwouldbetime-consumingtoaccomplishmanuallyaremorepracticaltheaidofthecomputer.Inprinciple,adatabaseinacomputerisnotdifferentfromadatabaserecordedonpaperandfiledincabinets.Butthecomputerdoesthetediousworkofmaintainingandaccessingadatabase,anddoesitfast.Acomputerizeddatabasethatcandoallthisisknownasadatabasemanagementsystem,orDBMSforshort.Thereareanumberofwaystostoreinformationinacomputer,butnotallofthesearetruedatabasemanagementsystems.WhenaDBMSisused,informationsystemscanbechangedmuchmoreeasilyastheorganization’sinformationrequirementschange.Newcategoriesofdatacanbeaddedtothedatabasewithoutdisruptiontotheexistingsystem.4.1.DBMS(DatabaseManagementSystem)DBMSisabletoaccessandretrievedatafromnonkeyrecordfields.Thatis,theDBMSisabletostructureandtietogetherthelogicallyrelateddatafromseverallargefiles.4.2.LogicalStructuresIdentifyingtheselogicalrelationshipsisajobofthedataadministrator.Adatadefinitionlanguageisusedforthispurpose.TheDBMSmaythenemployoneofthefollowinglogicalstructuringtechniquesduringstorageaccess,andretrievaloperations:1.Liststructures.Inthislogicalapproach,recordsarelinkedtogetherbytheuseofpointers.Apointerisadataiteminonerecordthatidentifiesthestoragelocationofanotherlogicallyrelatedrecord.Recordsinacustomermasterfile,forexample,willcontainthenameandaddressofeachcustomerandeachrecordinthisfileisidentifiedbyanaccountnumber.Duringanaccountingperiod,acustomermaybuyanumberofitemsondifferentdays.Thus,thecompanymaymaintainaninvoicefiletoreflectthesetransactions.Aliststructurecouldbeusedinthissituationtoshowtheunpaidinvoicesatanygiventime.Eachrecordinthecustomerfilewouldcontainafieldthatwouldpointtotherecordlocationofthefirstinvoiceforthatcustomerintheinvoicefile.Thisinvoicerecord,inturn,wouldbelinkedtolaterinvoicesforthecustomer.Thelastinvoiceinthechainwouldbeidentifiedbytheuseofaspecialcharacterasapointer.2.Hierarchical(tree)structures.Inthislogicalapproach,dataunitsarestructuredinmultiplelevelsthatgraphicallyresemblean"upsidedown"treewiththerootatthetopandthebranchesformedbelow.There'sasuperior-subordinaterelationshipinahierarchical(tree)structure.Belowthesingle-rootdatacomponentaresubordinateelementsornodes,eachofwhich,inturn,"own"oneormoreotherelements(ornone).Eachelementorbranchinthisstructurebelowtheroothasonlyasingleowner.Thus,acustomerownsaninvoice,andtheinvoicehassubordinateitems.Thebranchesinatreestructurearenotconnected.3.NetworkStructures.Unlikethetreeapproach,whichdoesnotpermittheconnectionofbranches,thenetworkstructurepermitstheconnectionofthenodesinamultidirectionalmanner.Thus,eachnodemayhaveseveralownersandmay,inturn,ownanynumberofotherdataunits.Datamanagementsoftwarepermitstheextractionoftheneededinformationfromsuchastructurebybeginningwithanyrecordinafile.5.DatabaseManagementSystems(DBMS)AndManagementInformationSystems(MIS)Youknowthatadatabaseisacollectionoflogicallyrelateddataelementsthatmaybestructuredinvariouswaystomeetthemultipleprocessingandretrievalneedsoforganizationsandindividuals.There’snothingnewaboutdatabases—earlyoneswerechiseledinstone,pennedonscrolls,andwrittenonindexcards.Butnowdatabasesarecommonlyrecordedonmagnetizablemedia,andcomputerprogramsarerequiredtoperformthenecessarystorageandretrievaloperations.You’llseeinthefollowingpagesthatcomplexdatarelationshipsandlinkagesmaybefoundinallbutthesimplestdatabases.Thesystemsoftwarepackagethathandlesthedifficulttasksassociatedwithcreating,accessing,andmaintainingdatabaserecordsiscalledadatabasemanagementsystem(DBMS).TheprogramsinaDBMSpackageestablishaninterfacebetweenthedatabaseitselfandtheusersofthedatabase.(Theseusersmaybeapplicationsprogrammers,managersandotherswithinformationneeds,andvariousOSprograms.)ADBMScanorganize,process,andpresentselecteddataelementsfromthedatabase.Thiscapabilityenablesdecisionmakerstosearch,probe,andquerydatabasecontentsinordertoextractanswerstononrecurringandunplannedquestionsthataren’tavailableinregularreports.Thesequestionsmightinitiallybevagueand/orpoorlydefined,butpeoplecan“browse”throughthedatabaseuntiltheyhavetheneededinformation.Inshort,theDBMSwill“manage”thestoreddataitemsandassembletheneededitemsfromthecommondatabaseinresponsetothequeriesofthosewhoaren’tprogrammers.Inafile-orientedsystem,usersneedingspecialinformationmaycommunicatetheirneedstoaprogrammer,who,whentimepermits,willwriteoneormoreprogramstoextractthedataandpreparetheinformation[4].TheavailabilityofaDBMS,however,offersusersamuchfasteralternativecommunicationspath.Themanagementinformationsystem(MIS)concepthasbeendefinedindozensofways.Sinceoneorganization’smodelofanMISislikelytodifferfromthatofanother,it’snotsurprisingthattheirMISdefinitionswouldalsovaryinscopeandbreadth.Forourpurposes,anMIScanbedefinedasanetworkofcomputer-baseddataprocessingproceduresdevelopedinanorganizationandintegratedasnecessarywithmanualandotherproceduresforthepurposeofprovidingtimelyandeffectiveinformationtosupportdecisionmakingandothernecessarymanagementfunctions.MIShasdifferentmodels,Inadditiontowhatmightbetermedthehorizontalmanagementstructure,anorganizationisalsodividedverticallyintodifferentspecialtiesandfunctionswhichrequireseparateinformationflows.Combiningthehorizontalmanageriallevelswiththeverticalspecialtiesproducesthecomplexorganizationalstructure.Underlyingthisstructureisadatabaseconsisting,ideally,ofinternallyandexternallyproduceddatarelatingtopast,present,andpredictedfutureevents。TheformidabletaskoftheMISdesigneristodeveloptheinformationflowneededtosupportdecisionmaking.Generallyspeaking,muchoftheinformationneededbymanagerswhooccupydifferentlevelsandwhohavedifferentresponsibilitiesisobtainedfromacollectionofexistinginformationsystems(orsubsystems).ThesesystemsmaybetiedtogetherverycloselyinanMIS.Moreoften,however,theyaremorelooselycoupled.外文翻译中文数据库系统数据库系统引论今天,也就是比以往任何时候都更加明显,一个组织的成功取决于它准确而及时地获取关于它运营数据的能力及有效管理这些数据的能力,并用它来分析和指导其活动。一些短语诸如“超级公路信息”已随处可见,信息处理成为一个迅速增长为每年几十亿美元的产业。我们今天能得到的信息实在是爆炸性的,而数据作为一个组织资产的价值正得到广泛的认可。这种议论推动了对强大及灵活的数据库管理系统的不断增长的需要。数据库是一组数据的集合,它可典型地描绘一个或多个相关组织的活动。举例来说,一个大学的数据库可能包含如下信息:●诸如学生、教职员、课程及班组等实体。●实体间的关系,诸如学生课程名册、教员教授课程以及课程使用教室。一个数据库管理系统(或称DBMS)是一种旨在协助维护和使用大型数据集合的软件,为这些系统所需要,同时为了它们的使用,DBMS发展很迅速;举例来说,在文件中存储数据须书写特定的应用代码来管理它。一般来说,数据库管理系统领域是计算机科学的一个缩影。它所要解决的问题及使用的技术包括了广泛的范围,这包括语言、面向对象及其他的编程变化方法、编译、操作系统、并发编程、数据结构、算法理论、并行及分布式系统、用户接口、专家系统及人工智能、统计技术以及动态编程。随着愈来愈多的数据能进入在线及通过计算机网络变得从未有过的便于存取,数据库管理系统将继续增加其重要性。今天这个领域正在为激动人心的多媒体数据库、交互电视、数字图书馆及许多科学工程(诸如人类基因图工程以及NASA的地球观测工程)及许多公司为巩固它们的决策处理愿望和为了挖掘它们自己公司的有用信息的数据仓库等所推动。在商业方面,数据库管理系统代表了一个最大和最强劲的市场份额,对数据库管理系统的研究将被证明能在多个方面而不是一个方面得到丰厚的回报。数据库概述一个数据库由一个文件或文件集合组成。这些文件中的信息可分解成一个个记录,每个记录有一个或多个域。域是数据存储的基本单位,每个域一般含有由数据库描述的属于实体的一个方面或一个特性的信息。用户使用键盘和各种排序命令,能够快速查找、重排、分组并在查找的许多记录中选择相应的域,建立特定集上的报表。数据库记录和文件的组织必须确保能对信息进行检索。早期的系统是顺序组织的(如:字母顺序、数字顺序或时间顺序);直接访问存储设备的研制成功使得通过索引随机访问数据成为可能。用户检索数据库信息的主要方法是query(查询)。通常情况下,用户提供一个字符串,计算机在数据库中寻找相应的字符序列,并且给出字符串在何处出现。比如,用户能够在所有记录中寻找所有lastname域为Smith的记录。在非结构化的数据库中,按照实体的一个简单列表组织记录;很多个人计算机的简易数据库是非结构的。层次型数据库按树型组织记录,每一层的记录分解成更小的属性集。层次型数据库在不同层的记录集之间提供一个单一链接,与此不同,网络型数据库在不同记录集之间提供多个链接,这是通过设置指向其它记录集的链或指针来实现的。网络型数据库的速度及多样性使其在企业中得到广泛应用。当文件或记录间的关系不能用链表达时,使用关系型数据库。一个表或一个“关系”,就是一个简单的非结构列表。多个关系可通过数学关系提供所需信息。面向对象的数据库存储并处理更复杂的称为对象的数据结构,可组织成有层次的类,其中的每个类可以继承层次链中更高一级类的特性,这种数据库结构最灵活,最具适应性。3.关系数据库的结构关系模型是任何关系数据库管理系统(RDBMS)的基础。一个关系模型有二个核心组件:对象或关系的集合,作用于对象或关系上的操作,以及数据完整性规则。换句话说,关系数据库有一个存储数据的地方,一种创建和检索数据的方法,以及一种确认数据的逻辑一致性的方法。一个关系数据库使用关系或二维表来存储支持某个事物所需的信息。让我们了解一下一个传统的关系数据库系统的基本组件并且学习如何设计一个关系数据库。一旦你对于行、列、表和关联是什么有了深刻理解,你就能够充分发挥关系数据库的强大功能。3.1表,行和列在关系数据库中,一个表(或者说一个关系)是一个用于保存相关信息的二维结构。一个数据库由一个或者多个相关联的表组成。注意:不要混淆了关系和关联。一个关系实际上是一个表,而一个关联指的是一种连接、结合或联合两个表的方式。表中的一行是一种事物的集合或实例,比如一个员工或发票上的一项。表中的一列包含了一类信息;而且行列交叉点上的数据,字段,即是能够用数据库查询语言检索到的最小片信息。举个例子来说,一个员工信息表可能有一个“名字”列,列中就包含所有员工的名字。数据是通过对行、列进行过滤而从表中检索出来的。3.2.主码,数据类型和外码关系:用来保存相关信息的一个二维结构(也就是表)。行:在一个数据库表中的一组单数据或多数据元素,用于描述一个人、地方或事物。列:列是数据库表的组件,它包含所有行中同名和同类型的所有数据。一个关系数据库能够规定列中的一个单元格是否为空。单元格:是数据库查询语言所能够检索到的最小片信息。一个单元格就是一个数据库表的行和列交叉形成的。关系数据库的一个特性能够确定某列的键入值必须为单值。主码:主码即是表中的一列(或多列),使每一行能够区别于同表中的其他行。数据类型:数值型,字符型或字母型,以及日期型。外码加强了关系数据库中参考完整性的概念。外码:表中的一列(或多列),它的值来自于其他表的主码列或单值列。一个外码有助于确定表中数据的完整性。参考完整性:是关系数据库用来加强表间一对多关联的一种方式。3.3数据建模在这个过程中,数据库创建者定义和填写数据库中所有表。有一种为数据库建模的方式叫做ERA,它可以表示出实体、实体间的关联和实体的属性。数据库设计者使用一个能够支持实体、实体属性和实体间关联的应用程序。通常,一个实体对应数据库中的一个表,而实体的属性对应于表中的列。数据建模:一个定义实体、实体属性和实体间关联的过程,从而为建立物理数据库做准备。数据建模过程包括定义实体、定义实体间关联以及定义每个实体的属性的过程。一旦一个周期完成,就需要不断重复直到设计者抓住了重点,足以开始建立数据库。让我们进一步了解为数据库建模过程的步骤。3.4.定义实体首先,设计者确定数据库应用程序范围内的所有实体。实体是人、地方或事物,它们对于整个团体是重要的且需要被记录在数据库中。实体将被巧妙的转化为数据表。3.5.定义实体间的关联一旦定义了实体,设计者就能够继续定义每个实体间是如何关联的。通常,设计者通常将每个实体同其他实体配对,并目考虑:“两者之间是否存在关联呢?”实体间的某些关联是明显的,某些不是。在饰品公司数据库中,员工实体和部门实体间极可能存在关联,而依据事物间的关系原则,部门实体跟工资水平实体间似乎就没有关联了。如果事物间的关系原则是用来约束某个部门的工资水平的,就可能需要一个新的实体来说明工资水平和部门之间的关联。这个实体被称作关系表或交表,其中包含工资水平和部门之间的有效联合。关系表:是一个数据库表,其中保存着另外两个表的行(记录)间的有效结合,并且通常强调了事物间的关系原则。关联表处理的是一个多对多关联。通常,关系数据库间有二种关联方式:·一对多关联:最常见的关联是一对多关联。意思是对于每个给出的现有实体(即父实体)都有一个或多个现有的另一个实体(即子实体)与之相关联。举个例子来说,在饰品公司数据库中,部门实体是一个父实体,而每个部门中,都有一个或多个员工属于该部门。这样,部门实体和员工实体间的关联就是一对多关联。·一对一关联:在一个一对一关联中,表中的一行只关联另一个表中的一行甚至0行。这种关联类型通常用于子类型数据中。例如,一个员工表可能保存了所有员工的信息,而全职表、兼职表和承包人表则分别保存全职员工、兼职员工和承包人的信息。这些实体被认为是员工表的子表,并且同员工表

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论