没有合适的资源?快使用搜索试试~ 我知道了~
首页计算机类外文翻译(毕业设计用)
计算机类外文翻译(毕业设计用)
4星 · 超过85%的资源 需积分: 10 16 下载量 115 浏览量
更新于2023-03-16
评论
收藏 159KB DOC 举报
从E/R图表到相关设计,处理不稳固实体集,等等一些外文摘要翻译,中英文对照。
资源详情
资源评论
资源推荐
英文资料
3.2 From E/R Diagrams to Relational Designs
Let us consider the process whereby a new database, such as our movie database is created. We
begin with a design phase, in which we address and answer questions shout what information will
be stored, how information elements will be related to one another, what constraints such as keys or
referential integrity may be assumed, and so on. This phase may last for a long time, while options
are evaluated and opinions are reconciled.
The design phase is followed by an implementation phase using a real database system. Since
the great majority of commercial database systems use the relational model, we might suppose that
the design phase should use this model too, rather than the E/R model or another model oriented
toward design.
However, in practice it is often easier to start with a model like E/R, make our design, and then
convert it to the relational model. The primary reason for doing so is that the relational model,
having only one concept - the relation - rather than several complementary concepts (e.g., entity
sets and relationships in the E/R model) has certain inflexibilities that are best handled after a
design has been selected.
To a first approximation, converting an E/R design to a relational database schema is
straightforward:
Turn each entity set into a relation with the same set of attributes
Replace a relationship by a relation whose attributes are the keys for the connected entity
sets
While these two rules cover much of the ground, there are also several special situations that
we need to deal with, including:
1. Weak entity sets cannot be translated straightforwardly to relation.
2. “Isa” relationships and subclasses require careful treatment.
3. Sometime, we do well to combine two relations, especially the relation for an entity set E
and the relation that comes that comes form a many-one relationship form E to some other
entity set.
3.2.1 From Entity Sets to Relations
Let us first consider entity sets that are not weak. We shall take up the modifications needed to
accommodate weak entity sets in Section 3.2.4. For each non-weak entity set, we shall create a
relation of the same name and with the same set of attributes. This relation will not have any
indication of the relationships in which the entity set participates; we’ll handle relationships with
separate relations, as discussed in Section 3.2.2.
Example 3.1: Consider the there entity sets Movies, stars and studios from Fig.2.17, which we
reproduce here as Fig.3.4. The attributes for the Movies entity set are title, year, length, and film
Type. As a result, the relation Movies looks just like the relation Movies of Fig.3.1 with which we
began Section 3.1
Next, consider the entity set stars from Fig.3.4. There are two attributes, name and address.
Thus, we would expect the corresponding stars relation to have schema stars (name, address) and
for a typical instance of the relation to look like
name address
Carrie Fisher 123 Maple st . , Hollywood
Mark Hamill 456 Dak Rd . , Brentwood
Harrison Ford 789 Palm Dr . , Beverly Hills
3.2.2 From E/R Relationship to Relation
Relationships in the E/R model are also represented by relation. The relation for a given relationship
R has the following attributes:
1. For each entity set involved in relationship R, we take its key attribute or attributes as part
of the schema of the relation for R.
title year
leng
th
filmTyp
ey
Movies
Stars-
in
stars
name addres
s
own
s
studios
name
addres
s
Figure 3.4 E/R diagram for the movie database
2. If the relationship has attributes, then these are also attributes of relation R.
If one entity set is involved several times in a relationship, in different roles, then its key
attributes each appear as many times as there are roles. We must rename the attributes to avoid
name duplication. More generally, should the same attribute name appear twice or more among the
attributes of R itself and the keys of the entity sets involved in relationship R, then we need to
rename to avoid duplication.
Example 3.2 Consider the relationship Owns of Fig.3.4. This relationship connects entity sets
Movies and Studios. Thus, for the schema of relation Owns we use the key for Movies, which is
title and year, and the key of studios, which is name. That is, the schema is:
Owns (title, year, studio Name)
A sample instance of this relation is:
title year Studio Name
Star Wars
Mighty Ducks
Wayne’s World
1977
1991
1992
Fox
Disney
Paramount
We have chosen the attribute studio Name for clarity; it corresponds to the attribute name studios.
Example 3.3 Similarly, the relationship star-in of Fig.3.4 can be transformed into a relation with the
attributes title and year (the key for Movies) and attribute star Name, which is the key for entity set
stars. Figure 3.5 shows a sample relation stars-in.
Because these movie titles are unique, it seems that the year is redundant in Fig.3.5. However,
had there been several movies of the same title, like “King Kong,” we would see that the year was
essential to sort out which stars appear in which version of the movie.
title year Studio Name
Star Wars
Star Wars
Star Wars
Mighty Ducks
1977
1977
1977
1991
Carrie Fisher
Mark Ham ill
Harrison Ford
Emilio Estevez
A Note About Data Quality:
While we have endeavored to make example data as accurate as possible, we have used bogus
value for addresses and other personal information about movie stars, in order to protect the
privacy of members of the acting profession, many of whom are shy individuals who shun
publicity.
剩余13页未读,继续阅读
化身也
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- ExcelVBA中的Range和Cells用法说明.pdf
- 基于单片机的电梯控制模型设计.doc
- 主成分分析和因子分析.pptx
- 共享笔记服务系统论文.doc
- 基于数据治理体系的数据中台实践分享.pptx
- 变压器的铭牌和额定值.pptx
- 计算机网络课程设计报告--用winsock设计Ping应用程序.doc
- 高电压技术课件:第03章 液体和固体介质的电气特性.pdf
- Oracle商务智能精华介绍.pptx
- 基于单片机的输液滴速控制系统设计文档.doc
- dw考试题 5套.pdf
- 学生档案管理系统详细设计说明书.doc
- 操作系统PPT课件.pptx
- 智慧路边停车管理系统方案.pptx
- 【企业内控系列】企业内部控制之人力资源管理控制(17页).doc
- 温度传感器分类与特点.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论2