1、Topic 2: Semantic Data ModelTed Codds Relational Model “Derivability, Redundancy, and Consistency of Relations Stored in Large Data Banks,” IBM Research Report RJ 599 ( August 19th, 1969) “A Relational Model of Data for Large Shared Data Banks”, CACM 13, No.6 (June 1970)Ted Codds Data Model Incident
2、ally, its not as widely known as it should be that Ted not only invented the relational model in particular, he invented the whole concept of a data model in general. See his paper: “Data models in Database Management”, ACM SIGMOD Record 11, No.2 (Feb 1981)Ted Codds essentiality to“The Great Debate”
3、 The Great Debatethe official title was Data Models: Data-Structure-Set vs. Relational was a special event held at the 1974 SIGMOD Workshop Information Principle:The entire information content of a relational database is represented in one and only one way: namely, as attribute values within tuples
4、within relationsA new formal definition of the relation model Briefly, the relational model consists of five components: An open-ended collection of scalar types(including the type boolean or truth value) A relation type generator Facilities for defining relation variables of such generated relation
5、 types A relational assignment operation for assigning relation values to such relation variables An open-ended collection of generic relational operators (“the relational algebra”) for deriving relation values from other relation valuesSee SIGMOD Record, Vol.32, No.4, Dec 2003新的关系模型定义 一个可扩展的数据类型的集合
6、(尤其包括布尔型或真值型); 关系类型生成器和对应这些关系类型的解释器; 实用程序;用于定义生成关系类型的关系变量; 向关系变量赋关系值的关系赋值操作; 从其他关系值中产生关系值的可扩充的关系操作符集合。关系模型评述 关系数据模型是现代数据库技术的基础,它使这一领域具有了科学性 关系模型不是一个静态的事物,理解这一点是非常重要的过去几年里它不断发展和进化,未来将仍然如此 C.J. Date 用五章篇幅描述这部分内容(这一部分完全可单独成书)。但是,长度正反映了这部分内容的重要性。 用一两页的篇幅来概述这部分内容也是完全可能的;事实上,关系模型的一个主要优点就是其基本内容可非常容易地阐述和理解。
7、参考 : 数据库系统导论 , C J Date语义数据模型 数据库技术的核心是数据模型 数据模型既提供了考虑面向数据处理应用的概念基础,也提供了使用数据库系统的技术和工具的形式基础 新的应用要求数据模型提供更丰富的抽象手段,更富于语义表现力,更适宜直接表达用户对现实世界的认识,并适应不断变化的应用环境。这导致了新一代数据模型 语义数据模型研究的发展经典数据模型的缺陷 经典数据模型都是基于记录,面向机器的 经典数据模型缺乏对以下的支持 Relationship(子类关系( has-subtype)、属性关系( has-attribute)、实例关系( has-instance)) Data ab
8、straction Constraints Unstructured objects Dynamic properties of an application对语义数据模型的要求 模拟静态特性:语义数据模型必须把一个应用环境的静态结构视为有抽象对象组成的,模型必须提供表达对象间类属联系与其他联系的手段。模型要有支持同一数据结构上的多重视图的能力,并能满足发展的要求。即要求语义数据模型必须功能丰富,具有高度的数据独立性,并具有控制数据冗余的手段 模拟动态特性:必须面向对象,支持定义应用动态特性 集成化:为便于实现和应用,语义数据模型的静态和动态方面语义数据模型的分类( 1) 经典数据模型的直接扩
9、展 EER模型: RM/T模型: 数学模型 基于集合论的模型,基于一阶逻辑的模型,基于泛实例假设的模型 不可约数据模型 信息表示为原子事实与分子事实 二元关系模型 不可约关系模型 函数数据模型语义数据模型的分类( 2) 静态语义层次模型 将关系模型与人工智能中语义网络概念结合起来,形成一组重要的数据抽象概念,如分类,聚集,概括,联合 多维层次结构,特性继承 SHM, ADD, LGDM, SAM, SDM, RM/T 动态语义数据模型 引入事件表达原语操作,数据对象上的操作和应用操作 事件表示为参数化的程序:原语操作,活动,事务 动态模型将数据与其上的操作结合起来,把模式的概念加以扩展以包含活
10、动定义,即将数据的结构特性与行为特性紧密结合在一起 SHM+, TAXIS, Event Model等参考 : Semantic Data Models, ACM Computing Surveys, Vol.20(3),1988Challenge Integration of Text, Data, Code, and Streams Structured data Text, space, time, image, and multimedia data Procedural data, that is data types and the methods that encapsulate
11、 them Triggers Data Streams and queues-From Lowell ReportEntity-Relationship Model ER model was proposed by Peter Chen in 1976. Many extensions have been made (Extended Entity-Relationship model or EER model). There is a dedicated International Conference on ER Approach. ER model has become de facto
12、 standard tool for conceptual schema design. Extended ER Model (EER Model) Various extensions to ER model exist. We introduce two extensions:More accurate connectivity description.Generalization/specialization hierarchy.AggregationMultiplicity for Complex Relationships(1) One in ER model means zero
13、or one. Many in ER model means zero or more. Multiplicity: The number (or range) of possible occurrences of an entity type in an n-ary relationaship when the other(n-1) values are fixedtakesStudents(1, 5) (5, 60)CoursesMultiplicity for Complex Relationships(2) General format:0 = 1), E is said to hav
14、e total(or mandatory) participation in R. If min_card = 0, E is said to have partial(or optional) participation in R.Cardinality and Participation Constraint (4)Employees has a partial participation.Departments has a total participation.managesEmployees(0, 1) (1,1)DepartmentsOne emp manages One dept
15、One dept is managedBy one empNot all empManage dept (optional)All dept are managed(mandatory)CardinalityParticipation managesEmployees(1, 1) (0,1)DepartmentsOne emp manages One deptOne dept is managedBy one empAll emp Manage dept (Mandatory)Not all dept are managed(optional)CardinalityParticipation
16、Representing 1-to-1, 1-to-m, m-to-mRelationships RE(0, 1) (0, 1)Fone-to-one:RE(0, m) (0, n)Fmany-to-many:RE(0, m) (0,1)Fone-to-many:RE1mFProblems with ER Models Problems may arise when designing a conceptual data model called connection traps. Often due to a misinterpretation of the meaning of certa
17、in relationships. Two main types of connection traps are called fan traps and chasm traps.Problems with ER Models Fan Trap Where a model represents a relationship between entity types, but pathway between certain entity occurrences is ambiguous. Chasm Trap Where a model suggests the existence of a r
18、elationship between entity types, but pathway does not exist between certain entity occurrences.An Example of a Fan TrapSemantic Net of ER Model with Fan Trap At which branch office does staff number SG37 work?Restructuring ER Model to Remove Fan TrapSemantic Net of Restructured ER Model with Fan Trap Removed SG37 works at branch B003.