Relational Foundations for Functorial Data Migration

Size: px
Start display at page:

Download "Relational Foundations for Functorial Data Migration"

Transcription

1 Relational Foundations for Functorial Data Migration David Spivak, Ryan Wisnesky Department of Mathematics Massachusetts Institute of Technology {dspivak, DBPL October 27, 2015

2 Introduction In this talk I will describe an equivalence between a fragment of the relational data model (SPCU queries) and a fragment of the (extended) functorial data model (FQL queries): SP CU F QL The functorial data model (my name) originated with Rosebrugh et al. in the late 1990s. Schemas are categories, instances are set-valued functors. Spivak extends it to solve information integration problems. Sponsored by: OR grant AFOSR grant FA / 28

3 Category Theory A presentation of a category is a reflexive, directed, labelled, multi-graph and a set of path equations: f g M.f.f.g =.f.h h A set-valued functor assigns a set to each node and a function to each edge, such that the equations holds. M tbillu fpxq x ` 1 gpxq hpxq P Category theory was instrumental in the development of two extensions to the relational model, both of which inform work on language-integrated query (LIQ): The nested relational model generalizes sets to nested collections and is inspired by monads. Algebraic datatypes implement nested collections using recursion and are inspired by algebras. 3 / 28

4 The Functorial Data Model manager Emp works secretary Dept last first Dom name Emp ID mgr works first last q10 Al Akin x02 Bob Bo q10 Carl Cork Emp.manager.works Emp.works Dept.secretary.works Dept Dept ID sec name q CS x Math Dom ID Al Akin Bob Bo Carl Cork CS Math 4 / 28

5 Convention Omit Dom table, and draw edges Ñ f Dom as f : manager Emp works secretary Dept last first Dom name manager Emp works secretary Dept first last name 5 / 28

6 The Functorial Data Model (abbreviated) manager Emp works secretary Dept first last name Emp.manager.works Emp.works Dept.secretary.works Dept Emp ID mgr works first last q10 Al Akin x02 Bob Bo q10 Carl Cork Dept ID sec name q CS x Math 6 / 28

7 Functorial Data Migration A functor F : S Ñ T is a constraint-respecting mapping: nodespsq Ñ nodespt q edgespsq Ñ pathspt q and it induces three adjoint data migration functors: F : T -inst Ñ S-inst (like project) S F T I F piq : IF Set ΠF : S-inst Ñ T -inst (like join) F % Π F Σ F : S-inst Ñ T -inst (like outer disjoint union then quotient) Σ F % F 7 / 28

8 (Project) ame ame Salary 1 2 F ÝÝÝÑ Salary Age Age 1 ID ame Salary 1 Alice $100 2 Bob $250 3 Sue $300 2 ID Age F ÐÝÝ ID ame Salary Age a Alice $ b Bob $ c Sue $ / 28

9 Π (Join) ame ame Salary 1 2 F ÝÝÝÑ Salary Age Age 1 ID ame Salary 1 Alice $100 2 Bob $250 3 Sue $300 2 ID Age Π F ÝÝÑ ID ame Salary Age a Alice $ b Alice $ c Alice $ d Bob $ e Bob $ f Bob $ g Sue $ h Sue $ i Sue $ / 28

10 Σ (Union) ame ame Salary 1 2 F ÝÝÝÑ Salary Age Age 1 ID ame Salary 1 Alice $100 2 Bob $250 3 Sue $300 2 ID Age Σ F ÝÝÑ ID ame Salary Age a Alice $100 null 1 b Bob $250 null 2 c Sue $300 null 3 d null 4 null 5 20 e null 6 null 7 20 f null 8 null / 28

11 Foreign keys ame ame Salary 1 f 2 F ÝÝÝÑ Salary Age Age 1 ID ame Salary f 1 Alice $ Bob $ Sue $ ID Age F ÐÝÝ Π F,Σ F ÝÝÝÝÑ ID ame Salary Age a Alice $ b Bob $ c Sue $ / 28

12 Evaluation of the functorial data model Positives: The category of categories is bi-cartesian closed (model of the STLC). For each category C, the category C-inst is a topos (model of HOL). Data integrity constraints (path equations) are built-in to schemas. Data migration functors transform entire instances. The FDM is expressive enough for many information integration tasks. Easy to pivot. egatives: Data integrity constraints (in schemas) are limited to path equalities. Data migrations lack analog of set-difference. o aggregation. Data migration functors are hard to program directly. Instance isomorphism is too coarse for many integration tasks. Many problems about finitely-presented categories are semi-computable: Path equivalence Generating a category from a presentation 12 / 28

13 The Attribute Problem ID ame Age Salary 1 Alice 20 $100 2 Bob 20 $250 3 Sue 30 $300 (good) ID ame Age Salary 4 Alice 20 $100 5 Bob 20 $250 6 Sue 30 $300 (bad) ID ame Age Salary 1 Amy 20 $100 2 Bill 20 $250 3 Susan 30 $ / 28

14 Solving the Attribute Problem Mark certain edges to leaf nodes as attributes. In this extension, a schema is a category C, a discrete category C0, and a functor C 0 Ñ C. Instances and migrations also generalize. Schemas become special ER (entity-relationship) diagrams. The FDM takes C 0 to be empty. The example schema below, which was an abbreviation in the FDM, is a bona-fide schema in this extension: attributes are first, last, and name. manager Emp works secretary Dept first last name 14 / 28

15 Solved Attribute Problem ID ame Age Salary 1 Alice 20 $100 2 Bob 20 $250 3 Sue 30 $300 (good) ID ame Age Salary 4 Alice 20 $100 5 Bob 20 $250 6 Sue 30 $300 fl (good) ID ame Age Salary 1 Amy 20 $100 2 Bill 20 $250 3 Susan 30 $ / 28

16 Functorial Data Migration as SPCU Theorem: migrations of the form Σ F Π G H F is a discrete op-fibration (ensures union compatibility). G is a surjection on attributes (ensures domain independence). all categories are finite (ensures computability). can be implemented using SPCU (select, project, cartesian product, union) and keygen, under set semantics. are closed under composition. 16 / 28

17 using SPCU Given F : S Ñ T and I P T Inst, define F piq P S Inst as: for each node in S, the table F pq is IpF pqq. for each attribute A in S, the table F paq is IpF paqq. for each edge e : X Ñ Y in S mapping to a path F peq : F pxq Ñ F py q in T, compose IpF peqq to obtain F peq. S F T I F piq : IF Set 17 / 28

18 Σ using SPCU Gven F : S Ñ T a discrete op-fibration, a S-instance I, we define Σ F piq P T Inst as for each node in T, the table Σ F pq is the union of the node tables in I that F maps to. for each attribute A in T, the table Σ F paq is the union of the attribute tables in I that F maps to A. Let e : X Ñ Y be an edge in T. We know that for each c P F 1 pxq there is at least one path p c in S such that F pp c q e. Compose p c to a single binary table, and define Σ F peq to be the union over all such c. The choice of p c will not matter. 18 / 28

19 Discrete Op-Fibrations / Union Compatibility b 1 g a 1 h 1 1 c 1 b 2 g 2 a 2 h 2 c 2 g 3 a 3 h 3 c 3 c 4 Ó F B G A H C 19 / 28

20 Π using SPCU Given F : S Ñ T with S finite and a S-instance I, we define Π F piq P T Inst as: too difficult to describe in a presentation. Intuitively, Π is a join all 20 / 28

21 SPCU as Functorial Data Migration Theorem : SPCU (bags) can be implemented using, Σ, Π. Theorem : SPCU (sets) can be implemented using, Σ, Π, dedup, where dedup T : T Inst Ñ T Inst equates IDs which cannot be distinguished along any attribute path. We must encode relational schemas, for example, Rpc 1,..., c n q and R 1 pc 1 1,..., c1 n 1 q becomes: R c n c 1 n 1 R 1 c 1 D c 1 1 A 21 / 28

22 Project using We express π i1,...,i k R as F : πr R i 1 i k F ÝÝÝÑ c 1 c n D D 22 / 28

23 Select using, Π We express σ a b R as F Π F : R σr a c 1 c n b F ÝÝÝÑ x c 1 c n D D Here F paq F pbq x and F pc i q c i for 1 ď i ď n. 23 / 28

24 Product using Π We express R ˆ R 1 as Π F : R c 1 c n D c 1 n 1 R 1 c 1 1 F ÝÝÝÑ c 1 c n RˆR 1 c 1 1 D c 1 n 1 24 / 28

25 Union using Σ We express R ` R 1 as Σ F : R c 1 c n D c 1 n R 1 c 1 1 F ÝÝÝÑ c 1 R`R 1 D c n 25 / 28

26 FQL - A Functorial Query Language The open-source, graphical FQL IDE available at categoricaldata.net/fql.html implements functorial data migration (with attributes) in software. FQL translates migrations of the form into SQL and vice versa. Σ F Π G H Demo 26 / 28

27 FQL evaluation Positives: Attributes. Running on SQL enables interoperability and execution speed. Better Σ semantics than TGD-only systems (e.g., Clio). egatives: o selection by constants. Relies on fresh ID generation. Cannot change type of data during migration. Attributes not nullable. See our follow-up work for solutions to these problems. 27 / 28

28 Conclusion I described the functorial data model and data migration functors, how to extend the functorial data model to have attributes, an equivalence SP CU F QL where F QL is a fragment of the data migration functors a tool, FQL (categoricaldata.net/fql.html) based on this equivalence. 28 / 28

Functorial Data Migration. Categorical Informatics, Inc. info@catinf.com. December 1, 2015. C i

Functorial Data Migration. Categorical Informatics, Inc. info@catinf.com. December 1, 2015. C i Functorial Data Migration Categorical Informatics, Inc. info@catinf.com December 1, 2015 C i Outline The Functorial Data Model (FDM) The FDM is based on category theory, which was designed to migrate theorems

More information

FUNCTORIAL DATA MIGRATION

FUNCTORIAL DATA MIGRATION FUNCTORIAL DATA MIGRATION DAVID I. SPIVAK Abstract. In this paper we present a simple database definition language: that of categories and functors. A database schema is a small category and an instance

More information

Database Design Overview. Conceptual Design ER Model. Entities and Entity Sets. Entity Set Representation. Keys

Database Design Overview. Conceptual Design ER Model. Entities and Entity Sets. Entity Set Representation. Keys Database Design Overview Conceptual Design. The Entity-Relationship (ER) Model CS430/630 Lecture 12 Conceptual design The Entity-Relationship (ER) Model, UML High-level, close to human thinking Semantic

More information

Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model

Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Outline Using High-Level Conceptual Data Models for

More information

Database Design. Database Design I: The Entity-Relationship Model. Entity Type (con t) Chapter 4. Entity: an object that is involved in the enterprise

Database Design. Database Design I: The Entity-Relationship Model. Entity Type (con t) Chapter 4. Entity: an object that is involved in the enterprise Database Design Database Design I: The Entity-Relationship Model Chapter 4 Goal: specification of database schema Methodology: Use E-R R model to get a high-level graphical view of essential components

More information

WORKSHOP ON TOPOLOGY AND ABSTRACT ALGEBRA FOR BIOMEDICINE

WORKSHOP ON TOPOLOGY AND ABSTRACT ALGEBRA FOR BIOMEDICINE WORKSHOP ON TOPOLOGY AND ABSTRACT ALGEBRA FOR BIOMEDICINE ERIC K. NEUMANN Foundation Medicine, Cambridge, MA 02139, USA Email: eneumann@foundationmedicine.com SVETLANA LOCKWOOD School of Electrical Engineering

More information

IT2305 Database Systems I (Compulsory)

IT2305 Database Systems I (Compulsory) Database Systems I (Compulsory) INTRODUCTION This is one of the 4 modules designed for Semester 2 of Bachelor of Information Technology Degree program. CREDITS: 04 LEARNING OUTCOMES On completion of this

More information

CSC 742 Database Management Systems

CSC 742 Database Management Systems CSC 742 Database Management Systems Topic #4: Data Modeling Spring 2002 CSC 742: DBMS by Dr. Peng Ning 1 Phases of Database Design Requirement Collection/Analysis Functional Requirements Functional Analysis

More information

Relational Databases

Relational Databases Relational Databases Jan Chomicki University at Buffalo Jan Chomicki () Relational databases 1 / 18 Relational data model Domain domain: predefined set of atomic values: integers, strings,... every attribute

More information

3. Relational Model and Relational Algebra

3. Relational Model and Relational Algebra ECS-165A WQ 11 36 3. Relational Model and Relational Algebra Contents Fundamental Concepts of the Relational Model Integrity Constraints Translation ER schema Relational Database Schema Relational Algebra

More information

Fibrations and universal view updatability

Fibrations and universal view updatability Fibrations and universal view updatability Michael Johnson Computing Department, Macquarie University NSW 2109, Australia mike@ics.mq.edu.au Robert Rosebrugh Department of Mathematics and Computer Science,

More information

IT2304: Database Systems 1 (DBS 1)

IT2304: Database Systems 1 (DBS 1) : Database Systems 1 (DBS 1) (Compulsory) 1. OUTLINE OF SYLLABUS Topic Minimum number of hours Introduction to DBMS 07 Relational Data Model 03 Data manipulation using Relational Algebra 06 Data manipulation

More information

We know how to query a database using SQL. A set of tables and their schemas are given Data are properly loaded

We know how to query a database using SQL. A set of tables and their schemas are given Data are properly loaded E-R Diagram Database Development We know how to query a database using SQL A set of tables and their schemas are given Data are properly loaded But, how can we develop appropriate tables and their schema

More information

Conceptual Design Using the Entity-Relationship (ER) Model

Conceptual Design Using the Entity-Relationship (ER) Model Conceptual Design Using the Entity-Relationship (ER) Model Module 5, Lectures 1 and 2 Database Management Systems, R. Ramakrishnan 1 Overview of Database Design Conceptual design: (ER Model is used at

More information

Elena Baralis, Silvia Chiusano Politecnico di Torino. Pag. 1. Query optimization. DBMS Architecture. Query optimizer. Query optimizer.

Elena Baralis, Silvia Chiusano Politecnico di Torino. Pag. 1. Query optimization. DBMS Architecture. Query optimizer. Query optimizer. DBMS Architecture INSTRUCTION OPTIMIZER Database Management Systems MANAGEMENT OF ACCESS METHODS BUFFER MANAGER CONCURRENCY CONTROL RELIABILITY MANAGEMENT Index Files Data Files System Catalog BASE It

More information

2. Conceptual Modeling using the Entity-Relationship Model

2. Conceptual Modeling using the Entity-Relationship Model ECS-165A WQ 11 15 Contents 2. Conceptual Modeling using the Entity-Relationship Model Basic concepts: entities and entity types, attributes and keys, relationships and relationship types Entity-Relationship

More information

COMP 378 Database Systems Notes for Chapter 7 of Database System Concepts Database Design and the Entity-Relationship Model

COMP 378 Database Systems Notes for Chapter 7 of Database System Concepts Database Design and the Entity-Relationship Model COMP 378 Database Systems Notes for Chapter 7 of Database System Concepts Database Design and the Entity-Relationship Model The entity-relationship (E-R) model is a a data model in which information stored

More information

Parametric Domain-theoretic models of Linear Abadi & Plotkin Logic

Parametric Domain-theoretic models of Linear Abadi & Plotkin Logic Parametric Domain-theoretic models of Linear Abadi & Plotkin Logic Lars Birkedal Rasmus Ejlers Møgelberg Rasmus Lerchedahl Petersen IT University Technical Report Series TR-00-7 ISSN 600 600 February 00

More information

Part A: Data Definition Language (DDL) Schema and Catalog CREAT TABLE. Referential Triggered Actions. CSC 742 Database Management Systems

Part A: Data Definition Language (DDL) Schema and Catalog CREAT TABLE. Referential Triggered Actions. CSC 742 Database Management Systems CSC 74 Database Management Systems Topic #0: SQL Part A: Data Definition Language (DDL) Spring 00 CSC 74: DBMS by Dr. Peng Ning Spring 00 CSC 74: DBMS by Dr. Peng Ning Schema and Catalog Schema A collection

More information

The Entity-Relationship Model

The Entity-Relationship Model The Entity-Relationship Model 221 After completing this chapter, you should be able to explain the three phases of database design, Why are multiple phases useful? evaluate the significance of the Entity-Relationship

More information

The composition of Mappings in a Nautural Interface

The composition of Mappings in a Nautural Interface Composing Schema Mappings: Second-Order Dependencies to the Rescue Ronald Fagin IBM Almaden Research Center fagin@almaden.ibm.com Phokion G. Kolaitis UC Santa Cruz kolaitis@cs.ucsc.edu Wang-Chiew Tan UC

More information

The Entity-Relationship Model

The Entity-Relationship Model The Entity-Relationship Model Chapter 2 Slides modified by Rasmus Pagh for Database Systems, Fall 2006 IT University of Copenhagen Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Today

More information

Instant SQL Programming

Instant SQL Programming Instant SQL Programming Joe Celko Wrox Press Ltd. INSTANT Table of Contents Introduction 1 What Can SQL Do for Me? 2 Who Should Use This Book? 2 How To Use This Book 3 What You Should Know 3 Conventions

More information

Databases Model the Real World. The Entity- Relationship Model. Conceptual Design. Steps in Database Design. ER Model Basics. ER Model Basics (Contd.

Databases Model the Real World. The Entity- Relationship Model. Conceptual Design. Steps in Database Design. ER Model Basics. ER Model Basics (Contd. The Entity- Relationship Model R &G - Chapter 2 A relationship, I think, is like a shark, you know? It has to constantly move forward or it dies. And I think what we got on our hands is a dead shark. Woody

More information

University of Massachusetts Amherst Department of Computer Science Prof. Yanlei Diao

University of Massachusetts Amherst Department of Computer Science Prof. Yanlei Diao University of Massachusetts Amherst Department of Computer Science Prof. Yanlei Diao CMPSCI 445 Midterm Practice Questions NAME: LOGIN: Write all of your answers directly on this paper. Be sure to clearly

More information

THE ENTITY- RELATIONSHIP (ER) MODEL CHAPTER 7 (6/E) CHAPTER 3 (5/E)

THE ENTITY- RELATIONSHIP (ER) MODEL CHAPTER 7 (6/E) CHAPTER 3 (5/E) THE ENTITY- RELATIONSHIP (ER) MODEL CHAPTER 7 (6/E) CHAPTER 3 (5/E) 2 LECTURE OUTLINE Using High-Level, Conceptual Data Models for Database Design Entity-Relationship (ER) model Popular high-level conceptual

More information

Modern Systems Analysis and Design

Modern Systems Analysis and Design Modern Systems Analysis and Design Prof. David Gadish Structuring System Data Requirements Learning Objectives Concisely define each of the following key data modeling terms: entity type, attribute, multivalued

More information

DATABASE DESIGN. - Developing database and information systems is performed using a development lifecycle, which consists of a series of steps.

DATABASE DESIGN. - Developing database and information systems is performed using a development lifecycle, which consists of a series of steps. DATABASE DESIGN - The ability to design databases and associated applications is critical to the success of the modern enterprise. - Database design requires understanding both the operational and business

More information

Chapter 9 Joining Data from Multiple Tables. Oracle 10g: SQL

Chapter 9 Joining Data from Multiple Tables. Oracle 10g: SQL Chapter 9 Joining Data from Multiple Tables Oracle 10g: SQL Objectives Identify a Cartesian join Create an equality join using the WHERE clause Create an equality join using the JOIN keyword Create a non-equality

More information

Database Design. Marta Jakubowska-Sobczak IT/ADC based on slides prepared by Paula Figueiredo, IT/DB

Database Design. Marta Jakubowska-Sobczak IT/ADC based on slides prepared by Paula Figueiredo, IT/DB Marta Jakubowska-Sobczak IT/ADC based on slides prepared by Paula Figueiredo, IT/DB Outline Database concepts Conceptual Design Logical Design Communicating with the RDBMS 2 Some concepts Database: an

More information

Relational Algebra. Query Languages Review. Operators. Select (σ), Project (π), Union ( ), Difference (-), Join: Natural (*) and Theta ( )

Relational Algebra. Query Languages Review. Operators. Select (σ), Project (π), Union ( ), Difference (-), Join: Natural (*) and Theta ( ) Query Languages Review Relational Algebra SQL Set operators Union Intersection Difference Cartesian product Relational Algebra Operators Relational operators Selection Projection Join Division Douglas

More information

ENRICHED CATEGORIES AND THE FLOYD-WARSHALL CONNECTION Vaughan Pratt Computer Science Dept. Stanford University April, 1989

ENRICHED CATEGORIES AND THE FLOYD-WARSHALL CONNECTION Vaughan Pratt Computer Science Dept. Stanford University April, 1989 ENRICHED CATEGORIES AND THE FLOYD-WARSHALL CONNECTION Vaughan Pratt Computer Science Dept. Stanford University April, 1989 Abstract We give a correspondence between enriched categories and the Gauss-Kleene-Floyd-Warshall

More information

LiTH, Tekniska högskolan vid Linköpings universitet 1(7) IDA, Institutionen för datavetenskap Juha Takkinen 2007-05-24

LiTH, Tekniska högskolan vid Linköpings universitet 1(7) IDA, Institutionen för datavetenskap Juha Takkinen 2007-05-24 LiTH, Tekniska högskolan vid Linköpings universitet 1(7) IDA, Institutionen för datavetenskap Juha Takkinen 2007-05-24 1. A database schema is a. the state of the db b. a description of the db using a

More information

Chapter 2: Entity-Relationship Model. Entity Sets. " Example: specific person, company, event, plant

Chapter 2: Entity-Relationship Model. Entity Sets.  Example: specific person, company, event, plant Chapter 2: Entity-Relationship Model! Entity Sets! Relationship Sets! Design Issues! Mapping Constraints! Keys! E-R Diagram! Extended E-R Features! Design of an E-R Database Schema! Reduction of an E-R

More information

SQL DDL. DBS Database Systems Designing Relational Databases. Inclusion Constraints. Key Constraints

SQL DDL. DBS Database Systems Designing Relational Databases. Inclusion Constraints. Key Constraints DBS Database Systems Designing Relational Databases Peter Buneman 12 October 2010 SQL DDL In its simplest use, SQL s Data Definition Language (DDL) provides a name and a type for each column of a table.

More information

www.gr8ambitionz.com

www.gr8ambitionz.com Data Base Management Systems (DBMS) Study Material (Objective Type questions with Answers) Shared by Akhil Arora Powered by www. your A to Z competitive exam guide Database Objective type questions Q.1

More information

THE OPEN UNIVERSITY OF TANZANIA FACULTY OF SCIENCE TECHNOLOGY AND ENVIRONMENTAL STUDIES BACHELOR OF SIENCE IN DATA MANAGEMENT

THE OPEN UNIVERSITY OF TANZANIA FACULTY OF SCIENCE TECHNOLOGY AND ENVIRONMENTAL STUDIES BACHELOR OF SIENCE IN DATA MANAGEMENT THE OPEN UNIVERSITY OF TANZANIA FACULTY OF SCIENCE TECHNOLOGY AND ENVIRONMENTAL STUDIES BACHELOR OF SIENCE IN DATA MANAGEMENT ODM 106.DATABASE CONCEPTS COURSE OUTLINE 1.0 Introduction This introductory

More information

Chapter 7. Homotopy. 7.1 Basic concepts of homotopy. Example: z dz. z dz = but

Chapter 7. Homotopy. 7.1 Basic concepts of homotopy. Example: z dz. z dz = but Chapter 7 Homotopy 7. Basic concepts of homotopy Example: but γ z dz = γ z dz γ 2 z dz γ 3 z dz. Why? The domain of /z is C 0}. We can deform γ continuously into γ 2 without leaving C 0}. Intuitively,

More information

Database Design Process. Databases - Entity-Relationship Modelling. Requirements Analysis. Database Design

Database Design Process. Databases - Entity-Relationship Modelling. Requirements Analysis. Database Design Process Databases - Entity-Relationship Modelling Ramakrishnan & Gehrke identify six main steps in designing a database Requirements Analysis Conceptual Design Logical Design Schema Refinement Physical

More information

Schema Mappings and Data Exchange

Schema Mappings and Data Exchange Schema Mappings and Data Exchange Phokion G. Kolaitis University of California, Santa Cruz & IBM Research-Almaden EASSLC 2012 Southwest University August 2012 1 Logic and Databases Extensive interaction

More information

MySQL for Beginners Ed 3

MySQL for Beginners Ed 3 Oracle University Contact Us: 1.800.529.0165 MySQL for Beginners Ed 3 Duration: 4 Days What you will learn The MySQL for Beginners course helps you learn about the world's most popular open source database.

More information

Chapter 8 The Enhanced Entity- Relationship (EER) Model

Chapter 8 The Enhanced Entity- Relationship (EER) Model Chapter 8 The Enhanced Entity- Relationship (EER) Model Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 8 Outline Subclasses, Superclasses, and Inheritance Specialization

More information

Implementing Graph Pattern Queries on a Relational Database

Implementing Graph Pattern Queries on a Relational Database LLNL-TR-400310 Implementing Graph Pattern Queries on a Relational Database Ian L. Kaplan, Ghaleb M. Abdulla, S Terry Brugger, Scott R. Kohn January 8, 2008 Disclaimer This document was prepared as an account

More information

Applying Model Management to Classical Meta Data Problems

Applying Model Management to Classical Meta Data Problems Applying Model Management to Classical Meta Data Problems Philip A. Bernstein Microsoft Research One Microsoft Way Redmond, WA 98052-6399 philbe@microsoft.com Abstract Model management is a new approach

More information

Data Exchange: Semantics and Query Answering

Data Exchange: Semantics and Query Answering Data Exchange: Semantics and Query Answering Ronald Fagin a Phokion G. Kolaitis b,1 Renée J. Miller c,1 Lucian Popa a a IBM Almaden Research Center {fagin,lucian}@almaden.ibm.com b University of California

More information

Section IV.21. The Field of Quotients of an Integral Domain

Section IV.21. The Field of Quotients of an Integral Domain IV.21 Field of Quotients 1 Section IV.21. The Field of Quotients of an Integral Domain Note. This section is a homage to the rational numbers! Just as we can start with the integers Z and then build the

More information

SUBQUERIES AND VIEWS. CS121: Introduction to Relational Database Systems Fall 2015 Lecture 6

SUBQUERIES AND VIEWS. CS121: Introduction to Relational Database Systems Fall 2015 Lecture 6 SUBQUERIES AND VIEWS CS121: Introduction to Relational Database Systems Fall 2015 Lecture 6 String Comparisons and GROUP BY 2! Last time, introduced many advanced features of SQL, including GROUP BY! Recall:

More information

A brief overview of developing a conceptual data model as the first step in creating a relational database.

A brief overview of developing a conceptual data model as the first step in creating a relational database. Data Modeling Windows Enterprise Support Database Services provides the following documentation about relational database design, the relational database model, and relational database software. Introduction

More information

Basic Concepts of Set Theory, Functions and Relations

Basic Concepts of Set Theory, Functions and Relations March 1, 2006 p. 1 Basic Concepts of Set Theory, Functions and Relations 1. Basic Concepts of Set Theory...1 1.1. Sets and elements...1 1.2. Specification of sets...2 1.3. Identity and cardinality...3

More information

THE OPEN UNIVERSITY OF TANZANIA FACULTY OF SCIENCE TECHNOLOGY AND ENVIRONMENTAL STUDIES BACHELOR OF SIENCE IN INFORMATION AND COMMUNICATION TECHNOLOGY

THE OPEN UNIVERSITY OF TANZANIA FACULTY OF SCIENCE TECHNOLOGY AND ENVIRONMENTAL STUDIES BACHELOR OF SIENCE IN INFORMATION AND COMMUNICATION TECHNOLOGY THE OPEN UNIVERSITY OF TANZANIA FACULTY OF SCIENCE TECHNOLOGY AND ENVIRONMENTAL STUDIES BACHELOR OF SIENCE IN INFORMATION AND COMMUNICATION TECHNOLOGY OIT 217.DATABASE CONCEPTS AND DESIGN COURSE OUTLINE

More information

The Relational Data Model: Structure

The Relational Data Model: Structure The Relational Data Model: Structure 1 Overview By far the most likely data model in which you ll implement a database application today. Of historical interest: the relational model is not the first implementation

More information

CSCE 156H/RAIK 184H Assignment 4 - Project Phase III Database Design

CSCE 156H/RAIK 184H Assignment 4 - Project Phase III Database Design CSCE 156H/RAIK 184H Assignment 4 - Project Phase III Database Design Dr. Chris Bourke Spring 2016 1 Introduction In the previous phase of this project, you built an application framework that modeled the

More information

Data Modeling using XML. Murali Mani, WPI Antonio Badia, University of Louisville Oct 13, 2003

Data Modeling using XML. Murali Mani, WPI Antonio Badia, University of Louisville Oct 13, 2003 Data Modeling using XML Murali Mani, WPI Antonio Badia, University of Louisville Outline Part I: How to come up with good XML designs for real world database applications? Part II: Translation between

More information

XML Data Integration

XML Data Integration XML Data Integration Lucja Kot Cornell University 11 November 2010 Lucja Kot (Cornell University) XML Data Integration 11 November 2010 1 / 42 Introduction Data Integration and Query Answering A data integration

More information

Data exchange. L. Libkin 1 Data Integration and Exchange

Data exchange. L. Libkin 1 Data Integration and Exchange Data exchange Source schema, target schema; need to transfer data between them. A typical scenario: Two organizations have their legacy databases, schemas cannot be changed. Data from one organization

More information

INTRODUCTORY SET THEORY

INTRODUCTORY SET THEORY M.Sc. program in mathematics INTRODUCTORY SET THEORY Katalin Károlyi Department of Applied Analysis, Eötvös Loránd University H-1088 Budapest, Múzeum krt. 6-8. CONTENTS 1. SETS Set, equal sets, subset,

More information

Lesson 8: Introduction to Databases E-R Data Modeling

Lesson 8: Introduction to Databases E-R Data Modeling Lesson 8: Introduction to Databases E-R Data Modeling Contents Introduction to Databases Abstraction, Schemas, and Views Data Models Database Management System (DBMS) Components Entity Relationship Data

More information

Files. Files. Files. Files. Files. File Organisation. What s it all about? What s in a file?

Files. Files. Files. Files. Files. File Organisation. What s it all about? What s in a file? Files What s it all about? Information being stored about anything important to the business/individual keeping the files. The simple concepts used in the operation of manual files are often a good guide

More information

Lecture 6. SQL, Logical DB Design

Lecture 6. SQL, Logical DB Design Lecture 6 SQL, Logical DB Design Relational Query Languages A major strength of the relational model: supports simple, powerful querying of data. Queries can be written intuitively, and the DBMS is responsible

More information

Review: Participation Constraints

Review: Participation Constraints Review: Participation Constraints Does every department have a manager? If so, this is a participation constraint: the participation of Departments in Manages is said to be total (vs. partial). Every did

More information

CPS352 Database Systems: Design Project

CPS352 Database Systems: Design Project CPS352 Database Systems: Design Project Purpose: Due: To give you experience with designing and implementing a database to model a real domain Various milestones due as shown in the syllabus Requirements

More information

CMU - SCS 15-415/15-615 Database Applications Spring 2013, C. Faloutsos Homework 1: E.R. + Formal Q.L. Deadline: 1:30pm on Tuesday, 2/5/2013

CMU - SCS 15-415/15-615 Database Applications Spring 2013, C. Faloutsos Homework 1: E.R. + Formal Q.L. Deadline: 1:30pm on Tuesday, 2/5/2013 CMU - SCS 15-415/15-615 Database Applications Spring 2013, C. Faloutsos Homework 1: E.R. + Formal Q.L. Deadline: 1:30pm on Tuesday, 2/5/2013 Reminders - IMPORTANT: Like all homeworks, it has to be done

More information

Comments on Quotient Spaces and Quotient Maps

Comments on Quotient Spaces and Quotient Maps 22M:132 Fall 07 J. Simon Comments on Quotient Spaces and Quotient Maps There are many situations in topology where we build a topological space by starting with some (often simpler) space[s] and doing

More information

An Extension of the Relational Data Model to Incorporate Ordered Domains

An Extension of the Relational Data Model to Incorporate Ordered Domains An Extension of the Relational Data Model to Incorporate Ordered Domains WILFRED NG The Hong Kong University of Science and Technology We extend the relational data model to incorporate partial orderings

More information

Horizontal Aggregations In SQL To Generate Data Sets For Data Mining Analysis In An Optimized Manner

Horizontal Aggregations In SQL To Generate Data Sets For Data Mining Analysis In An Optimized Manner 24 Horizontal Aggregations In SQL To Generate Data Sets For Data Mining Analysis In An Optimized Manner Rekha S. Nyaykhor M. Tech, Dept. Of CSE, Priyadarshini Bhagwati College of Engineering, Nagpur, India

More information

1 Class Diagrams and Entity Relationship Diagrams (ERD)

1 Class Diagrams and Entity Relationship Diagrams (ERD) 1 Class Diagrams and Entity Relationship Diagrams (ERD) Class diagrams and ERDs both model the structure of a system. Class diagrams represent the dynamic aspects of a system: both the structural and behavioural

More information

Relational Algebra. Basic Operations Algebra of Bags

Relational Algebra. Basic Operations Algebra of Bags Relational Algebra Basic Operations Algebra of Bags 1 What is an Algebra Mathematical system consisting of: Operands --- variables or values from which new values can be constructed. Operators --- symbols

More information

XV. The Entity-Relationship Model

XV. The Entity-Relationship Model XV. The Entity-Relationship Model The Entity-Relationship Model Entities, Relationships and Attributes Cardinalities, Identifiers and Generalization Documentation of E-R Diagrams and Business Rules The

More information

Bridge from Entity Relationship modeling to creating SQL databases, tables, & relations

Bridge from Entity Relationship modeling to creating SQL databases, tables, & relations 1 Topics for this week: 1. Good Design 2. Functional Dependencies 3. Normalization Readings for this week: 1. E&N, Ch. 10.1-10.6; 12.2 2. Quickstart, Ch. 3 3. Complete the tutorial at http://sqlcourse2.com/

More information

A Workbench for Prototyping XML Data Exchange (extended abstract)

A Workbench for Prototyping XML Data Exchange (extended abstract) A Workbench for Prototyping XML Data Exchange (extended abstract) Renzo Orsini and Augusto Celentano Università Ca Foscari di Venezia, Dipartimento di Informatica via Torino 155, 30172 Mestre (VE), Italy

More information

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 13. Random Variables: Distribution and Expectation

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 13. Random Variables: Distribution and Expectation CS 70 Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 3 Random Variables: Distribution and Expectation Random Variables Question: The homeworks of 20 students are collected

More information

A CONSTRUCTION OF THE UNIVERSAL COVER AS A FIBER BUNDLE

A CONSTRUCTION OF THE UNIVERSAL COVER AS A FIBER BUNDLE A CONSTRUCTION OF THE UNIVERSAL COVER AS A FIBER BUNDLE DANIEL A. RAMRAS In these notes we present a construction of the universal cover of a path connected, locally path connected, and semi-locally simply

More information

Introduction to tuple calculus Tore Risch 2011-02-03

Introduction to tuple calculus Tore Risch 2011-02-03 Introduction to tuple calculus Tore Risch 2011-02-03 The relational data model is based on considering normalized tables as mathematical relationships. Powerful query languages can be defined over such

More information

Functional Dependencies and Normalization

Functional Dependencies and Normalization Functional Dependencies and Normalization 5DV119 Introduction to Database Management Umeå University Department of Computing Science Stephen J. Hegner hegner@cs.umu.se http://www.cs.umu.se/~hegner Functional

More information

Introduction to SQL C H A P T E R3. Exercises

Introduction to SQL C H A P T E R3. Exercises C H A P T E R3 Introduction to SQL Exercises 3.1 Write the following queries in SQL, using the university schema. (We suggest you actually run these queries on a database, using the sample data that we

More information

MOC 20461C: Querying Microsoft SQL Server. Course Overview

MOC 20461C: Querying Microsoft SQL Server. Course Overview MOC 20461C: Querying Microsoft SQL Server Course Overview This course provides students with the knowledge and skills to query Microsoft SQL Server. Students will learn about T-SQL querying, SQL Server

More information

Course: CSC 222 Database Design and Management I (3 credits Compulsory)

Course: CSC 222 Database Design and Management I (3 credits Compulsory) Course: CSC 222 Database Design and Management I (3 credits Compulsory) Course Duration: Three hours per week for 15weeks with practical class (45 hours) As taught in 2010/2011 session Lecturer: Oladele,

More information

Explainable Security for Relational Databases

Explainable Security for Relational Databases Explainable Security for Relational Databases Gabriel Bender Cornell University Ithaca, NY 14853, USA gbender@cs.cornell.edu Łucja Kot Cornell University Ithaca, NY 14853, USA lucja@cs.cornell.edu Johannes

More information

Chapter 7: Products and quotients

Chapter 7: Products and quotients Chapter 7: Products and quotients Matthew Macauley Department of Mathematical Sciences Clemson University http://www.math.clemson.edu/~macaule/ Math 42, Spring 24 M. Macauley (Clemson) Chapter 7: Products

More information

Database Fundamentals: 1

Database Fundamentals: 1 Database Fundamentals Robert J. Robbins Johns Hopkins University rrobbins@gdb.org Database Fundamentals: 1 What is a Database? General: A database is any collection of related data. Restrictive: A database

More information

SPARQL: Un Lenguaje de Consulta para la Web

SPARQL: Un Lenguaje de Consulta para la Web SPARQL: Un Lenguaje de Consulta para la Web Semántica Marcelo Arenas Pontificia Universidad Católica de Chile y Centro de Investigación de la Web M. Arenas SPARQL: Un Lenguaje de Consulta para la Web Semántica

More information

Foundations of Query Languages

Foundations of Query Languages Foundations of Query Languages SS 2011 2. 2. Foundations of Query Languages Dr. Fang Wei Lehrstuhl für Datenbanken und Informationssysteme Universität Freiburg SS 2011 Dr. Fang Wei 22. Mai 2011 Seite 1

More information

The Entity-Relationship Model

The Entity-Relationship Model The Entity-Relationship Model Overview of Database Design Requirements analysis Conceptual design data model Logical design Schema refinement: Normalization Physical tuning Conceptual Design Entities Conceptual

More information

The Relational Model. Ramakrishnan&Gehrke, Chapter 3 CS4320 1

The Relational Model. Ramakrishnan&Gehrke, Chapter 3 CS4320 1 The Relational Model Ramakrishnan&Gehrke, Chapter 3 CS4320 1 Why Study the Relational Model? Most widely used model. Vendors: IBM, Informix, Microsoft, Oracle, Sybase, etc. Legacy systems in older models

More information

Database Design Patterns. Winter 2006-2007 Lecture 24

Database Design Patterns. Winter 2006-2007 Lecture 24 Database Design Patterns Winter 2006-2007 Lecture 24 Trees and Hierarchies Many schemas need to represent trees or hierarchies of some sort Common way of representing trees: An adjacency list model Each

More information

Integrating Data from Possibly Inconsistent Databases

Integrating Data from Possibly Inconsistent Databases Integrating Data from Possibly Inconsistent Databases Phan Minh Dung Department of Computer Science Asian Institute of Technology PO Box 2754, Bangkok 10501, Thailand dung@cs.ait.ac.th Abstract We address

More information

Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson

Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson Mathematics for Computer Science/Software Engineering Notes for the course MSM1F3 Dr. R. A. Wilson October 1996 Chapter 1 Logic Lecture no. 1. We introduce the concept of a proposition, which is a statement

More information

Database Design. Goal: specification of database schema Methodology: E-R Model is viewed as a set of

Database Design. Goal: specification of database schema Methodology: E-R Model is viewed as a set of Database Design Goal: specification of database schema Methodology: Use E-R model to get a high-level graphical view of essential components of the model and how they are related Convert E-R diagram to

More information

Databases and BigData

Databases and BigData Eduardo Cunha de Almeida eduardo.almeida@uni.lu Outline of the course Introduction Database Systems (E. Almeida) Distributed Hash Tables and P2P (C. Cassagnes) NewSQL (D. Kim and J. Meira) NoSQL (D. Kim)

More information

Semantics of UML class diagrams

Semantics of UML class diagrams 1 Otto-von-Guericke Universität Magdeburg, Germany April 26, 2016 Sets Definition (Set) A set is a collection of objects. The basic relation is membership: x A (x is a member of A) The following operations

More information

The Relational Algebra

The Relational Algebra The Relational Algebra Relational set operators: The data in relational tables are of limited value unless the data can be manipulated to generate useful information. Relational Algebra defines the theoretical

More information

Theory of Relational Database Design and Normalization

Theory of Relational Database Design and Normalization Theory of Relational Database Design and Normalization (Based on Chapter 14 and some part of Chapter 15 in Fundamentals of Database Systems by Elmasri and Navathe) 1 Informal Design Guidelines for Relational

More information

Testing LTL Formula Translation into Büchi Automata

Testing LTL Formula Translation into Büchi Automata Testing LTL Formula Translation into Büchi Automata Heikki Tauriainen and Keijo Heljanko Helsinki University of Technology, Laboratory for Theoretical Computer Science, P. O. Box 5400, FIN-02015 HUT, Finland

More information

Full and Complete Binary Trees

Full and Complete Binary Trees Full and Complete Binary Trees Binary Tree Theorems 1 Here are two important types of binary trees. Note that the definitions, while similar, are logically independent. Definition: a binary tree T is full

More information

Normalisation in the Presence of Lists

Normalisation in the Presence of Lists 1 Normalisation in the Presence of Lists Sven Hartmann, Sebastian Link Information Science Research Centre, Massey University, Palmerston North, New Zealand 1. Motivation & Revision of the RDM 2. The Brouwerian

More information

Relational Algebra and SQL

Relational Algebra and SQL Relational Algebra and SQL Johannes Gehrke johannes@cs.cornell.edu http://www.cs.cornell.edu/johannes Slides from Database Management Systems, 3 rd Edition, Ramakrishnan and Gehrke. Database Management

More information

SQL Server Table Design - Best Practices

SQL Server Table Design - Best Practices CwJ Consulting Ltd SQL Server Table Design - Best Practices Author: Andy Hogg Date: 20 th February 2015 Version: 1.11 SQL Server Table Design Best Practices 1 Contents 1. Introduction... 3 What is a table?...

More information

Data Integration and Exchange. L. Libkin 1 Data Integration and Exchange

Data Integration and Exchange. L. Libkin 1 Data Integration and Exchange Data Integration and Exchange L. Libkin 1 Data Integration and Exchange Traditional approach to databases A single large repository of data. Database administrator in charge of access to data. Users interact

More information

A Tool for Generating Relational Database Schema from EER Diagram

A Tool for Generating Relational Database Schema from EER Diagram A Tool for Generating Relational Schema from EER Diagram Lisa Simasatitkul and Taratip Suwannasart Abstract design is an important activity in software development. EER diagram is one of diagrams, which

More information