- 1、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
第三章:关系模型Chapter 3: Relational Model 关系数据库的结构Structure of Relational Databases 关系代数Relational Algebra 元组关系演算Tuple Relational Calculus 域关系演算Domain Relational Calculus 扩展关系代数操作Extended Relational-Algebra-Operations 数据库更新Modification of the Database 视图Views 关系示例Example of a Relation 基本结构Basic Structure 给定一组域集,则关系是该域集的笛卡尔积的子集。即关系是N元集合,其中每个元素都隶属于某个域。Formally, given sets D1, D2, …. Dn a relation r is a subset of D1 x D2 x … x DnThus a relation is a set of n-tuples (a1, a2, …, an) where ai ? Di 例:Example: if customer-name = {Jones, Smith, Curry, Lindsay} customer-street = {Main, North, Park} customer-city = {Harrison, Rye, Pittsfield}Then r = { (Jones, Main, Harrison), (Smith, North, Rye), (Curry, North, Rye), (Lindsay, Park, Pittsfield)} 其中,r是基于上述三个域的关系。is a relation over customer-name x customer-street x customer-city 属性类型Attribute Types 每个关系的属性都有一个名称。Each attribute of a relation has a name 各属性的取值范围集称为属性的域。The set of allowed values for each attribute is called the domain of the attribute 属性的值通常要求是原子性的,即不能分割。Attribute values are (normally) required to be atomic, that is, indivisible 例如,多值属性可以不是原子性的。E.g. multivalued attribute values are not atomic 例如,组合属性值不是原子性的。E.g. composite attribute values are not atomic 空值这一特殊的值包含在所有的域中。The special value null is a member of every domain 空值导致了许多操作定义的复杂性。The null value causes complications in the definition of many operations 在主体表示中可以先忽略空值,将其放在以后再考虑。 we shall ignore the effect of null values in our main presentation and consider their effect later 关系模式Relation Schema A1, A2, …, An 是属性are attributes R = (A1, A2, …, An )是关系模式 is a relation schema 例如,E.g. Customer-schema = (customer-name, customer-street, customer-city) r(R) 是关系模式R中的一个关系。is a relation on the relation schema R 例如,E.g. customer (Customer-schema) 关系实例Relation Instance 关系的当前值(关系实例)用表来表示。The current values (relation instance) of a relation are specified by a table r中元素t称为无组,
文档评论(0)