Flatten from/to Relational



Similar documents
Basics on Geodatabases

Tracking Database Schema Changes. Guidelines on database versioning using Devart tools

SQL Databases Course. by Applied Technology Research Center. This course provides training for MySQL, Oracle, SQL Server and PostgreSQL databases.

Karl Lum Partner, LabKey Software Evolution of Connectivity in LabKey Server

Basic Concepts of Database Systems

3. Relational Model and Relational Algebra

MySQL for Beginners Ed 3

HOW TO CONNECT TO CAC DATABASE SERVER USING MySQL

MySQL 5.0 vs. Microsoft SQL Server 2005

VBA and Databases (see Chapter 14 )

WHY DO YOU NEED A DATABASE? USE A DATABASE IF USE A SPREADSHEET IF

Relational Database Basics Review

Compared to MySQL database, Oracle has the following advantages:

Intro to Databases. ACM Webmonkeys 2011

From Spreadsheets to Relational Databases and Back

AVALANCHE MC 5.3 AND DATABASE MANAGEMENT SYSTEMS

Data Migration between Document-Oriented and Relational Databases

Oracle Application Express MS Access on Steroids

DBMS / Business Intelligence, SQL Server

A Brief Introduction to MySQL

Databases. DSIC. Academic Year

SQL Server Training Course Content

Database Optimizing Services

IENG2004 Industrial Database and Systems Design. Microsoft Access I. What is Microsoft Access? Architecture of Microsoft Access

Oracle Database 10g Express

DATA MINING TOOL FOR INTEGRATED COMPLAINT MANAGEMENT SYSTEM WEKA 3.6.7

TRANSFORMING YOUR BUSINESS

<Insert Picture Here> Oracle SQL Developer 3.0: Overview and New Features

Linas Virbalas Continuent, Inc.

Administering a Microsoft SQL Server 2000 Database

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

Administering Microsoft SQL Server Databases MOC 20462

David M. Kroenke and David J. Auer Database Processing 11 th Edition Fundamentals, Design, and Implementation. Chapter Objectives

Theory behind Normalization & DB Design. Satisfiability: Does an FD hold? Lecture 12

Extraction Transformation Loading ETL Get data out of sources and load into the DW

from Microsoft Office

End the Microsoft Access Chaos - Your simplified path to Oracle Application Express

5.5 Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall. Figure 5-2

ETL PROCESS IN DATA WAREHOUSE

Supported Platforms and Software Requirements Effective on 7 May HULFT-DataMagic for Windows Ver.2.2.0

Relational Databases for the Business Analyst

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

A Database Re-engineering Workbench

Table of Contents. Data Analysis Then & Now 1. Changing of the Guard 2. New Generation 4. Core Data Analysis Tasks 6

RDS Migration Tool Customer FAQ Updated 7/23/2015

MOC Administering Microsoft SQL Server 2014 Databases

Legacy Data Migration: DIY Might Leave You DOA

Elena Baralis, Silvia Chiusano Politecnico di Torino. Pag. 1. Active database systems. Triggers. Triggers. Active database systems.

DFW Backup Software. Whitepaper DFW Backup Agent

Administering a Microsoft SQL Server 2000 Database

Foundations of Business Intelligence: Databases and Information Management

Informatica Data Replication FAQs

Annex 9 CLIMSOFT. Presented by. Albert Mhanda (Zimbabwe) CDMS Evaluation Workshop, WMO, Geneva, Switzerland (27 May 1 June 2002)

Toad for Data Analysts, Tips n Tricks

Zoner Online Backup. Whitepaper Zoner Backup Agent

CSE 544 Principles of Database Management Systems. Magdalena Balazinska (magda) Fall 2007 Lecture 1 - Class Introduction

DATA BASE.

Database Management System Choices. Introduction To Database Systems CSE 373 Spring 2013

Ahsay Backup Software. Whitepaper Ahsay Backup Agent

Excel Add-ins Quick Start Guide

Using Database Metadata and its Semantics to Generate Automatic and Dynamic Web Entry Forms

Database Schema Deployment. Lukas Smith - lukas@liip.ch CodeWorks PHP on the ROAD

MS SQL Server DBA Training Course. Table of Contents

EMBL-EBI. Database Replication - Distribution

Administering Microsoft SQL Server Databases

AWS Schema Conversion Tool. User Guide Version 1.0

Computer Security: Principles and Practice

Quantrix & Excel: 3 Key Differences A QUANTRIX WHITE PAPER

MS Administering Microsoft SQL Server Databases

Relational Data Analysis I

Blaze Vault Online Backup. Whitepaper Blaze Vault Online Backup Agent

AWS Schema Conversion Tool. User Guide Version 1.0

DATABASE MANAGEMENT SYSTEM

Technical Data Sheet: imc SEARCH 3.1. Topology

Chapter 9 Java and SQL. Wang Yang wyang@njnet.edu.cn

Ch.5 Database Security. Ch.5 Database Security Review

Sisense. Product Highlights.

The process of database development. Logical model: relational DBMS. Relation

Real-time Data Replication

Advanced Database Management MISM Course F A Fall 2014

Databases for text storage

Migration Guide Software, Database and Version Migration

DataTrust Backup Software. Whitepaper DataTrust Backup Agent. Version 6.3

Database as a Service (DaaS) Version 1.02

>

The Relational Model. Why Study the Relational Model?

A McKnight Associates, Inc. White Paper: Effective Data Warehouse Organizational Roles and Responsibilities

COMHAIRLE NÁISIÚNTA NA NATIONAL COUNCIL FOR VOCATIONAL AWARDS PILOT. Consultative Draft Module Descriptor. Relational Database

BCS THE CHARTERED INSTITUTE FOR IT BCS HIGHER EDUCATION QUALIFICATIONS BCS Level 4 Certificate in IT. September 2013 EXAMINERS REPORT

Unit 10: Microsoft Access Queries

Chapter 5. Warehousing, Data Acquisition, Data. Visualization

Introduction. Introduction: Database management system. Introduction: DBS concepts & architecture. Introduction: DBS versus File system

Testing Trends in Data Warehouse

Transcription:

Flatten from/to Relational Jácome Cunha João Saraiva Joost Visser CIC 2007 22-23 October Universidade do Minho Software Improvement Group Jácome Cunha Flatten from/to Relational 1 / 21

Overview Jácome Cunha Flatten from/to Relational 2 / 21

Motivation Bidirectional transformation What is a spreadsheet? Relational database Advantages of DB Jácome Cunha Flatten from/to Relational 3 / 21

Motivation Motivation Bidirectional transformation What is a spreadsheet? Relational database Advantages of DB Spreadsheets are considered one of the largest programming languages in the world Their languages/systems lack structured programming features Programming in a spreadsheet environment is an error prone task Data manipulation is not so supported as in other paradigms Jácome Cunha Flatten from/to Relational 4 / 21

Bidirectional transformation Motivation Bidirectional transformation What is a spreadsheet? Relational database Advantages of DB DB SS The flatten model of a spreadsheet is mapped into a relational database model The other way around is also shown Jácome Cunha Flatten from/to Relational 5 / 21

What is a spreadsheet? Motivation Bidirectional transformation What is a spreadsheet? Relational database Advantages of DB cell text formulas graphics references to other cells incremental Jácome Cunha Flatten from/to Relational 6 / 21

Relational database Motivation Bidirectional transformation What is a spreadsheet? Relational database Advantages of DB It is a structured collection of records distributed over tables Some concepts: Primary key it is a set of attributes in the record that uniquely determine all the others Functional dependency a set of attributes X functionally determines a set of attributes Y iff each X value is associated with only one Y value Foreign key it is a reference to another entry in other table Jácome Cunha Flatten from/to Relational 7 / 21

Advantages of DB Motivation Bidirectional transformation What is a spreadsheet? Relational database Advantages of DB The existence of database management system (DBMS) allows: insert, remove and update data in the DB chance the format of the DB ensures the integrity of the DB backup and replication give permissions to users or deny them s: Oracle, Microsoft Access, MySQL, PostgreSQL Jácome Cunha Flatten from/to Relational 8 / 21

The big picture Inferring FDs Normalisation Data migration Jácome Cunha Flatten from/to Relational 9 / 21

The big picture The big picture Inferring FDs Normalisation Data migration a 1 1... a 1 n.. :: (A 1... A n ) a m 1... a mn ց extract FDs 2LT Π(A i...a k A j... A l ) normalisation (a m...a v a n...a y ) :: Π(A m... A v A n... A t ) Jácome Cunha Flatten from/to Relational 10 / 21

Inferring FDs The big picture Inferring FDs Normalisation Data migration We assume that the table has only data, not code or formulas or other things Information about relation between columns is needed otherwise there will be too many FDs and will become useless The FUN algorithm (Noel Novelli and Rosine Cicchetti) is used to infer the FDs Jácome Cunha Flatten from/to Relational 11 / 21

Normalisation The big picture Inferring FDs Normalisation Data migration For each association of columns several FDs are yielded by the algorithm One is chosen and a table is created according to it The columns that are not referred are collected into a table where the primary key is a set constituted by the primary keys from other tables Jácome Cunha Flatten from/to Relational 12 / 21

Data migration The big picture Inferring FDs Normalisation Data migration Performed by implementing refinement laws into 2LT ka B to = [ k A B] from Abstraction (from) and representation (to) functions are needed to witness the refinement Jácome Cunha Flatten from/to Relational 13 / 21

Internships Company s table Student s tables DB model Jácome Cunha Flatten from/to Relational 14 / 21

Internships Internships Company s table Student s tables DB model Jácome Cunha Flatten from/to Relational 15 / 21

Internships Internships Company s table Student s tables DB model There should be enough cases to represent the reality Jácome Cunha Flatten from/to Relational 15 / 21

Company s table Internships Company s table Student s tables DB model company, contacts and location are related company -> contacts, location contacts -> company, location Jácome Cunha Flatten from/to Relational 16 / 21

Company s table Internships Company s table Student s tables DB model company, contacts and location are related company -> contacts, location contacts -> company, location Company company contacts location Jácome Cunha Flatten from/to Relational 16 / 21

Student s tables Internships Company s table Student s tables DB model st.number, st.name and graduation are also related st.number -> st.name, graduation Jácome Cunha Flatten from/to Relational 17 / 21

Student s tables Internships Company s table Student s tables DB model st.number, st.name and graduation are also related st.number -> st.name, graduation Student number name graduation Jácome Cunha Flatten from/to Relational 17 / 21

DB model Internships Company s table Student s tables DB model Company Internship Student company contacts location company number salary status description time number name graduation Company (_company, contacts, location) Student (_st.number, st.name, graduation) Internship (_company, _st.number, salary, status, description, time) foreign key (company) references Company(company) foreign key (st.number) references Student(st.number) Jácome Cunha Flatten from/to Relational 18 / 21

Future work Jácome Cunha Flatten from/to Relational 19 / 21

Future work Start with a flatten data table, a spreadsheet Determine FDs (automatically) and the relational DB schema (not so automatically) Allows the migration to a well known and supported paradigm Jácome Cunha Flatten from/to Relational 20 / 21

Future work Future work Import a spreadsheet (and other formats) to HASKELL Tune the FDs inference/normalisation Integration into 2LT framework Create ways of export the new model to SQL or to spreadsheet Jácome Cunha Flatten from/to Relational 21 / 21