下載本文檔
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認(rèn)領(lǐng)
文檔簡介
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.標(biāo)示性聯(lián)系是從弱實體機到標(biāo)識實體集的多對一關(guān)系,并且弱實體集全部參與。弱實體集主碼由標(biāo)志實體集的主碼并上弱實體集的分辨符。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參與聯(lián)系的實體集的主碼跟聯(lián)系自身的屬性。Redundancy of Schemas多對一時,可以將多的實體類跟聯(lián)系集合并在成一個包含了兩個模式所有屬性的并集的模式。一對一時,聯(lián)系集的關(guān)系模式可以跟參與聯(lián)系的任何一個實體集的模式進行合并。一般來講,
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025至2030年中國純棉毛巾被數(shù)據(jù)監(jiān)測研究報告
- 2025至2030年中國柜式消防排煙風(fēng)機數(shù)據(jù)監(jiān)測研究報告
- 2025至2030年中國可沖洗式隨身接尿器數(shù)據(jù)監(jiān)測研究報告
- 2025年中國鉀復(fù)合肥市場調(diào)查研究報告
- 2025年中國低噪聲變風(fēng)量風(fēng)機箱市場調(diào)查研究報告
- 不同劑量BaP調(diào)控AhR與XRE1或XRE3的結(jié)合影響肝臟脂質(zhì)代謝的分子機制
- 2025年度門面房出租合同(含物業(yè)維護升級及租金遞增協(xié)議)2篇
- 2025年度體育賽事臨時看臺搭建與拆除合同協(xié)議書3篇
- 二零二五年度新能源投資合作出資協(xié)議范本4篇
- 二零二四年度智能安防系統(tǒng)設(shè)計與實施合同
- 2023-2024學(xué)年度人教版一年級語文上冊寒假作業(yè)
- 2024醫(yī)療銷售年度計劃
- 稅務(wù)局個人所得稅綜合所得匯算清繳
- 人教版語文1-6年級古詩詞
- 上學(xué)期高二期末語文試卷(含答案)
- 軟件運維考核指標(biāo)
- 七年級下冊英語單詞默寫表直接打印
- 2024版醫(yī)療安全不良事件培訓(xùn)講稿
- 中學(xué)英語教學(xué)設(shè)計PPT完整全套教學(xué)課件
- 移動商務(wù)內(nèi)容運營(吳洪貴)項目五 運營效果監(jiān)測
- 比較思想政治教育學(xué)
評論
0/150
提交評論