Computer English Unit 6 Database计算机英语第六单元 数据库.docx

上传人:b****5 文档编号:5150777 上传时间:2022-12-13 格式:DOCX 页数:10 大小:22.56KB
下载 相关 举报
Computer English Unit 6 Database计算机英语第六单元 数据库.docx_第1页
第1页 / 共10页
Computer English Unit 6 Database计算机英语第六单元 数据库.docx_第2页
第2页 / 共10页
Computer English Unit 6 Database计算机英语第六单元 数据库.docx_第3页
第3页 / 共10页
Computer English Unit 6 Database计算机英语第六单元 数据库.docx_第4页
第4页 / 共10页
Computer English Unit 6 Database计算机英语第六单元 数据库.docx_第5页
第5页 / 共10页
点击查看更多>>
下载资源
资源描述

Computer English Unit 6 Database计算机英语第六单元 数据库.docx

《Computer English Unit 6 Database计算机英语第六单元 数据库.docx》由会员分享,可在线阅读,更多相关《Computer English Unit 6 Database计算机英语第六单元 数据库.docx(10页珍藏版)》请在冰豆网上搜索。

Computer English Unit 6 Database计算机英语第六单元 数据库.docx

ComputerEnglishUnit6Database计算机英语第六单元数据库

Unit6Database

第六单元:

数据库

SectionA:

课文A:

DatabaseOverview

数据库概览

I.Introduction

一、引言

Datastoragetraditionallyusedindividual,unrelatedfiles,sometimescalledflatfiles.

数据存储传统上是使用单独的没有联系的文件,这些文件有时称为平面文件。

Inthepast,eachapplicationprograminanorganizationuseditsownfile.

在过去,一个机构中的每个应用程序都使用自己的文件。

Inauniversity,forexample,eachdepartmentmighthaveitsownsetoffiles:

例如,在一个大学中,每个部门都可能有其自己的文件集:

therecordofficekeptafileaboutthestudentinformationandtheirgrades,thefinancialaidofficekeptitsownfileaboutstudentsthatneededfinancialaidtocontinuetheireducation,theschedulingofficekeptthenamesoftheprofessorsandthecoursestheywereteaching,thepayrolldepartmentkeptitsownfileaboutthewholestaff(includingprofessors),andsoon.

档案办公室保存着关于学生信息和学生成绩的文件;经济资助办公室保存着其自己的关于需要经济资助以继续学业的学生的文件;调度办公室保存着教授的姓名和他们所教的课程;工薪发放部门保存着其自己的关于全体教职员工(包括教授)的文件,等等。

Today,however,alloftheseflatfilescanbecombinedinasingleentity,thedatabaseforthewholeuniversity.

然而,所有这些平面文件今天都可结合成一个实体——供整个大学使用的数据库。

Althoughitisdifficulttogiveauniversallyagreeddefinitionofadatabase,weusethefollowingcommondefinition:

adatabaseisacollectionofrelated,logically,coherentdatausedbytheapplicationprogramsinanorganization.

虽然难以给出一个普遍接受的数据库定义,但我们使用下面常见的定义:

一个数据库是被一个机构内的应用程序所使用的具有逻辑相干性的相关数据的集合。

Ⅱ.DatabaseManagementSystems

二、数据库管理系统

Adatabasemanagementsystem(DBMS)defines,creates,andmaintainsadatabase.

数据库管理系统定义、创建和维护数据库。

TheDBMSalsoallowscontrolledaccesstodatainthedatabase.

数据库管理系统也允许对数据库中的数据进行受控的访问。

ADBMSisacombinationoffivecomponents:

hardware,software,data,users,andprocedures.

一个数据库管理系统由5个组成部分构成:

硬件、软件、数据、用户和规程。

1.Hardware

1、硬件

Thehardwareisthephysicalcomputersystemthatallowsaccesstodata.

硬件是指允许访问数据的计算机物理系统。

Forexample,theterminals,harddisk,maincomputerandworkstationsareconsideredpartofthehardwareinaDBMS.

例如,终端、硬盘、主机和工作站被认为是数据库管理系统的硬件组成部分。

2.Software

2、软件

Thesoftwareistheactualprogramthatallowsuserstoaccess,maintain,andupdatedata.

软件是指允许用户访问、维护和更新数据的实际程序。

Inaddition,thesoftwarecontrolswhichusercanaccesswhichpartsofthedatainthedatabase.

另外,软件还控制着哪个用户可以对数据库中的哪部分数据进行访问。

3.Data

3、数据

Thedatainadatabaseisstoredphysicallyonthestoragedevice.

数据库中的数据存储在物理存储设备上。

Inadatabase,dataisaseparateentityfromthesoftwarethataccessesit.

在一个数据库中,数据是独立于对其进行访问的软件的一个实体。

Thisseparationallowsanorganizationtochangethesoftwarewithouthavingtochangethephysicaldataorthewayinwhichitisstored.

这种独立使一个机构可以在不必更改物理数据及其存储方式的情况下更改软件。

IfanorganizationdecidestouseaDBMS,thenalltheinformationneededbytheorganizationshouldbekepttogetherasoneentity,tobeaccessiblebythesoftwareintheDBMS.

如果一个机构决定使用一个数据库管理系统,那么该机构所需要的所有信息都应作为一个实体保存在一起,可由数据库管理系统中的软件访问。

4.Users

4、用户

ThetermuserinaDBMShasabroadmeaning.

在数据库管理系统中,用户这个术语有着广泛的定义。

Wecandivideusersintotwocategories:

我们可以将用户分为两类:

endusersandapplicationprograms.

最终用户和应用程序。

Endusersarethosehumanswhocanaccessthedatabasedirectlytogetinformation.

最终用户是指可直接访问数据库以获取信息的人。

Therearetwotypesofendusers:

最终用户又分为两类:

databaseadministrators(DBAs)andnormalusers.

数据库管理员和普通用户。

DatabaseadministratorshavethemaximumlevelofprivilegesandcancontrolotherusersandtheiraccesstotheDBMS,grantsomeoftheirprivilegestosomebodyelse,butretaintheabilitytorevokethematanytime.

数据库管理员拥有最高程度的特权,可以控制其他用户及其对数据库管理系统的访问,可以将其某些特权授予其他人并保留随时收回这些特权的能力。

Anormaluser,ontheotherhand,canonlyusepartofthedatabaseandhaslimitedaccess.

另一方面,普通用户只能使用数据库的一部分,只能进行有限的访问。

Theotherusersofdatainadatabaseareapplicationprograms.

数据库中数据的其他用户就是应用程序。

Applicationsneedtoaccessandprocessdata.

应用程序需要访问和处理数据。

Forexample,apayrollapplicationprogramneedstoaccesspartofthedatainadatabasetocreatepaychecksattheendofthemonth.

例如,工薪发放应用程序需要在月底访问数据库中的部分数据,来开支付工薪的支票。

5.Procedures

5、规程

ThelastcomponentofaDBMSisasetofproceduresorrulesthatshouldbeclearlydefinedandfollowedbytheusersofthedatabase.

数据库管理系统的最后一个组成部分就是应该明确定义并为数据库用户所遵循的一套规程或规则。

Ⅲ.DatabaseArchitecture

三、数据库体系结构

TheAmericanNationalStandardsInstituteStandardsPlanningandRequirementsCommittee(ANSI/SPARC)hasestablishedathree-levelarchitectureforaDBMS:

美国国家标准协会标准计划与需求委员会(ANSI/SPARC)为数据库管理系统确立了一个包含3个层次的体系结构:

internal,conceptual,andexternal(Figure6A-1).

内层、概念层和外层(图6A-1)。

Figure6A-1:

图6A-1:

DatabaseArchitecture

数据库体系结构

1.InternalLevel

1、内层

Theinternalleveldetermineswheredataisactuallystoredonthestoragedevices.

内层决定数据在存储设备上的实际存储位置。

Thisleveldealswithlowlevelaccessmethodsandhowbytesaretransferredtoandfromstoragedevices.

该层涉及低级访问方法,以及字节如何传向和传自存储设备。

Inotherwords,theinternallevelinteractsdirectlywiththehardware.

换句话说,内层直接与硬件交互。

2.ConceptualLevel

2、概念层

Theconceptualleveldefinesthelogicalviewofthedata.

概念层定义数据的逻辑视图。

Thedatamodelisdefinedonthislevel,andthemainfunctionsoftheDBMS,suchasqueries,arealsoonthislevel.

数据模型在该层定义,数据库管理系统的主要功能——如查询——也在该层。

TheDBMSchangestheinternalviewofdatatotheexternalviewthatusersneedtosee.

数据库管理系统把数据的内部视图转化为用户需要看到的外部视图。

Theconceptuallevelisanintermediaryandfreesusersfromdealingwiththeinternallevel.

概念层是中介层,它使得用户不必与内层打交道。

3.ExternalLevel

3、外层

Theexternallevelinteractsdirectlywiththeuser(endusersorapplicationprograms).

外层直接与用户(最终用户或应用程序)交互。

Itchangesthedatacomingfromtheconceptualleveltoaformatandviewthatisfamiliartotheusers.

它将来自概念层的数据转化为用户所熟悉的格式和视图。

IV.DatabaseModels

四、数据库模型

Adatabasemodeldefinesthelogicaldesignofdata.

数据库模型定义数据的逻辑设计。

Themodelalsodescribestherelationshipsbetweendifferentpartsofthedata.

它也描述数据的不同部分之间的关系。

Inthehistoryofdatabasedesign,threemodelshavebeeninuse:

在数据库设计史上,使用过3种数据库模型:

thehierarchicalmodel,thenetworkmodel,andtherelationalmodel.

层次模型、网络模型和关系模型。

1.HierarchicalDatabaseModel

1、层次数据库模型

Inthehierarchicalmodel,dataisorganizedasaninvertedtree,eachentityhasonlyoneparentbutcanhaveseveralchildren.

在层次模型中,数据被组织成一棵倒置的树。

每个实体只有一个父,但可有数个子。

Atthetopofthehierarchy,thereisoneentity,whichiscalledtheroot.

在分层结构的顶部,有一个实体,称为根。

Figure6A-2showsalogicalviewofanexampleofthehierarchicalmodel.

图6A-2给出了一个层次模型例子的逻辑视图。

Thehierarchicalmodelisnowobsolete.

层次模型现在已经过时。

Figure6A-2:

图6A-2:

AnExampleoftheHierarchicalModelRepresentingaUniversity

代表大学层级的一个层次模型实例

2.NetworkDatabaseModel

2、网络数据库模型

Inthenetworkmodel,theentitiesareorganizedinagraph,inwhichsomeentitiescanbeaccessedthroughseveralpaths(Figure6A-3).

在网络模型中,实体以图的形式来组织,图中的有些实体可通过多条路径访问(图6A-3)。

Thereisnohierarchy.

网络模型没有分层结构。

Thismodelisnowalsoobsolete.

这种模型现在也已经过时。

Figure6A-3:

图6A-3:

AnExampleoftheNetworkModelRepresentingaUniversity

代表大学的一个网络模型实例

3.RelationalDatabaseModel

3、关系数据库模型

Intherelationalmodel,dataisorganizedintwo-dimensionaltablescalledrelations.

在关系模型中,数据被组织成称为关系的二维表。

Thereisnohierarchicalornetworkstructureimposedonthedata.

关系模型没有分层或网络结构强加于数据。

Thetablesorrelationsare,however,relatedtoeachother(Figure6A-4).

然而,表或关系是相互关联的(图6A-4)。

Figure6A-4:

图6A-4:

AnExampleoftheRelationalModelRepresentingaUniversity

代表大学的一个关系模型实例

Therelationaldatabasemanagementsystem(RDBMS)organizesthedatasothatitsexternalviewisasetofrelationsortables.

关系数据库管理系统组织数据,使其外部视图呈现为关系或表的集合。

Thisdoesnotmeanthatdataisstoredastables:

这并不意味着数据以表的形式存储:

thephysicalstorageofthedataisindependentofthewayinwhichthedataislogicallyorganized.

数据的物理存储与数据的逻辑组织方式毫无关系。

Figure6A-5showsanexampleofarelation.

图6A-5给出了一个关系的例子。

ArelationinanRDBMShasthefollowingfeatures:

关系数据库管理系统中的关系具有以下特征:

Figure6A-5:

图6A-5:

AnExampleofaRelation

关系实例

Name.

●名称。

Eachrelationinarelationaldatabaseshouldhaveanamethatisuniqueamongotherrelations.

关系数据库中的每个关系都应具有一个名称,而这个名称在所有关系中是独一无二的。

Attributes.

●属性。

Eachcolumninarelationiscalledanattribute.

关系中的每一列都称为一个属性。

TheattributesarethecolumnheadingsinthetableinFigure6A-5.

在图6A-5的表中,属性是列的标题。

Eachattributegivesmeaningtothedatastoredunderit.

每个属性赋予存储在其下面的数据以意义。

Eachcolumninthetablemusthaveanamethatisuniqueinthescopeoftherelation.

表中的每一列都必须具有一个在关系的范围内独一无二的名称。

Thetotalnumberofattributesforarelationiscalledthedegreeoftherelation.

一个关系的属性总数称为该关系的度。

Forexample,inFigure6A-5,therelationhasadegreeof3.

例如,在图6A-5中,关系的度为3。

Notethattheattributenamesarenotstoredinthedatabase:

注意属性名并不存储在数据库中:

theconceptuallevelusestheattributestogivemeaningtoeachcolumn.

概念层使用属性给每一列赋予一定的意义。

nTuples.

●元组。

Eachrowinarelationiscalledatuple.

关系中的每一行称为一个元组。

Atupledefinesacollectionofattributevalues.

元组定义一组属性值。

Thetotalnumberofrowsinarelationiscalledthecardinalityoftherelation.

一个关系中的总行数称为该关系的基数。

Notethatthecardinalityofarelationchangeswhentuplesareaddedofdeleted.

注意一个关系的基数随着元组的增加或删除而改变。

Thismakesthedatabasedynamic.

这使数据库具有了动态性。

Therelationalmodelisoneofthecommonmodelsinusetoday.

关系模型是今天使用的常见模型之一。

Theothertwocommonmodelsthatarederivedfromtherelationalmodelarethedistributedmodelandtheobject-orientedmodel.

源自关系模型的另外两种常见模型是分布式模型和面向对象模型。

4.DistributedDatabaseModel

4、分布式数据库模型

Thedistributeddatabasemodelisnotanewmodel,butisbasedontherelationalmodel.

分布式数据库模型并非一种新模型,而是基于关系模型的。

However,thedataisstoredonseveralcomputersthatcommunicatethroughtheInternetoraprivatewideareanetwork.

但是,数据存储在通过因特网或专用广域网通信的数台计算机上

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

当前位置:首页 > 高等教育 > 艺术

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1