




下載本文檔
版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
1、Database Chapter Six OutlineDesign ProcessConceptual-design - Chooses a data model, translates the requirements into a conceptual schema of databaseRedundancyIncompletenessModelingA database can be modeled as:a collection of entities,relationship among entities.An entity is an object that exists and
2、 is distinguishable from other objects.Entities have attributesAn entity set is a set of entities of the same type that share the same properties.Relationship SetsA relationship is an association among several entitiesA relationship set is a mathematical relation among n 2 entities, each taken from
3、entity sets(e1, e2, en) | e1 E1, e2 E2, , en Enwhere (e1, e2, , en) is a relationshipThe association between entity sets is referred to as participation The entity sets E1,E2,En participate in relationship set RRelationship instance represents an association between the named entities in the real-wo
4、rld enterprise that is being modeledRole-The function that an entity plays in a relationshipRecursive relationship set-the same entity set participate in a relationship set more than onceDescriptive attribute -An attribute can also be property of a relationship set.Degree-Refers to number of entity
5、sets that participate in a relationship set.AttributesAn entity is represented by a set of attributes, that is descriptive properties possessed by all members of an entity set. Domain the set of permitted values for each attribute Attribute types:Simple and composite attributes.Single-valued and mul
6、ti-valued attributesExample: multivalued attribute: phone_numbers Derived attributesCan be computed from other attributesMapping Cardinality ConstraintsExpress the number of entities to which another entity can be associated via a relationship set.For a binary relationship set the mapping cardinalit
7、y must be one of the following types:One to oneOne to manyMany to oneMany to many E-R DiagramsRectangles represent entity sets.Diamonds represent relationship sets.Lines link attributes to entity sets and entity sets to relationship sets.Ellipses represent attributesDouble ellipses represent multiva
8、lued attributes.Dashed ellipses denote derived attributes.Underline indicates primary key attributes Roles Role labels are optional, and are used to clarify semantics of the relationshipWe express cardinality constraints by drawing either a directed line (), signifying “one,” or an undirected line (
9、), signifying “many,” between the relationship set and the entity set.One-To-Many RelationshipIn the one-to-many relationship a loan is associated with at most one customer via borrower, a customer is associated with several (including 0) loans via borrower Many-To-One RelationshipsIn a many-to-one
10、relationship a loan is associated with several (including 0) customers via borrower, a customer is associated with at most one loan via borrower Many-To-Many RelationshipParticipation of an Entity Set in a Relationship SetTotal participation (indicated by double line): every entity in the entity set
11、 participates in at least one relationship in the relationship setPartial participation: some entities may not participate in any relationship in the relationship setDesign IssuesUse of entity sets vs. relationship setsPossible guideline is to designate a relationship set to describe an action that
12、occurs between entitiesMay cause replicationBinary versus n-ary relationship setsAlthough it is possible to replace any nonbinary (n-ary, for n 2) relationship set by a number of distinct binary relationship sets, a n-ary relationship set shows more clearly that several entities participate in a sin
13、gle relationship.Placement of relationship attributesFor 1-1, reposition to eitherFor 1-m,or m-1, reposition to m sideConverting Non-Binary Relationships to Binary FormWeak Entity SetsAn entity set that does not have a primary key is referred to as a weak entity set.An entity set that does not have
14、a primary key is referred to as a weak entity set. e.g. Employee and Family member, Contract and Attachment The existence of a weak entity set depends on the existence of a identifying entity set it must relate to the identifying entity set via a total, one-to-many relationship set from the identify
15、ing to the weak entity setIdentifying relationship depicted using a double diamondThe discriminator (or partial key) of a weak entity set is the set of attributes that distinguishes among all the entities of a weak entity set.標示性聯系是從弱實體機到標識實體集的多對一關系,并且弱實體集全部參與。弱實體集主碼由標志實體集的主碼并上弱實體集的分辨符。Design Constr
16、aints on a Specialization/GeneralizationConstraint on which entities can be members of a given lower-level entity set.condition-definedExample: all customers over 65 years are members of senior-citizen entity set; senior-citizen ISA person.-attribute-defineduser-definedConstraint on whether or not e
17、ntities may belong to more than one lower-level entity set within a single generalization.Disjointan entity can belong to only one lower-level entity setNoted in E-R diagram by writing disjoint next to the ISA triangle Overlappingan entity can belong to more than one lower-level entity set Completen
18、ess constraint - specifies whether or not an entity in the higher-level entity set must belong to at least one of the lower-level entity sets within a generalization.total : an entity must belong to one of the lower-level entity sets. We use a double line to connect the box representing the higher-l
19、evel entity set to the triangle symbolpartial: an entity need not belong to one of the lower-level entity setsAggregation (Cont.)Eliminate this redundancy via aggregation Treat relationship as an abstract entityAllows relationships between relationships Abstraction of relationship into new entitySum
20、mary of Symbols Used in E-R NotationRepresenting Entity Sets as SchemasA strong entity set reduces to a schema with the same attributes.A weak entity set becomes a table that includes a column for the primary key of the identifying strong entity setRepresenting Relationship Sets as SchemasA binary m
21、any-to-many relationship set is represented as a schema with attributes for the primary keys of the two participating entity sets, and any descriptive attributes of the relationship set. a1,a2,an b1,b2,bn參與聯系的實體集的主碼跟聯系自身的屬性。Redundancy of Schemas多對一時,可以將多的實體類跟聯系集合并在成一個包含了兩個模式所有屬性的并集的模式。一對一時,聯系集的關系模式可以跟參與聯系的任何一個實體集的模式進行合并。一般來講,
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 公司pk策劃方案
- 2025至2030年中國仿真培訓器行業投資前景及策略咨詢報告
- 2025至2030年中國二片/三片/四片盒行業投資前景及策略咨詢報告
- 2025至2030年中國Ⅴ型螺栓行業投資前景及策略咨詢報告
- 公司三月三美食活動方案
- 公司舉辦唱歌活動方案
- 2025年眼科白內障手術的術前檢查試題
- 2025至2030年中國黑碳化硅行業市場發展潛力及投資風險預測報告
- 2025至2030年中國高純硒化氫行業市場現狀分析及未來前景規劃報告
- 2025至2030年中國阿加曲班注射液產業發展態勢及投資潛力研究報告
- DLT 1055-2021 火力發電廠汽輪機技術監督導則
- 學校后勤服務滿意度調查問卷
- 計算機專業英語ppt課件(PPT 326頁)
- 珠算基本指法——三指法
- 美國通用電氣公司改革案例
- 三會兩制一課記錄表
- pantone_潘通色卡_電子版
- 最新消防排煙規范-消防排煙計算表
- 模具中英文對照1
- 蘇教版一年級下冊數學易錯題、難題
- EBZ260A掘進機拆除打運施工安全技術措施講述
評論
0/150
提交評論