計算機外文翻譯外文文獻英文文獻數據庫系統_第1頁
計算機外文翻譯外文文獻英文文獻數據庫系統_第2頁
計算機外文翻譯外文文獻英文文獻數據庫系統_第3頁
計算機外文翻譯外文文獻英文文獻數據庫系統_第4頁
計算機外文翻譯外文文獻英文文獻數據庫系統_第5頁
已閱讀5頁,還剩13頁未讀 繼續免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

#外文資料原文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。I.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'stioinfreoqrumiarementschange.Newcategoriesofdatacanbeaddedtothedatabasewithoutdisruptiontotheexistingsystem。4。1.DBMS(DatabaseManagementSystem)DBMSisabletoaccessandretrievedatafromnonkeyrecordfields。Thatis,theDBMSisabletostructureandtietogetherthelogicallyrelateddatafromseverallargefiles.4.2。LogicalStructuresIdentifyingtheselogicalrelationshipsisajobofthedataadministrator。Adatadefinitionlanguageisusedforthispurpose.TheDBMSmaythenemployoneofthefollowinglogicalstructuringtechniquesduringstorageaccess,andretrievaloperations:Liststructures。Inthislogicalapproach,recordsarelinkedtogetherbytheuseofpointers.Apointerisadataiteminonerecordthatidentifiesthestoragelocationofanotherlogicallyrelatedrecord.Recordsinacustomermasterfile,forexample,willcontainthenameandaddressofeachcustomerandeachrecordinthisfileisidentifiedbyanaccountnumber。Duringanaccountingperiod,acustomermaybuyanumberofitemsondifferentdays。Thus,thecompanymaymaintainaninvoicefiletoreflectthesetransactions.Aliststructurecouldbeusedinthissituationtoshowtheunpaidinvoicesatanygiventime.Eachrecordinthecustomerfilewouldcontainafieldthatwouldpointtotherecordlocationofthefirstinvoiceforthatcustomerintheinvoicefile。Thisinvoicerecord,inturn,wouldbelinkedtolaterinvoicesforthecustomer。Thelastinvoiceinthechainwouldbeidentifiedbytheuseofaspecialcharacterasapointer。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,muchoftheinformationneededbymanagerswhooccupydifferentlevelsandwhohavedifferentresponsibilitiesisobtainedfromacollectionofexistinginformationsystem(sorsubsystems).ThesesystemsmaybetiedtogetherverycloselyinanMIS.Moreoften,however,theyaremorelooselycoupled.外文翻譯中文數據庫系統1.數據庫系統引論今天,也就是比以往任何時候都更加明顯,一個組織的成功取決于它準確而及時地獲取關于它運營數據的能力及有效管理這些數據的能力,并用它來分析和指導其活動。一些短語諸如“超級公路信息"已隨處可見,信息處理成為一個迅速增長為每年幾十億美元的產業.我們今天能得到的信息實在是爆炸性的,而數據作為一個組織資產的價值正得到廣泛的認可.這種議論推動了對強大及靈活的數據庫管理系統的不斷增長的需要。數據庫是一組數據的集合,它可典型地描繪一個或多個相關組織的活動.舉例來說,一個大學的數據庫可能包含如下信息:?諸如學生、教職員、課程及班組等實體。?實體間的關系,諸如學生課程名冊、教員教授課程以及課程使用教室.一個數據庫管理系統(或稱DBMS)是一種旨在協助維護和使用大型數據集合的軟件,為這些系統所需要,同時為了它們的使用,DBMS發展很迅速;舉例來說,在文件中存儲數據須書寫特定的應用代碼來管理它。一般來說,數據庫管理系統領域是計算機科學的一個縮影。它所要解決的問題及使用的技術包括了廣泛的范圍,這包括語言、面向對象及其他的編程變化方法、編譯、操作系統、并發編程、數據結構、算法理論、并行及分布式系統、用戶接口、專家系統及人工智能、統計技術以及動態編程.隨著愈來愈多的數據能進入在線及通過計算機網絡變得從未有過的便于存取,數據庫管理系統將繼續增加其重要性.今天這個領域正在為激動人心的多媒體數據庫、交互電視、數字圖書館及許多科學工程(諸如人類基因圖工程以及NASA的地球觀測工程)及許多公司為鞏固它們的決策處理愿望和為了挖掘它們自己公司的有用信息的數據倉庫等所推動。在商業方面,數據庫管理系統代表了一個最大和最強勁的市場份額,對數據庫管理系統的研究將被證明能在多個方面而不是一個方面得到豐厚的回報。2.數據庫概述一個數據庫由一個文件或文件集合組成。這些文件中的信息可分解成一個個記錄,每個記錄有一個或多個域。域是數據存儲的基本單位,每個域一般含有由數據庫描述的屬于實體的一個方面或一個特性的信息。用戶使用鍵盤和各種排序命令,能夠快速查找、重排、分組并在查找的許多記錄中選擇相應的域,建立特定集上的報表。數據庫記錄和文件的組織必須確保能對信息進行檢索。早期的系統是順序組織的(如:字母順序、數字順序或時間順序);直接訪問存儲設備的研制成功使得通過索引隨機訪問數據成為可能。用戶檢索數據庫信息的主要方法是query(查詢)。通常情況下,用戶提供一個字符串,計算機在數據庫中尋找相應的字符序列,并且給出字符串在何處出現。比如,用戶能夠在所有記錄中尋找所有lastname域為Smith的記錄。在非結構化的數據庫中,按照實體的一個簡單列表組織記錄;很多個人計算機的簡易數據庫是非結構的.層次型數據庫按樹型組織記錄,每一層的記錄分解成更小的屬性集。層次型數據庫在不同層的記錄集之間提供一個單一鏈接,與此不同,網絡型數據庫在不同記錄集之間提供多個鏈接,這是通過設置指向其它記錄集的鏈或指針來實現的。網絡型數據庫的速度及多樣性使其在企業中得到廣泛應用。當文件或記錄間的關系不能用鏈表達時,使用關系型數據庫。一個表或一個“關系”,就是一個簡單的非結構列表。多個關系可通過數學關系提供所需信息。面向對象的數據庫存儲并處理更復雜的稱為對象的數據結構,可組織成有層次的類,其中的每個類可以繼承層次鏈中更高一級類的特性,這種數據庫結構最靈活,最具適應性。關系數據庫的結構關系模型是任何關系數據庫管理系統(RDBMS)的基礎。一個關系模型有二個核心組件:對象或關系的集合,作用于對象或關系上的操作,以及數據完整性規則.換句話說,關系數據庫有一個存儲數據的地方,一種創建和檢索數據的方法,以及一種確認數據的邏輯一致性的方法.一個關系數據庫使用關系或二維表來存儲支持某個事物所需的信息.讓我們了解一下一個傳統的關系數據庫系統的基本組件并且學習如何設計一個關系數據庫。一旦你對于行、列、表和關聯是什么有了深刻理解,你就能夠充分發揮關系數據庫的強大功能。3.1表,行和列在關系數據庫中,一個表(或者說一個關系)是一個用于保存相關信息的二維結構.一個數據庫由一個或者多個相關聯的表組成。注意:不要混淆了關系和關聯。一個關系實際上是一個表,而一個關聯指的是一種連接、結合或聯合兩個表的方式。表中的一行是一種事物的集合或實例,比如一個員工或發票上的一項.表中的一列包含了一類信息;而且行列交叉點上的數據,字段,即是能夠用數據庫查詢語言檢索到的最小片信息。舉個例子來說,一個員工信息表可能有一個“名字”列,列中就包含所有員工的名字.數據是通過對行、列進行過濾而從表中檢索出來的。3.2。主碼,數據類型和外碼關系:用來保存相關信息的一個二維結構(也就是表).行:在一個數據庫表中的一組單數據或多數據元素,用于描述一個人、地方或事物。列:列是數據庫表的組件,它包含所有行中同名和同類型的所有數據.一個關系數據庫能夠規定列中的一個單元格是否為空。單元格:是數據庫查詢語言所能夠檢索到的最小片信息。一個單元格就是一個數據庫表的行和列交叉形成的.關系數據庫的一個特性能夠確定某列的鍵入值必須為單值。主碼:主碼即是表中的一列(或多列),使每一行能夠區別于同表中的其他行.數據類型:數值型,字符型或字母型,以及日期型。外碼加強了關系數據庫中參考完整性的概念。外碼:表中的一列(或多列),它的值來自于其他表的主碼列或單值列。一個外碼有助于確定表中數據的完整性。參考完整性:是關系數據庫用來加強表間一對多關聯的一種方式。3.3數據建模在這個過程中,數據庫創建者定義和填寫數據庫中所有表。有一種為數據庫建模的方式叫做ERA,它可以表示出實體、實體間的關聯和實體的屬性。數據庫設計者使用一個能夠支持實體、實體屬性和實體間關聯的應用程序。通常,一個實體對應數據庫中的一個表,而實體的屬性對應于表中的列。數據建模:一個定義實體、實體屬性和實體間關聯的過程,從而為建立物理數據庫做準備。數據建模過程包括定義實體、定義實體間關聯以及定義每個實體的屬性的過程。一旦一個周期完成,就需要不斷重復直到設計者抓住了重點,足以開始建立數據庫。讓我們進一步了解為數據庫建模過程的步驟。定義實體首先,設計者確定數據庫應用程序范圍內的所有實體。實體是人、地方或事物,它們對于整個團體是重要的且需要被記錄在數據庫中.實體將被巧妙的轉化為數據表。3.5。定義實體間的關聯一旦定義了實體,設計者就能夠繼續定義每個實體間是如何關聯的。通常,設計者通常將每個實體同其他實體配對,并目考慮:“兩者之間是否存在關聯呢?”實體間的某些關聯是明顯的,某些不是。在飾品公司數據庫中,員工實體和部門實體間極可能存在關聯,而依據事物間的關系原則,部門實體跟工資水平實體間似乎就沒有關聯了。如果事物間的關系原則是用來約束某個部門的工資水平的,就可能需要一個新的實體來說明工資水平和部門之間的關聯。這個實體被稱作關系表或交表,其中包含工資水平和部門之間的有效聯合。關系表:是一個數據庫表,其中保存著另外兩個表的行(記錄)間的有效結合,并且通常強調了事物間的關系原則。關聯表處理的是一個多對多關聯。通常,關系數據庫間有二種關聯方式:?一對多關聯:最常見的關聯是一對多關聯。意思是對于每個給出的現有實體(即父實體)都有一個或多個現有的另一個實體(即子實體)與之相關聯.舉個例子來說,在飾品公司數據庫中,部門實體是一個父實體,而每個部門中,都有一個或多個員工屬于該部門.這樣,部門實體和員工實體間的關聯就是一對多關聯。?一對一關聯:在一個一對一關聯中,表中的一行只關聯另一個表中的一行甚至0行。這種關聯類型通常用于子類型數據中.例如,一個員工表可能保存了所有員工的信息,而全職表、兼職表和承包人表則分別保存全職員工、兼職員工和承包人的信息。這些實體被認為是員工表的子表,并且同員工表維持一對一關聯。這種關系不像一對多關聯那么常見,因為如果一個實體與另一個實體總有對應行,在大多數情況下,兩個實體中的屬性只在一個實體內出現就可以了。?多對多關聯:在多對多關聯中,表的一行可能對應另一個表的許多行,反之亦然.通常,當這些關聯在數據庫中被執行時,往往再定義第三個實體用來保存前兩個實體間的所有關聯.例如,在一個學籍注冊數據庫中,學生表與班級表之間有一個多對多關聯—-一個學生可能聽一門或多門課程,并目一個班級也可能有一個或多個學生。而學生_班級關系表中就包含了學生和班級之間的關系,以表明哪個學生在哪個班。DBMS簡介數據庫這個詞經常用來描述

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經權益所有人同意不得將文件中的內容挪作商業或盈利用途。
  • 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
  • 6. 下載文件中如有侵權或不適當內容,請與我們聯系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論