An Extension of the Relational Data Model to Incorporate Ordered Domains

Total Page:16

File Type:pdf, Size:1020Kb

An Extension of the Relational Data Model to Incorporate Ordered Domains An Extension of the Relational Data Model to Incorporate Ordered Domains Wilfred Siu Hung Ng A dissertation submitted in partial fulfillment of the requirements for the degree of Doctor of Philosophy o f th e University of London Department of Computer Science University College London 1, July 1997 ProQuest Number: 10055432 All rights reserved INFORMATION TO ALL USERS The quality of this reproduction is dependent upon the quality of the copy submitted. In the unlikely event that the author did not send a complete manuscript and there are missing pages, these will be noted. Also, if material had to be removed, a note will indicate the deletion. uest. ProQuest 10055432 Published by ProQuest LLC(2016). Copyright of the Dissertation is held by the Author. All rights reserved. This work is protected against unauthorized copying under Title 17, United States Code. Microform Edition © ProQuest LLC. ProQuest LLC 789 East Eisenhower Parkway P.O. Box 1346 Ann Arbor, Ml 48106-1346 Abstract In this thesis, we extend the relational data model to incorporate partial orderings into data domains and present a comprehensive formalisation of the extended model. The main contributions of the thesis are that we show how and why such an extension can considerably improve the capabilities of capturing semantics in a wide spectrum of advanced applications such as tree-structured information, temporal information, in­ complete information, fuzzy information and spatial information, whilst preserving the elegance of the theoretical basis of the model. Within the extended model, we extend the relational algebra to the Partially Or­ dered Relational Algebra (FORA) and the relational calculus to the Partially Ordered Relational Calculus (PORC), respectively. These two languages are shown to be equiv­ alent. We then apply a generalized form of Paredaens’ and Bancilhon’s Theorem to justify our claim that the PORA is adequately expressive, i.e., non-uniformly complete. We also show that there is a one-to-one correspondence between three hierarchies of: computable queries, ordered domains and PORAs, according to the inherent structures of the underlying domains. Moreover, we formally define Ordered Functional Dependencies (OFDs) and Ordered INclusion Dependencies (OINDs) for the extended model. We then present a sound and complete axiom system for OFDs and OINDs in the case of pointwise linear orderings. In addition, we establish a set of sound and complete chase rules for OFDs in the case of lexicographical linear orderings. We extend SQL to OSQL as a query language for ordered databases. OSQL provides users with the capability to define partial orderings over data domains. In order to demonstrate the feasibility of OSQL, we have carried out an experimental implementation of the new language using the Oracle DBMS for low level data management. We have evaluated the implementation by conducting a user survey. From the results of the survey, we confirm that the essential features of OSQL which we have designed are easy to learn, understand and apply, and are useful in formulating queries involving order. Furthermore, we demonstrate that a wide range of queries in many advanced applications can be formualted in a unified manner by introducing the notion of an OSQL package. Acknowledgements Thanks to God. He allows me to possess the good health and the sound mind to complete this piece of demanding work. Thanks to my supervisor, Mark Levene. He has given me the full attention and support since I started my Ph.D. programme three years ago. With his valuable advice and guidance on my work, I could carry out my research persistently even in the most difficult time. Also, I wish to express my gratitude to my second supervisor, Graham Roberts. He has given me many useful feedback at different stages. Thanks to a number of people who have provided many helpful comments on individ­ ual chapters of this thesis. I would like to show my appreciation of their help by stating their names as follows, Ethan Collopy, Janet Mcdonnell, Nadav Zin, Tina Yu, Jonathan Poole, Alberto Souza and Adam Fagin. Thanks to my wife, Marianne. She has never made any complaints with my anti­ social working style during my thesis writing-up period. Furthermore, she contributed her best possible support and provided encouragement when giving up seems to be the best thing to do. Thanks to the Department of Computer Science and the Graduate School at UCL. They have provided me with financial assistance to attend various workshops/ conferences for presenting my papers. Contents 1 Introduction 11 1.1 Background and Motivation ................................................................................. 11 1.2 Main Goals of the Research and the Thesis Contribution ............................ 16 1.3 Outline of the Thesis .............................................................................................. 17 2 The Ordered Relational Model 25 2.1 The Notion of O rder .............................................................................................. 26 2.1.1 Formal Definition of Partial O rd erin g s .................................................. 26 2.1.2 Extension of Orderings ............................................................................... 27 2.2 Orderings in Databases ....................................................................................... 31 2.3 Orderings and Data Independence .................................................................... 33 2.4 Relationship to the Conventional M odel .......................................................... 36 2.5 Other Related W o r k .............................................................................................. 38 2.5.1 Partial Order D atab ases ............................................................................ 38 2.5.2 Multi-Resolution Data M odel .................................................................. 39 2.5.3 List or Sequenced D a t a ............................................................................ 40 2.5.4 Other Unified M o d e ls ................................................................................ 41 3 Query Languages for the Ordered Relational Model 43 3.1 Query Languages: the PORA and the PO R C ................................................. 45 3.1.1 The PORA: an Algebraic Query Language ........................................ 45 3.1.2 The PORC: a Calculus Query Language ............................................... 52 3.2 Equivalence between the PORA and the PORC ............................................. 56 3.3 Non-Uniform Completeness of the P O R A ....................................................... 62 3.3.1 Order-Preserving Database Automorphisms ........................................ 62 3.3.2 A Generalisation of Paredaens’ and Bancilhon’s T heorem .............. 63 4 3.4 Hierarchy of Computable Queries with Ordered Domains ......................... 66 3.5 Updating Ordered D a ta b a s e s ............................................................................. 71 3.6 D iscussion ................................................................................................................. 76 4 Data Dependencies and Database Design Issues for the Ordered Rela­ tional Model 78 4.1 Functional Dependencies (FDs) in Ordered D atabases ................................ 81 4.2 Ordered Functional Dependencies (OFDs) ....................................................... 85 4.2.1 OFDs Arising from Pointwise-Orderings ............................................... 86 4.2.2 OFDs Arising from Lexicographical Orderings ..................................... 89 4.3 Ordered Inclusion Dependencies (O IN D s) .......................................................... 100 4.3.1 OINDs Arising from Pointwise-Orderings ...............................................103 4.3.2 OINDs Arising from Lexicographical Orderings ..................................... 104 4.3.3 Interactions between OFDs and O IN D s .................................................. 106 4.4 Database Design Issues with respect to OFDs and OIN D s .............................. 108 4.5 D iscussion ..................................................................................................................... 112 5 An Extension of SQL to the Ordered Relational Model 114 5.1 Comparing OSQL with the SQL Standard .......................................................... 115 5.2 OSQL Specification ....................................................................................................... 118 5.2.1 Data Manipulation L an g u ag e ......................................................................118 5.2.2 Data Definition Language ............................................................................ 120 5.3 Implementation of OSQL ........................................................................................122 5.3.1 The System Architecture ............................................................................ 122 5.3.2 The Implementation M ethod ......................................................................125 5.4 Application Examples of OSQL ..............................................................................127 5.4.1 Tree-Structured Inform ation ......................................................................... 128 5.4.2 Incomplete Information ................................................................................129 5.4.3 Fuzzy Information ..........................................................................................131
Recommended publications
  • (DDL) Reference Manual
    Data Definition Language (DDL) Reference Manual Abstract This publication describes the DDL language syntax and the DDL dictionary database. The audience includes application programmers and database administrators. Product Version DDL D40 DDL H01 Supported Release Version Updates (RVUs) This publication supports J06.03 and all subsequent J-series RVUs, H06.03 and all subsequent H-series RVUs, and G06.26 and all subsequent G-series RVUs, until otherwise indicated by its replacement publications. Part Number Published 529431-003 May 2010 Document History Part Number Product Version Published 529431-002 DDL D40, DDL H01 July 2005 529431-003 DDL D40, DDL H01 May 2010 Legal Notices Copyright 2010 Hewlett-Packard Development Company L.P. Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license. The information contained herein is subject to change without notice. The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein. Export of the information contained in this publication may require authorization from the U.S. Department of Commerce. Microsoft, Windows, and Windows NT are U.S. registered trademarks of Microsoft Corporation. Intel, Itanium, Pentium, and Celeron are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries.
    [Show full text]
  • Data Definition Language
    1 Structured Query Language SQL, or Structured Query Language is the most popular declarative language used to work with Relational Databases. Originally developed at IBM, it has been subsequently standard- ized by various standards bodies (ANSI, ISO), and extended by various corporations adding their own features (T-SQL, PL/SQL, etc.). There are two primary parts to SQL: The DDL and DML (& DCL). 2 DDL - Data Definition Language DDL is a standard subset of SQL that is used to define tables (database structure), and other metadata related things. The few basic commands include: CREATE DATABASE, CREATE TABLE, DROP TABLE, and ALTER TABLE. There are many other statements, but those are the ones most commonly used. 2.1 CREATE DATABASE Many database servers allow for the presence of many databases1. In order to create a database, a relatively standard command ‘CREATE DATABASE’ is used. The general format of the command is: CREATE DATABASE <database-name> ; The name can be pretty much anything; usually it shouldn’t have spaces (or those spaces have to be properly escaped). Some databases allow hyphens, and/or underscores in the name. The name is usually limited in size (some databases limit the name to 8 characters, others to 32—in other words, it depends on what database you use). 2.2 DROP DATABASE Just like there is a ‘create database’ there is also a ‘drop database’, which simply removes the database. Note that it doesn’t ask you for confirmation, and once you remove a database, it is gone forever2. DROP DATABASE <database-name> ; 2.3 CREATE TABLE Probably the most common DDL statement is ‘CREATE TABLE’.
    [Show full text]
  • IEEE Paper Template in A4 (V1)
    International Journal of Electrical Electronics & Computer Science Engineering Special Issue - NCSCT-2018 | E-ISSN : 2348-2273 | P-ISSN : 2454-1222 March, 2018 | Available Online at www.ijeecse.com Structural and Non-Structural Query Language Vinayak Sharma1, Saurav Kumar Jha2, Shaurya Ranjan3 CSE Department, Poornima Institute of Engineering and Technology, Jaipur, Rajasthan, India [email protected], [email protected], [email protected] Abstract: The Database system is rapidly increasing and it The most important categories are play an important role in all commercial-scientific software. In the current scenario every field work is related to DDL (Data Definition Language) computer they store their data in the database. Using DML (Data Manipulation Language) database helps to maintain the large records. This paper aims to summarize the different database and their usage in DQL (Data Query Language) IT field. In company database is more appropriate or more 1. Data Definition Language: Data Definition suitable to store the data. Language, DDL, is the subset of SQL that are used by a Keywords: DBS, Database Management Systems-DBMS, database user to create and built the database objects, Database-DB, Programming Language, Object-Oriented examples are deletion or the creation of a table. Some of System. the most Properties of DDL commands discussed I. INTRODUCTION below: CREATE TABLE The database system is used to develop the commercial- scientific application with database. The application DROP INDEX requires set of element for collection transmission, ALTER INDEX storage and processing of data with computer. Database CREATE VIEW system allow the database develop application. This ALTER TABLE paper deal with the features of Nosql and need of Nosql in the market.
    [Show full text]
  • 3 Data Definition Language (DDL)
    Database Foundations 6-3 Data Definition Language (DDL) Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Roadmap You are here Data Transaction Introduction to Structured Data Definition Manipulation Control Oracle Query Language Language Language (TCL) Application Language (DDL) (DML) Express (SQL) Restricting Sorting Data Joining Tables Retrieving Data Using Using ORDER Using JOIN Data Using WHERE BY SELECT DFo 6-3 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 3 Data Definition Language (DDL) Objectives This lesson covers the following objectives: • Identify the steps needed to create database tables • Describe the purpose of the data definition language (DDL) • List the DDL operations needed to build and maintain a database's tables DFo 6-3 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 4 Data Definition Language (DDL) Database Objects Object Description Table Is the basic unit of storage; consists of rows View Logically represents subsets of data from one or more tables Sequence Generates numeric values Index Improves the performance of some queries Synonym Gives an alternative name to an object DFo 6-3 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 5 Data Definition Language (DDL) Naming Rules for Tables and Columns Table names and column names must: • Begin with a letter • Be 1–30 characters long • Contain only A–Z, a–z, 0–9, _, $, and # • Not duplicate the name of another object owned by the same user • Not be an Oracle server–reserved word DFo 6-3 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 6 Data Definition Language (DDL) CREATE TABLE Statement • To issue a CREATE TABLE statement, you must have: – The CREATE TABLE privilege – A storage area CREATE TABLE [schema.]table (column datatype [DEFAULT expr][, ...]); • Specify in the statement: – Table name – Column name, column data type, column size – Integrity constraints (optional) – Default values (optional) DFo 6-3 Copyright © 2015, Oracle and/or its affiliates.
    [Show full text]
  • Introduction to Database
    ST. LAWRENCE HIGH SCHOOL A Jesuit Christian Minority Institution STUDY MATERIAL - 12 Subject: COMPUTER SCIENCE Class - 12 Chapter: DBMS Date: 01/08/2020 INTRODUCTION TO DATABASE What is Database? The database is a collection of inter-related data which is used to retrieve, insert and delete the data efficiently. It is also used to organize the data in the form of a table, schema, views, and reports, etc. For example: The college Database organizes the data about the admin, staff, students and faculty etc. Using the database, you can easily retrieve, insert, and delete the information. Database Management System Database management system is a software which is used to manage the database. For example: MySQL, Oracle, etc. are a very popular commercial database which is used in different applications. DBMS provides an interface to perform various operations like database creation, storing data in it, updating data, creating a table in the database and a lot more. It provides protection and security to the database. In the case of multiple users, it also maintains data consistency. DBMS allows users the following tasks: Data Definition: It is used for creation, modification, and removal of definition that defines the organization of data in the database. Data Updation: It is used for the insertion, modification, and deletion of the actual data in the database. Data Retrieval: It is used to retrieve the data from the database which can be used by applications for various purposes. User Administration: It is used for registering and monitoring users, maintain data integrity, enforcing data security, dealing with concurrency control, monitoring performance and recovering information corrupted by unexpected failure.
    [Show full text]
  • GRAPH DATABASE THEORY Comparing Graph and Relational Data Models
    GRAPH DATABASE THEORY Comparing Graph and Relational Data Models Sridhar Ramachandran LambdaZen © 2015 Contents Introduction .................................................................................................................................................. 3 Relational Data Model .............................................................................................................................. 3 Graph databases ....................................................................................................................................... 3 Graph Schemas ............................................................................................................................................. 4 Selecting vertex labels .............................................................................................................................. 4 Examples of label selection ....................................................................................................................... 4 Drawing a graph schema ........................................................................................................................... 6 Summary ................................................................................................................................................... 7 Converting ER models to graph schemas...................................................................................................... 9 ER models and diagrams ..........................................................................................................................
    [Show full text]
  • Short Type Questions and Answers on DBMS
    BIJU PATNAIK UNIVERSITY OF TECHNOLOGY, ODISHA Short Type Questions and Answers on DBMS Prepared by, Dr. Subhendu Kumar Rath, BPUT, Odisha. DABASE MANAGEMENT SYSTEM SHORT QUESTIONS AND ANSWERS Prepared by Dr.Subhendu Kumar Rath, Dy. Registrar, BPUT. 1. What is database? A database is a logically coherent collection of data with some inherent meaning, representing some aspect of real world and which is designed, built and populated with data for a specific purpose. 2. What is DBMS? It is a collection of programs that enables user to create and maintain a database. In other words it is general-purpose software that provides the users with the processes of defining, constructing and manipulating the database for various applications. 3. What is a Database system? The database and DBMS software together is called as Database system. 4. What are the advantages of DBMS? 1. Redundancy is controlled. 2. Unauthorised access is restricted. 3. Providing multiple user interfaces. 4. Enforcing integrity constraints. 5. Providing backup and recovery. 5. What are the disadvantage in File Processing System? 1. Data redundancy and inconsistency. 2. Difficult in accessing data. 3. Data isolation. 4. Data integrity. 5. Concurrent access is not possible. 6. Security Problems. 6. Describe the three levels of data abstraction? The are three levels of abstraction: 1. Physical level: The lowest level of abstraction describes how data are stored. 2. Logical level: The next higher level of abstraction, describes what data are stored in database and what relationship among those data. 3. View level: The highest level of abstraction describes only part of entire database.
    [Show full text]
  • Ddl) Lesson 1
    LESSON 1 . 4 98-364 Database Administration Fundamentals Understand Data Definition Language (DDL) LESSON 1 . 4 98-364 Database Administration Fundamentals Lesson Overview 1.4 Understand data definition language (DDL) In this lesson, you will review: . DDL—DML relationship . DDL . Schema . CREATE . ALTER . DROP LESSON 1 . 4 98-364 Database Administration Fundamentals DDL—DML Relationship DML . Data Manipulation Language. (DML) In a database management system (DBMS), a language that is used to insert data in, update, and query a database. DMLs are often capable of performing mathematical and statistical calculations that facilitate generating reports. Acronym: DML. DML is used to manipulate the data of a database. In lesson review 1.3, you can find more details on DML. LESSON 1 . 4 98-364 Database Administration Fundamentals DDL . Data Definition Language (DDL) A language that defines all attributes and properties of a database, especially record layouts, field definitions, key fields, file locations, and storage strategy. Acronym: DDL. DDL is used to create the framework for the database, the schema of the database, or both. DDL works at the table level of the database. LESSON 1 . 4 98-364 Database Administration Fundamentals Schema . Schema A description of a database to a DBMS in the language provided by the DBMS. A schema defines aspects of the database, such as attributes (fields) and domains and parameters of the attributes. Schemas are generally defined as using commands from a DDL supported by the database system. LESSON 1 . 4 98-364 Database Administration Fundamentals CREATE . There are two forms of the CREATE statement. This statement creates a database called students.
    [Show full text]
  • Data Definition Language (Ddl)
    DATA DEFINITION LANGUAGE (DDL) CREATE CREATE SCHEMA AUTHORISATION Authentication: process the DBMS uses to verify that only registered users access the database - If using an enterprise RDBMS, you must be authenticated by the RDBMS - To be authenticated, you must log on to the RDBMS using an ID and password created by the database administrator - Every user ID is associated with a database schema Schema: a logical group of database objects that are related to each other - A schema belongs to a single user or application - A single database can hold multiple schemas that belong to different users or applications - Enforce a level of security by allowing each user to only see the tables that belong to them Syntax: CREATE SCHEMA AUTHORIZATION {creator}; - Command must be issued by the user who owns the schema o Eg. If you log on as JONES, you can only use CREATE SCHEMA AUTHORIZATION JONES; CREATE TABLE Syntax: CREATE TABLE table_name ( column1 data type [constraint], column2 data type [constraint], PRIMARY KEY(column1, column2), FOREIGN KEY(column2) REFERENCES table_name2; ); CREATE TABLE AS You can create a new table based on selected columns and rows of an existing table. The new table will copy the attribute names, data characteristics and rows of the original table. Example of creating a new table from components of another table: CREATE TABLE project AS SELECT emp_proj_code AS proj_code emp_proj_name AS proj_name emp_proj_desc AS proj_description emp_proj_date AS proj_start_date emp_proj_man AS proj_manager FROM employee; 3 CONSTRAINTS There are 2 types of constraints: - Column constraint – created with the column definition o Applies to a single column o Syntactically clearer and more meaningful o Can be expressed as a table constraint - Table constraint – created when you use the CONTRAINT keyword o Can apply to multiple columns in a table o Can be given a meaningful name and therefore modified by referencing its name o Cannot be expressed as a column constraint NOT NULL This constraint can only be a column constraint and cannot be named.
    [Show full text]
  • CSC 261/461 – Database Systems Lecture 2
    CSC 261/461 – Database Systems Lecture 2 Fall 2017 CSC 261, Fall 2017, UR Agenda 1. Database System Concepts and Architecture 2. SQL introduction & schema definitions • ACTIVITY: Table creation 3. Basic single-table queries • ACTIVITY: Single-table queries! 4. Multi-table queries • ACTIVITY: Multi-table queries! CSC 261, Fall 2017, UR Table Schemas • The schema of a table is the table name, its attributes, and their types: Product(Pname: string, Price: float, Category: string, Manufacturer: string) • A key is an attribute whose values are unique; we underline a key Product(Pname: string, Price: float, Category: string, Manufacturer: string) CSC 261, Fall 2017, UR Database Schema vs. Database State • Database State: – Refers to the content of a database at a moment in time. • Initial Database State: – Refers to the database state when it is initially loaded into the system. • Valid State: – A state that satisfies the structure and constraints of the database. CSC 261, Fall 2017, UR Database Schema vs. Database State (continued) • Distinction – The database schema changes very infrequently. – The changes every time the database is updated. – database state • Schema is also called intension. • State is also called extension. CSC 261, Fall 2017, UR Example of a Database Schema CSC 261, Fall 2017, UR Example of a database state CSC 261, Fall 2017, UR Three-Schema Architecture • Proposed to support DBMS characteristics of: – Program-data independence. – Support of multiple views of the data. • Not explicitly used in commercial DBMS products, but has been useful in explaining database system organization CSC 261, Fall 2017, UR Three-Schema Architecture • Defines DBMS schemas at three levels: – Internal schema at the internal level to describe physical storage structures and access paths (e.g indexes).
    [Show full text]
  • DBMS Notes: Data: Raw Facts and Figures Are Termed As Data. Information: Processed Data Which Is Meaningful and Is Delivered On
    DBMS Notes: Data: Raw facts and figures are termed as data. Information: Processed data which is meaningful and is delivered on time is known as information. Database: A database is a collection of inter related table data. DBMS: A database management system is a collection of database along with a set of programs to control and manage the database. The primary goal of the database management system is to provide an environment which is both convenient and efficient for storing and retrieving data from the database. In a database we can define the structure of the data and manipulate the data using some commands. There are two types of languages for such operations. Namely:- 1. Data Definition/Description Language (DDL): Data Definition Language is that language which comprises of commands for defining the different structures in a database. DDL statements are used to create, modify, and remove the database objects such as tables, indexes, and users. Common DDL statements are CREATE, ALTER and DROP. 2. Data Manipulation Language (DML): Data Manipulation Language is that language which enables users to access and manipulate data stored in a table but not the schema or database objects. The primary goal is to provide efficient human interaction with the system. Data manipulation involves structured Query Language (SQL) and often used as synonym for the term DML. DML involves: Retrieval of information from the database. (Generally done using the SELECT statement). Insertion of new information into the database. (Generally done using the INSERT statement). Deletion of information in the database. (Generally done using the DELETE statement).
    [Show full text]
  • A Dictionary of DBMS Terms
    A Dictionary of DBMS Terms Access Plan Access plans are generated by the optimization component to implement queries submitted by users. ACID Properties ACID properties are transaction properties supported by DBMSs. ACID is an acronym for atomic, consistent, isolated, and durable. Address A location in memory where data are stored and can be retrieved. Aggregation Aggregation is the process of compiling information on an object, thereby abstracting a higher-level object. Aggregate Function A function that produces a single result based on the contents of an entire set of table rows. Alias Alias refers to the process of renaming a record. It is alternative name used for an attribute. 700 A Dictionary of DBMS Terms Anomaly The inconsistency that may result when a user attempts to update a table that contains redundant data. ANSI American National Standards Institute, one of the groups responsible for SQL standards. Application Program Interface (API) A set of functions in a particular programming language is used by a client that interfaces to a software system. ARIES ARIES is a recovery algorithm used by the recovery manager which is invoked after a crash. Armstrong’s Axioms Set of inference rules based on set of axioms that permit the algebraic mani- pulation of dependencies. Armstrong’s axioms enable the discovery of minimal cover of a set of functional dependencies. Associative Entity Type A weak entity type that depends on two or more entity types for its primary key. Attribute The differing data items within a relation. An attribute is a named column of a relation. Authorization The operation that verifies the permissions and access rights granted to a user.
    [Show full text]