数据库系统英第三版课件衷宜2011版 relation(2).ppt

数据库系统英第三版课件衷宜2011版 relation(2).ppt

ID:51969287

大小:1.04 MB

页数:77页

时间:2020-03-26

数据库系统英第三版课件衷宜2011版 relation(2).ppt_第1页
数据库系统英第三版课件衷宜2011版 relation(2).ppt_第2页
数据库系统英第三版课件衷宜2011版 relation(2).ppt_第3页
数据库系统英第三版课件衷宜2011版 relation(2).ppt_第4页
数据库系统英第三版课件衷宜2011版 relation(2).ppt_第5页
资源描述:

《数据库系统英第三版课件衷宜2011版 relation(2).ppt》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、Chapter2TheRelationalModelofData第2章关系数据模型2TheRelationalModelofDataWhatisadatamodel?Whatisarelationaldatamodel?HowtodefinearelationschemainSQL?Whichoperationscanbeintherelationalmodel?Whataretheresultoftheseoperations?Theoperationsintherelationalmodelcanbeexpr

2、essedineitheranalgebra,called“relationalalgebra”.Relationalalgebracanexpressnotonlyoperations,butalsoconstraintsonrelations.关系数据模型关系代数约束2.1AnOverviewofDataModelsWhatisadatamodel?Mathematicalrepresentationofdata.Examples:relationalmodel=tables;semistructuredmo

3、del=trees/graphs.Operationsondata.Constraints.2.1AnOverviewofDataModelsSeveraldatamodelsTherelationalmodel,includingobject-relationalextensionsThesemistructured-datamodel,includingXMLandrelatedstandardsThehierarchicalmodel层次模型Thenetworkmodel网状模型2.2Basicsofthe

4、RelationalModelRelation关系Atwo-dimensionaltablecalledarelation.titleyearlengthfilmTypeStarWarsWayne’sWorldMightyDucks…197719921991…12495104…colorcolorcolor…Movies2.2BasicsoftheRelationalModelWhyRelations?Verysimplemodel.Oftenmatcheshowwethinkaboutdata.Abstract

5、modelthatunderliesSQL,themostimportantdatabaselanguagetoday.2.2.1AttributesAttribute属性Namesforthecolumnsoftherelation,describethemeaningofentriesinthecolumnbelow.SuchaslengthofMovies.Anattributehaveaname.Anytwoattributesofarelationcan’thavesamename.titleyearl

6、engthfilmTypeStarWarsWayne’sWorldMightyDucks…197719921991…12495104…colorcolorcolor…Attributes(columnheaders)2.2.2SchemasRelationschema=relationnameandattributelist.Optionally:typesofattributes.Database=collectionofrelations.Databaseschema=setofallrelationsche

7、masinthedatabase.Example:Movies(title,year,length,filmtype)orMovies(title:string,year:int,length:int,filmtype:string)关系模式2.2.3TuplesTuples元组Therowsofarelation,otherthantheheaderrowcontainingtheattributes,arecalledtuples.Theremaybenotupleinarelation.Atuplehaso

8、necomponentforeachattributeoftherelation.titleyearlengthfilmTypeStarWarsWayne’sWorldMightyDucks…197719921991…12495104…colorcolorcolor…Tuples(rows)分量2.2.3TuplesHowtodescribeatuple?Usecomma

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。