Each animal in ONE cage, multiple animals can share a cage Each animal cared for by ONE keeper, a keeper cares for multiple animals

Similar documents
6.830 Lecture 2 9/11/2017 Relational Data Model (PS1 Out)

Legacy SQL is a terrible language -- Date paper in 1985

L3 The Relational Model. Eugene Wu Fall 2018

6.830 Lecture PS1 Due Next Time (Tuesday!) Lab 1 Out end of week start early!

CSE 544 Data Models. Lecture #3. CSE544 - Spring,

Database!! Structured data collection!! Records!! Relationships. Enforces that data maintains certain consistency properties

CSE 544 Principles of Database Management Systems. Lecture 4: Data Models a Never-Ending Story

CSE 544 Principles of Database Management Systems. Fall 2016 Lecture 4 Data models A Never-Ending Story

Database Technology Introduction. Heiko Paulheim

Chapter 1: Introduction

DISCUSSION 5min 2/24/2009. DTD to relational schema. Inlining. Basic inlining

Overview of Data Management

System R and the Relational Model

B.H.GARDI COLLEGE OF MASTER OF COMPUTER APPLICATION. Ch. 1 :- Introduction Database Management System - 1

Introduction to Database Systems

DATABASE MANAGEMENT SYSTEM SHORT QUESTIONS. QUESTION 1: What is database?

Introduction to Databases CS348

What s a database system? Review of Basic Database Concepts. Entity-relationship (E/R) diagram. Two important questions. Physical data independence

Faloutsos - Pavlo CMU SCS /615

Overview. Carnegie Mellon Univ. School of Computer Science /615 - DB Applications. Concepts - reminder. History

CS360. Business Information Systems Analysis and Modeling. System Models and Entity Relationship Models. LJ Waguespack, Ph.D.

CS425 Fall 2016 Boris Glavic Chapter 1: Introduction

Introduction Database Concepts

Chapter 1: Introduction. Chapter 1: Introduction

Outline. Database Management Systems (DBMS) Database Management and Organization. IT420: Database Management and Organization

Chapter 1: Introduction

Announcements. Relational Model & Algebra. Example. Relational data model. Example. Schema versus instance. Lecture notes

Course Introduction & History of Database Systems

Relational Model & Algebra. Announcements (Tue. Sep. 3) Relational data model. CompSci 316 Introduction to Database Systems

Database Fundamentals Chapter 1

Chapter 1: Introduction

Introduction to Data Management CSE 344

CS317 File and Database Systems

Introduction to Data Management CSE 344

Chapter 1: Introduction

DATABASE MANAGEMENT SYSTEMS. UNIT I Introduction to Database Systems

Announcements. Reading Material. Recap. Today 9/17/17. Storage (contd. from Lecture 6)

Introduction to Data Management CSE 344

Introduction to Data Management CSE 344. Lectures 8: Relational Algebra

Database System Concepts and Architecture

Data, Databases, and DBMSs

Layers. External Level Conceptual Level Internal Level

Relational Model and Algebra. Introduction to Databases CompSci 316 Fall 2018

6.830 Lecture Recovery 10/30/2017

Introduction to Data Management CSE 344

Database System Concepts and Architecture. Copyright 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Advanced Topics in Database Systems Performance. System R and the Relational Model

5/17/17. Announcements. Review: Transactions. Outline. Review: TXNs in SQL. Review: ACID. Database Systems CSE 414.

CS143: Relational Model

Database Systems CSE 414

Chapter 1 Introduction

Lecture 16. The Relational Model

Copyright 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2-1

Basic operators: selection, projection, cross product, union, difference,

Introduction to Geographic Information Science. Updates. Last Lecture. Geography 4103 / Database Management

What is Data? ANSI definition: Volatile vs. persistent data. Data. Our concern is primarily with persistent data

What is Data? Volatile vs. persistent data Our concern is primarily with persistent data

Relational Model & Algebra. Announcements (Thu. Aug. 27) Relational data model. CPS 116 Introduction to Database Systems

Relational Model and Relational Algebra

Part I What are Databases?

Fundamentals of Database Systems Prof. Arnab Bhattacharya Department of Computer Science and Engineering Indian Institute of Technology, Kanpur

Unit I. By Prof.Sushila Aghav MIT

Database Principle. Zhuo Wang Spring

6.830 Lecture Recovery 10/30/2017

R & G Chapter 13. Implementation of single Relational Operations Choices depend on indexes, memory, stats, Joins Blocked nested loops:

Informatics 1: Data & Analysis

Bonus Content. Glossary

Databases and Database Management Systems

UNIT I. Introduction

Database Management System 2

Part I: Structured Data

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

Basant Group of Institution

System R cs262a, Lecture 2

Problem Set 2 Solutions

The functions performed by a typical DBMS are the following:

Mahathma Gandhi University

Overview of Data Management

Database Applications (15-415)

From ER Diagrams to the Relational Model. Rose-Hulman Institute of Technology Curt Clifton

ADVANCED DATABASES ; Spring 2015 Prof. Sang-goo Lee (11:00pm: Mon & Wed: Room ) Advanced DB Copyright by S.-g.

Database Systems ( 資料庫系統 ) Practicum in Database Systems ( 資料庫系統實驗 ) 9/20 & 9/21, 2006 Lecture #1

lecture notes September 2, How to sort?

MITOCW watch?v=w_-sx4vr53m

; Spring 2008 Prof. Sang-goo Lee (14:30pm: Mon & Wed: Room ) ADVANCED DATABASES

Chapter 11 Database Concepts

DATABASE PERFORMANCE AND INDEXES. CS121: Relational Databases Fall 2017 Lecture 11

Database Systems. Sven Helmer. Database Systems p. 1/567

CSE 344 APRIL 20 TH RDBMS INTERNALS

Tree-Structured Indexes

CS122 Lecture 3 Winter Term,

Techno India Batanagar Computer Science and Engineering. Model Questions. Subject Name: Database Management System Subject Code: CS 601

8) A top-to-bottom relationship among the items in a database is established by a

6.830 Problem Set 3 Assigned: 10/28 Due: 11/30

Data and Knowledge Management Dr. Rick Jerz

CSE2004 Database Management Systems

Consistent deals with integrity constraints, which we are not going to talk about.

CSE 544 Principles of Database Management Systems. Magdalena Balazinska Winter 2009 Lecture 6 - Storage and Indexing

Chapter B: Hierarchical Model

Lecture 8 Index (B+-Tree and Hash)

Transcription:

3 data models from the 1970s Hierarchical (IMS + DL/1) Network (Codasyl + Codasyl DML) Relations (Codd proposal + DL/alpha Relational algebra SQL Quel) Themes: Data redundancy Physical data independence Logical data independence High level language Why study ancient history? Those that do not understand the mistakes of their ancestors will end up repeating them Use Zoo example (with one more kind of object) 3 objects 2 relationships (Name, species, age, feeding_time)-------------------- lives_in (id, size) ---------------------- cared_for_by (Name, address)<------------------------------------------ Each animal in ONE cage, multiple animals can share a cage Each animal cared for by ONE keeper, a keeper cares for multiple animals IMS (IBM 1968) Segment types (record types) Segments (instances) Schema (hierarchical collection of segment types must be a tree) Possible schemas

1) 2) Instance of 1) Sam Freddie 1 Jimmy 2 Sally 1 All have redundancy! 1) repeat cage info for animals which share a cage 2) repeat cage info for animals in a shared cage with different keepers Bad: possibility of inconsistency Fundamental problem: Cannot be represented as a hierarchy! IMS Storage Root dependents ***** ********* Sequential Sequential Index Sequential Hash Pointer spaghetti Index Pointer spaghetti Note: no indexes on dependent segments! DL/1

Every segment has a hierarchical sequential key (HSK) Key of the segment, prepended by keys of path back to the root All segments are logically in HSK order (for purposes of DL/1) Commands GU [segment type] [predicate] GN GNP D I Find all cages that Sam enters: GU (name = Sam ) Until no more GNP Find the keepers that enter cage 6 GU GNP (id = 6) Until no more GN GNP (id = 6) Notes: GU is really get first Some commands are fast; some are slow; depends on the storage chosen and the schema chosen. IMS wizards make gobs of money; even today. IMS problems: a) duplication of data (we talked about this above) b) painful low level programming interface have to program the search algorithm c) limited physical data independence change root from indexed to hash --- programs that do GN on the root segment will fail

cannot do inserts into sequential root structure maintenance required if you change the tuning knobs! Hard to tell how bad it will be. One of Codd s key points!!! This is terrible system design d) limited logical data independence Zoo acquires a pair of Pandas they have 2 feeding times! Feedings Must change the schema! As a cost cutting measure, Zoo management decides a keeper will be responsible for a cage and all the animals in that cage. Should change the schema to match the business problem Management decides to have patrons who buy cages Patrons Schemas change for all these reasons plus Feds change the rules (OSHA) Tax rules change (IRS) Merge with another zoo

Whenever the logical schema changes you need program maintenance unknown complexity!! In the worst case, toss everything; begin again!! This was what was motivating Codd Codasyl (Committee on Data Systems Languages) BF Goodrich (the guys without the blimp) built a prototype Commercialized by Cullinet Corp. as IDS Codasyl committee wrote standardization documents closely linked to IDS Record types (like IMS) Connected by named Sets (1::n relationships) Arranged in a graph Cared_for_by Lives_in \/ \/ Models network data directly. Ought to be better than IMS. Record types 1) hashed 2) clustered with the owner record in some set Pointer spaghetti for set implementation If a record is not hashed, then it can only be accessed through set membership. Codasyl DML Find the cages that Sam enters Find (name = Sam ) Until nomore Find next Animal in Cared_for_by Find parent in Lives_in IMS has current segment; current parent ( 2 pins) Codasyl has

(6 pins) Current of app Current of every record type Current of every set type Programming is Find an entry point Navigate in N-D space For a defense of this programming style see 1973 Turing award lecture by Charlie Bachmann. Codasyl issues Horrible complexity. No physical data independence change most anything recode No logical data independence change most anything -> recode If you screw up the data structure inadvertently, then must reload everything. (No isolation) Initial load must be done all at once. many hours. Codd: relations Unordered collections of tuples (name, species, age, feeding_time) (id, size) (id, name, address) ************************************** (name, species, age, feeding_time, cid, kid) (id, size) (id, name, address) Or (name, species, age, feeding_time) (id, size) (id, name, address) Lives_in (aname, cid) Cared_for_by (aname, kid)

Data base design problem which one to choose High level language for access (physical data independence) What you want not how to get it Codd s proposals (he did cellular automata previously) Data language alpha (basically 1 st order predicate calculus) Relational algebra (a collection of operations chained together APL style) No mere mortals could understand either language SQL (and Quel) were much more accessible Find the cages that Sam touches Select cid From Where zid in Select id From Where name = Sam Complete physical data independence Eliminates redundancy Better change at logical data independence (views) Define view (Sam_) as Select cid From Where zid in Select id From Where name = Sam Select From Sam_ Where All queries and many updates can be supported on views. Interested reader is referred to SIGMOD 1976 and a litany of papers that have followed. Debate raged throughout the 1970 s over:

Efficiency Programmability of high level languages Cobol Won hands down by relational model.

MIT OpenCourseWare http://ocw.mit.edu 6.830 / 6.814 Database Systems Fall 2010 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.