This Thesis Has Been Submitted in Fulfilment of the Requirements for a Postgraduate Degree (E.G
Total Page:16
File Type:pdf, Size:1020Kb
This thesis has been submitted in fulfilment of the requirements for a postgraduate degree (e.g. PhD, MPhil, DClinPsychol) at the University of Edinburgh. Please note the following terms and conditions of use: • This work is protected by copyright and other intellectual property rights, which are retained by the thesis author, unless otherwise stated. • A copy can be downloaded for personal non-commercial research or study, without prior permission or charge. • This thesis cannot be reproduced or quoted extensively from without first obtaining permission in writing from the author. • The content must not be changed in any way or sold commercially in any format or medium without the formal permission of the author. • When referring to this work, full bibliographic details including the author, title, awarding institution and date of the thesis must be given. EVALUATION OF FUNCTIONAL DATA MODELS FOR DATABASE DESIGN AND USE by KRISHNARAO GURURAO KULKARNI Ph. D. University of Edinburgh 1983 To my wife, Rama and daughter, Bhuvana Acknowledgements I am deeply indebted to my thesis supervisor, Dr. Malcolm Atkinson, for his constant guidance, help, and encouragement. for his highly incisive comments on the writing of this thesis, and for a host of other reasons. It is indeed a great pleasure to acknowledge his contribution. I am also greatly indebted to Dr. David Rees, who supervised me during the initial six months. His help and guidance during that time was invaluable. I am thankful to many of my friends In the Department for their kind advice from time to time. In particular, I would like to thank Paul Cockshott, Ken Chisholm, Pedro Hepp, Segun Owoso, George Ross, and Rob Procter for many useful discussions. I am also thankful to Moira Norrie for many useful comments on the content of this thesis. I am also thankful to many of the database researchers outside Edinburgh for their advice and comments. In particular, I would like to thank Dr. Peter Gray from Aberdeen, Dr. Peter Stocker from East Anglia, Dr. Ron Morrison from St. Andrews, and Dr. Jochim Schmidt from Hamburg. My thanks go also to the Department of Computer Science at the University of Edinburgh for providing the necessary resources to conduct this research, to the Commonwealth Scholarship Commission in the United Kingdom for awarding me a scholarship which provided the necessary financial support during the entire study period, to the Ministry of Education, Government of India, for selecting me for the award and to the authorities of Indian Telephone Industries Ltd. , Bangalore, for granting the study leave. This research was greatly helped by the PS-algol project and my thanks go to all involved in it. PS-algol project was partly funded by SERC grants GRA86541, GRC21977 and GRC21960 and a grant from ICL. Abstract The problems of design, operation, and maintenance of databases using the three most popular database management systems (Hierarchical, CQDASYL/DBTG, and Relational) are well known. Users wishing to use these systems have to make conscious and often complex mappings between the real-world structures and the data structuring options (data models) provided by these systems. In addition, much of the semantics associated with the data either does not get expressed at all or gets embedded procedurally in application programs in an ad-hoc way. In recent years, a large number of data models (called semantic data models) have been proposed with the aim of simplifying database design and use. However, the lack of usable implementations of these proposals has so far inhibited the widespread use of these concepts. The present work reports on an effort to evaluate and extend one such semantic model by means of an implementation. It is based on the functional data model proposed earlier by Shipman[SHIP81). We call this 'Extended Functional Data Model' (EFDM). EFDM, like Shipman's proposals, is a marriage of three of the advanced modelling concepts found in both database and artificial intelligence research: the concept of entity to represent an object in the real world, the concept of type hierarchy among entity types, and the concept of derived data for modelling procedural knowledge. The functional notation of the model lends itself to high level data manipulation languages. The data selection in these languages is expressed simply as function application. Further, the functional approach makes it possible to incorporate general purpose computation facilities in the data languages without having to embed them in procedural languages. In addition to providing the usual database facilities, the implementation also provides a mechanism to specify multiple user views of the database. Table of Contents i Table of Contents 1. Introduction 1 1.1 Motivation 2 1.2 Overview of the Thesis 4 2. Background 6 2.1 Preliminary Definitions 2.2 Development of the Conceptual Model 2.3 Roles of the Conceptual Model 2.4 Data Models 2.5 Structures 2.5.1 Entities 2.5.2 Designation of Entities 2.5.3 Entity types 2.5.4 Type Hierarchy 2.5.5 Attributes and Domains 2.5.6 Relationships 2.5.7 Entity Types, Attributes, Relationship Types 2.5.8 Time 2.5.9 Conceptual Data Modelling and Knowledge Representation 2.6 Operations 2.7 Rules 2.7.1 Derived Data 2.7.1.1 Classes of Derived Data 2.7.1.2 Applications of Derived Data 2.7.2 Constraints 2.8 Requirements of Data Models 2.9 Classical Data Models 2.9.1 Assessment of Classical Data Models 2.10 Conclusions 3. Semantic Data Models 25 3.1 Extensions of Classical Data Models 25 3.1.1 Role Model 26 3.1.2 Basic Semantic Model 26 3.1.3 Entity-Relationship Model 27 3.1.4 Structural model 27 3.1.5 Abstraction and Generalisation 27 3.1.6 Extended Relational Model 27 3.2 Other Data Models 28 3.2.1 Data Semantics 28 3.2.2 Data Independent Accessing Model 29 3.2.3 Binary Relational Models 29 3.2.4 Object-Role model 30 3.2.5 Functional Data Models 30 3.2.5.1 Functional Database Model 30 3.2.5.2 Functional Dependency Model 31 3.2.5.3 Functional Data Model (Buneman and Frankel) 31 3.2.5.4 Functional Data Model (Shipman) 32 3.2.5.5 Functional Data Model (Katz and Wong) 32 Table of Contents M 3.2.6 Semantic Data Model 3.2.7 Semantic Hierarchy Model 3.2.8 Semantic Network Data Models 3.2.8.1 TAXIS 3.2.8.2 Semantic Binary Relationship Model 3.3 Assessment of Semantic Data Models 3.4 Assessment of Functional Data Models 3.5 Conclusions 4. Functional Data Model 4.1 Structures 4.1.1 Entity Types 4.1.2 Functions 4.1.3 Type Hierarchy 4.1.4 Base and Derived functions 4.1.5 Function Names 4.1.6 Order 4.1.7 Entity Diagram 4.2 Operations 4.2.1 Data Definition 4.2.2 Data Selection and Retrieval 4.2.2.1 Set Expressions 4.2.2.2 Singleton Expressions 4.2.2.3 Aggregate functions 4.2.2.4 Specifying the Expression Role 4.2.3 Database Updating 4.2.3.1 Creating a new entity 4.2.3.2 Assigning or modifying function values 4.3 Derived Functions 4.4 User Views 4.4.1 Operations from Views 4.5 Constraints 4.6 Assessment of Shipman's Proposals 5. Extended Functional Data Model 5.1 Structures 5.2 Operations 5.2.1 Data Definition 5.2.2 Maintaining Schema Consistency 5.2.3 Schema Updating 5.2.4 Meta Data 5.2.5 Data Selection and Retrieval 5.2.6 Packaged Queries 5.2.7 Displaying the Results 5.2.8 Database Updating 5.2.8.1 Extending the set of types of an entity 5.2.8.2 Reducing the set of types of an entity 5.2.8.3 Entity Deletion 5.3 Derived Functions 5.4 User Views 5.4.1 Operations from Views 5.5 Constraints 5.5.1 Constraints on entity identification 5.5.2 Constraints on entity associations 5.5.3 Constraints on the values of the functions 5.5.4 Constraints on cardinality 5.5.5 Constraints on existence 5.6 Comparison with ADAPLEX 6. Implementation of EFDM 84 6.1 Brief History 84 6.2 PS-algol Language 85 6.3 Architecture of EFDM 89 6.4 Data Structures 91 6.5 Problems due to Large Data Volumes 94 7. Applications of EFDM 95 7.1 Organising small personal information systems using EFDM 95 Table of Contents iii 7. 1. 1 Designing the Schema 97 7.1.2 Setting Up the Database 99 7.1.3 Using the Database 100 7.1.4 Maintaining the Database 100 7.2 Designing prototypes of large database systems using EFDM 101 8. Directions for Further Research 104 8.1 Deferring View Updates 104 8.2 Implementing Transactions 105 8.3 Views with Memory 106 8.4 Query Optimisation Issues 107 8.5 Derived Data Control 109 8.6 The Search for a Uniform Language 110 9. Conclusions 112 9.1 Summary of the Research 112 9,2 Contributions of the Research 115 Appendix A. DAPLEX Syntactic Specification 117 Appendix B. EFDM Syntactic Specification 119 Appendix C. Functional Specification of EFDM 121 Appendix D. Schema for University Administration 123 References 127 List of Figures iv List of Figures Figure 4-1: Functional Schema for a Student Database 46 Figure 4-2: Entity Diagram for a Student Database 50 Figure 4-3: Relational Schema for the Student Database 61 Figure 5-1: Partial Entity Diagram for Student Database 70 Figure 5-2: The functions to hold meta data of a schema 71 Figure 5-3: The derived functions for querying meta data 72 Figure 5-4: The functions to hold meta data for queries 73 Figure 5-5: The functions to hold the meta data for views 77 Figure 6-1: Block Diagram of EFDM Implementation 90 Figure 6-2: Data Structure for Entities 92 Figure 7-1: Schema for the Paper Database 98 Figure 7-2: Derived functions for the Paper Database 98 Ust of Tables v List of Tables Table 3-1: Assessment of Semantic Data Models 37 Introduction 1 Chapter One Introduction This thesis is concerned with the evaluation of functional data models for database design and use and in particular with the implementation of one variant of the functional data model, proposed earlier by Shipman [Shipman 81].