大学毕业设计关于数据库外文翻译2篇.doc

上传人:wj 文档编号:4851437 上传时间:2023-05-07 格式:DOC 页数:25 大小:349.50KB
下载 相关 举报
大学毕业设计关于数据库外文翻译2篇.doc_第1页
第1页 / 共25页
大学毕业设计关于数据库外文翻译2篇.doc_第2页
第2页 / 共25页
大学毕业设计关于数据库外文翻译2篇.doc_第3页
第3页 / 共25页
大学毕业设计关于数据库外文翻译2篇.doc_第4页
第4页 / 共25页
大学毕业设计关于数据库外文翻译2篇.doc_第5页
第5页 / 共25页
大学毕业设计关于数据库外文翻译2篇.doc_第6页
第6页 / 共25页
大学毕业设计关于数据库外文翻译2篇.doc_第7页
第7页 / 共25页
大学毕业设计关于数据库外文翻译2篇.doc_第8页
第8页 / 共25页
大学毕业设计关于数据库外文翻译2篇.doc_第9页
第9页 / 共25页
大学毕业设计关于数据库外文翻译2篇.doc_第10页
第10页 / 共25页
大学毕业设计关于数据库外文翻译2篇.doc_第11页
第11页 / 共25页
大学毕业设计关于数据库外文翻译2篇.doc_第12页
第12页 / 共25页
大学毕业设计关于数据库外文翻译2篇.doc_第13页
第13页 / 共25页
大学毕业设计关于数据库外文翻译2篇.doc_第14页
第14页 / 共25页
大学毕业设计关于数据库外文翻译2篇.doc_第15页
第15页 / 共25页
大学毕业设计关于数据库外文翻译2篇.doc_第16页
第16页 / 共25页
大学毕业设计关于数据库外文翻译2篇.doc_第17页
第17页 / 共25页
大学毕业设计关于数据库外文翻译2篇.doc_第18页
第18页 / 共25页
大学毕业设计关于数据库外文翻译2篇.doc_第19页
第19页 / 共25页
大学毕业设计关于数据库外文翻译2篇.doc_第20页
第20页 / 共25页
亲,该文档总共25页,到这儿已超出免费预览范围,如果喜欢就下载吧!
下载资源
资源描述

大学毕业设计关于数据库外文翻译2篇.doc

《大学毕业设计关于数据库外文翻译2篇.doc》由会员分享,可在线阅读,更多相关《大学毕业设计关于数据库外文翻译2篇.doc(25页珍藏版)》请在冰点文库上搜索。

大学毕业设计关于数据库外文翻译2篇.doc

重庆理工大学2013届本科生毕业设计(论文)外文文献翻译

原文:

StructureoftheRelationaldatabase

—《DatabaseSystemConcepts》Part1:

RelationalDatabases

Therelationalmodelisthebasisforanyrelationaldatabasemanagementsystem(RDBMS).Arelationalmodelhasthreecorecomponents:

acollectionofobjectsorrelations,operatorsthatactontheobjectsorrelations,anddataintegritymethods.Inotherwords,ithasaplacetostorethedata,awaytocreateandretrievethedata,andawaytomakesurethatthedataislogicallyconsistent.

Arelationaldatabaseusesrelations,ortwo-dimensionaltables,tostoretheinformationneededtosupportabusiness.Let'sgooverthebasiccomponentsofatraditionalrelationaldatabasesystemandlookathowarelationaldatabaseisdesigned.Onceyouhaveasolidunderstandingofwhatrows,columns,tables,andrelationshipsare,you'llbewellonyourwaytoleveragingthepowerofarelationaldatabase.

Tables,Row,andColumns

Atableinarelationaldatabase,alternativelyknownasarelation,isatwo-dimensionalstructureusedtoholdrelatedinformation.Adatabaseconsistsofoneormorerelatedtables.

Note:

Don'tconfusearelationwithrelationships.Arelationisessentiallyatable,andarelationshipisawaytocorrelate,join,orassociatetwotables.

Arowinatableisacollectionorinstanceofonething,suchasoneemployeeoronelineitemonaninvoice.Acolumncontainsalltheinformationofasingletype,andthepieceofdataattheintersectionofarowandacolumn,afield,isthesmallestpieceofinformationthatcanberetrievedwiththedatabase'squerylanguage.Forexample,atablewithinformationaboutemployeesmighthaveacolumncalledLAST_NAMEthatcontainsalloftheemployees'lastnames.Dataisretrievedfromatablebyfilteringonboththerowandthecolumn.

PrimaryKeys,Datatypes,andForeignKeys

TheexamplesthroughoutthisarticlewillfocusonthehypotheticalworkofScottSmith,databasedeveloperandentrepreneur.HejuststartedanewwidgetcompanyandwantstoimplementafewofthebasicbusinessfunctionsusingtherelationaldatabasetomanagehisHumanResources(HR)department.

Relation:

Atwo-dimensionalstructureusedtoholdrelatedinformation,alsoknownasatable.

Note:

MostofScott'semployeeswerehiredawayfromoneofhispreviousemployers,someofwhomhaveover20yearsofexperienceinthefield.Asahiringincentive,Scotthasagreedtokeepthenewemployees'originalhiredateinthenewdatabase.

Row:

Agroupofoneormoredataelementsinadatabasetablethatdescribesaperson,place,orthing.

Column:

Thecomponentofadatabasetablethatcontainsallofthedataofthesamenameandtypeacrossallrows.

You'lllearnaboutdatabasedesigninthefollowingsections,butlet'sassumeforthemomentthatthemajorityofthedatabasedesigniscompletedandsometablesneedtobeimplemented.ScottcreatestheEMPtabletoholdthebasicemployeeinformation,anditlookssomethinglikethis:

NoticethatsomefieldsintheCommission(COMM)andManager(MGR)columnsdonotcontainavalue;theyareblank.Arelationaldatabasecanenforcetherulethatfieldsinacolumnmayormaynotbeempty.Inthiscase,itmakessenseforanemployeewhoisnotintheSalesdepartmenttohaveablankCommissionfield.ItalsomakessenseforthepresidentofthecompanytohaveablankManagerfield,sincethatemployeedoesn'treporttoanyone.

Field:

Thesmallestpieceofinformationthatcanberetrievedbythedatabasequerylanguage.Afieldisfoundattheintersectionofarowandacolumninadatabasetable.

Ontheotherhand,noneofthefieldsintheEmployeeNumber(EMPNO)columnareblank.Thecompanyalwayswantstoassignanemployeenumbertoanemployee,andthatnumbermustbedifferentforeachemployee.Oneofthefeaturesofarelationaldatabaseisthatitcanensurethatavalueisenteredintothiscolumnandthatitisunique.TheEMPNOcolumn,inthiscase,istheprimarykeyofthetable.

PrimaryKey:

Acolumn(orcolumns)inatablethatmakestherowinthetabledistinguishablefromeveryotherrowinthesametable.

NoticethedifferentdatatypesthatarestoredintheEMPtable:

numericvalues,characteroralphabeticvalues,anddatevalues.

Asyoumightsuspect,theDEPTNOcolumncontainsthedepartmentnumberfortheemployee.Buthowdoyouknowwhatdepartmentnameisassociatedwithwhatnumber?

ScottcreatedtheDEPTtabletoholdthedescriptionsforthedepartmentcodesintheEMPtable.

TheDEPTNOcolumnintheEMPtablecontainsthesamevaluesastheDEPTNOcolumnintheDEPTtable.Inthiscase,theDEPTNOcolumnintheEMPtableisconsideredaforeignkeytothesamecolumnintheDEPTtable.

Aforeignkeyenforcestheconceptofreferentialintegrityinarelationaldatabase.TheconceptofreferentialintegritynotonlypreventsaninvaliddepartmentnumberfrombeinginsertedintotheEMPtable,butitalsopreventsarowintheDEPTtablefrombeingdeletedifthereareemployeesstillassignedtothatdepartment.

ForeignKey:

Acolumn(orcolumns)inatablethatdrawsitsvaluesfromaprimaryoruniquekeycolumninanothertable.Aforeignkeyassistsinensuringthedataintegrityofatable.ReferentialIntegrityAmethodemployedbyarelationaldatabasesystemthatenforcesone-to-manyrelationshipsbetweentables.

DataModeling

BeforeScottcreatedtheactualtablesinthedatabase,hewentthroughadesignprocessknownasdatamodeling.Inthisprocess,thedeveloperconceptualizesanddocumentsallthetablesforthedatabase.OneofthecommonmethodsformodelingadatabaseiscalledERA,whichstandsforentities,relationships,andattributes.Thedatabasedesignerusesanapplicationthatcanmaintainentities,theirattributes,andtheirrelationships.Ingeneral,anentitycorrespondstoatableinthedatabase,andtheattributesoftheentitycorrespondtocolumnsofthetable.

DataModeling:

Aprocessofdefiningtheentities,attributes,andrelationshipsbetweentheentitiesinpreparationforcreatingthephysicaldatabase.

Thedata-modelingprocessinvolvesdefiningtheentities,definingtherelationshipsbetweenthoseentities,andthendefiningtheattributesforeachoftheentities.Onceacycleiscomplete,itisrepeatedasmanytimesasnecessarytoensurethatthedesigneriscapturingwhatisimportantenoughtogointothedatabase.Let'stakeacloserlookateachstepinthedata-modelingprocess.

DefiningtheEntities

First,thedesigneridentifiesalloftheentitieswithinthescopeofthedatabaseapplication.Theentitiesarethepersons,places,orthingsthatareimportanttotheorganizationandneedtobetrackedinthedatabase.Entitieswillmostlikelytranslateneatlytodatabasetables.Forexample,forthefirstversionofScott'swidgetcompanydatabase,heidentifiesfourentities:

employees,departments,salarygrades,andbonuses.ThesewillbecometheEMP,DEPT,SALGRADE,andBONUStables.

DefiningtheRelationshipsBetweenEntities

Oncetheentitiesaredefined,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—onestudentmaytake

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

当前位置:首页 > 工程科技 > 交通运输

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

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