parttwodatabasedesign(编辑修改稿)内容摘要:
the primary key need to consider semantics of relationship set in selecting the primary key in case of more than one candidate key Keys For Entity Sets (cont.) March 2020 Database System Concepts Chapter6 Database Design and ER Model 33 Keys for relationship sets R on entities E1, E2, …, En R = {(e1, e2, …, e n) | e1∈ E1,…, e n∈ En} ⊆E1 ╳ E2 ╳ … ╳ En , how to uniquely distinguish each relationship instances {(e1, e2, …, e n) ? R is the bination of E1, E2, …, En, each Ei can be uniquely distinguished by primary_key(Ei), 1 ≤i ≤n, so the set of all attributes in primary_key(E1), primary_key(E2), …, primary_key(En) can be used to recognize (e1, e2, …, e n) Keys For Relationship Sets March 2020 Database System Concepts Chapter6 Database Design and ER Model 34 The super_key for R primary_key(E1) ∪ primary_key(E2) …. ∪ primary_key(En) . in , (customerid, accountnumber) is the super key of depositor note if the attribute names of primarykeys are not unique, the attributes with the same names should be renamed The candidate keys for R minimal, nonredundant super keys Keys For Relationship Sets (cont.) March 2020 Database System Concepts Chapter6 Database Design and ER Model 35 The candidate keys or the primary key for a binary relationship set R among entity sets A and B can be decided as follows, in accordance with the mapping cardinality of R R is manytomany, primary_key(R) = primary_key(A) ∪ primary_key(B) R is manytoone from A to B, !! primary_key(R) = primary_key(A) R is onetomany, !! primary_key(R) = primary_key(B) Keys For Relationship Sets (cont.) March 2020 Database System Concepts Chapter6 Database Design and ER Model 36 R is onetoone, primary_key(R) = primary_key(A) or: primary_key(R) = primary_key(B) Keys For Relationship Sets (cont.) March 2020 Database System Concepts Chapter6 Database Design and ER Model 37 The participation of an entity E in a relationship R is total, if every entity in E participates in at least one relationship in R . participation of loan in borrower is total refer to every loan must have a customer associated to it via borrower The participation of an entity E in a relationship R is partial, if some entities in E may not participate in any relationship in R . participation of customer in borrower is partial refer to Fig. 167。 Participate Constraints March 2020 Database System Concepts Chapter6 Database Design and ER Model 38 A B R . . A B R (b) total participation (a) partial participation Fig. Total/participation participation Participate Constraints (cont.) March 2020 Database System Concepts Chapter6 Database Design and ER Model 39 Fig. Total participation of an entity set in a relationship set partial total Participate Constraints (cont.) March 2020 Database System Concepts Chapter6 Database Design and ER Model 40 Cardinality limits (参与的基数界限 ) are used to express quantitative constraints on participation /* 设联系 R关联了 entity sets A和 B, 为 定量地 描述 A参与 R的 total/partial participation 和 A中的 entity与 B中的 entity的 mapping cardinality, 引入实体参与联系的 cardinality limits A参与 R的基数下界 lA和上界 hA , refer to A中的每个实体 a通过 R关联了最少 lA个、最多 hA个 B中实体 b lA : 对 A中的每个实体 a, B中至少有 lA个实体 b通过 R与其对应 /关联 hA:对 A中的每个实体 a, B中至多有 hA个实体 b通过 R与其对应 /关联 Cardinality Limits for Participation (pp219220) a1 a2 a3 am b1 b2 b3 … bn1 bn bj … lA…. hA … A R B lB…. hB Illustration for cardinality limits lA=1, hA=3 lB=0, hB =2 March 2020 Database System Concepts Chapter6 Database Design and ER Model 42 Cardinality limits on the relationship set Cardinality Limits for Participation (cont.) one partial many total pared with March 2020 Database System Concepts Chapter6 Database Design and ER Model 43 Note * indicates no limit in some textbooks, 将 lA ,hA 放在 ER图中的 B处 Cardinality limits vs total/partial participation lA =0: A is partial participation of R lA 0: A is total participation of R, equivalent to double line ( . in , ) Cardinality Limits for Participation (cont.) March 2020 Database System Concepts Chapter6 Database Design and ER Model 44 Cardinality limits vs mapping cardinality 设联系 R关联了实体集 A和 B, 利用 A的 基数界限 lA , hA中的 hA 、 B的 基数界限 lB , hB中的 hB , 可推导出联系 R的映射基约束 hB , hA 表示了联系 R的 从 A到 B的映射基约束 !!!! . in , considering mapping cardinality form customer to loan mapping cardinality form customer to loan depends on hloan, hcustomer for customer, hcustomer=*, for loan, hloan =1 so, hloan, hcustomer = 1, *, and is one to many Cardinality Limits for Participation (cont.) March 2020 Database System Concepts Chapter6 Database Design and ER Model 45 The associations between cardinality limits and the mapping cardinality are classified as follows, and illustrated by Cardinality Limits for Participation (cont.) b5 a4 From A to B, one to one (1:1), lA , hA = 1, 1, lB , hB = 0, 1。 From A to B, one to many (1:2), lA , hA = 0, 2, lB , hB = 1, 1 Associations between cardinality limits and mapping cardinality Form A to B, many to one (2:1), lA , hA = 1, 1, lB , hB = 1, 2 Form A to B, many to many (2:2) lA , hA = 1, 2 lB , hB = 1, 2 March 2020 Database System Concepts Chapter6 Database Design and ER Model 48 167。 ER diagrams Rectangles represent entity sets Diamonds represent relationship sets Lines link attributes to entity sets and entity sets to relationship sets. Ellipses represent attributes double ellipses represent multivalued attributes dashed ellipses denote derived attributes Underline ind。parttwodatabasedesign(编辑修改稿)
相关推荐
林为宜,在出血发生后 710天重启( Ⅱb , B类推荐) PCI后并发出血脑卒中的患者,接受抗栓治疗预后与无出血相似 建议对症状性出血患者停用抗栓治疗等致出血的药物治疗,一般于出血病情稳定 710天后给予氯吡格雷抗栓治疗 再发血栓风险相对较大和左主干病变等患者,可于 PCI术后 35天开始接受氯吡格雷治疗 房颤患者 PCI术后的抗栓策略 房颤抗栓治疗的重要性 研究结果表明,在行
( 1)用户选择用于加密私钥的口令。 ( 2)当系统使用 RSA产生新的公钥 /私钥对时,系统向用户请求口令短语,使用 SHA1从口令短语中产生 160位的hash代码,然后丢弃该口令短语。 ( 3)系统使用 CAST128加密私钥,并把 128位的 hash代码用作密钥,然后丢弃 hash代码,并且在私钥环中保存加密后的私钥。 当用户访问私钥环以检索私钥时,必须提供口令短语。
热力学研究的对象是由大量微粒组成的宏观物质体系 . 它以热力学三大经验定律为基础 , 由实验直接可测的宏观物理量 (如 T、 p、 V ),并由此演绎经数学处理建立了一些热力学函数 (如 U、 H、S、 F、 G 等 ),从而得出一定条件下体现状态发生变化时 , 体系和环境交换的能量 , 以及判断体系自动进行的方向和限度。 物理化学电子教案 绪 论 热力学方法是一种宏观演绎的方法 ,
仓储和邮政业; • 信息传输、计算机服务和软件业; • 批发和零售业; • 住宿和餐饮业; • 金融业; • 房地产业; • 租赁和商务服务业; • 科学研究、技术服务和地质勘察业; • 水利环境和公共设施管理业; • 环境管理业; • 居民服务和其他服务业; • 教育; • 卫生、社会保障和社会福利业; • 文化、体育和娱乐业; • 公共管理和社会组织 20个行业门类、 95个大类、
用於處理分散式異動交易 (Distributed Transaction) 環境下的資料回復。 通常用於分散式資料庫中的失敗處理。 數位教材 資料庫系統設計與應用 20 LOCK (LCKn) 主要用於處理多個 Oracle Instance 之間的鎖定(Lock)。 數位教材 資料庫系統設計與應用 21 資料庫結構 (Database Structure) 一個 ORACLE 資料庫可分為
share pool 中没有做 keep。 (这个是普遍原因) cursor_sharing=force 或者会话缓存游标没有用( session_cached_cursors) 共享池 2 SQL老化的问题 不停的被新 sql排挤出共享池的过程。 解决办法:绑定变量 共享池越大是否性能越高 不是, cpu管理开销增大, latch占用时间变长 绑定变量的作用 增加重用,防止老化