Relation Type Theory Foundations & Applications. Overview Introduction Type Theory Object Type Theory – Critique of Object Type Theory – Patches for Object.

Slides:



Advertisements
Similar presentations
Introduction to Object Orientation System Analysis and Design
Advertisements

Jane Reid, BSc/IT DB, QMUL, 25/2/02 1 Object-oriented DBMS Background to ODBMS ODBMS requirements Object components ODB conceptual design –Graphical ODB.
Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
Object-Oriented Programming Python. OO Paradigm - Review Three Characteristics of OO Languages –Inheritance It isn’t necessary to build every class from.
Composition CMSC 202. Code Reuse Effective software development relies on reusing existing code. Code reuse must be more than just copying code and changing.
Computer Science Dept. Fall 2003 Object models Object models describe the system in terms of object classes An object class is an abstraction over a set.
OBJECT ORIENTED PROGRAMMING M Taimoor Khan
Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
7M701 1 Software Engineering Object-oriented Design Sommerville, Ian (2001) Software Engineering, 6 th edition: Chapter 12 )
Chapter Object-Oriented Practices. Agenda Object-Oriented Concepts Terminology Object-Oriented Modeling Tips Object-Oriented Data Models and DBMSs.
Inheritance and Class Hierarchies Chapter 3. Chapter 3: Inheritance and Class Hierarchies2 Chapter Objectives To understand inheritance and how it facilitates.
Object Oriented System Development with VB .NET
OBJECT ORIENTED ANALYSIS & DESIGN Vassilka Kirova Department of Computer & Information Science NJIT.
7M701 1 Class Diagram advanced concepts. 7M701 2 Characteristics of Object Oriented Design (OOD) objectData and operations (functions) are combined 
Object-Oriented Databases
Object Oriented Databases - Overview
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 11 Object and Object- Relational Databases.
EER vs. UML Terminology EER Diagram Entity Type Entity Attribute
New experiences with teaching Java as a second programming language Ioan Jurca “Politehnica” University of Timisoara/Romania
Comparison of OO Programming Languages © Jason Voegele, 2003.
ICS – FORTH, August 31, 2000 Why do we need an “Object Oriented Model” ? Martin Doerr Atlanta, August 31, 2000 Foundation for Research and Technology -
Chapter 3 The Relational Model Transparencies Last Updated: Pebruari 2011 By M. Arief
11 1 Object oriented DB (not in book) Database Systems: Design, Implementation, & Management, 6 th Edition, Rob & Coronel Learning objectives: What.
Geog 495 GIS Database Design Midterm review. Outlines 1.Database Concepts 2.Relational Database 3.Object-oriented Database 4.Entity-Relationship Diagram.
Database Management System Prepared by Dr. Ahmed El-Ragal Reviewed & Presented By Mr. Mahmoud Rafeek Alfarra College Of Science & Technology Khan younis.
3rd Country Training, K.Subieta: System Engineering and Databases. Lecture 3, Slide 1 February 20, 2004 Lecture 3: Introduction to Software Analysis and.
Requirements To Design--Iteratively Chapter 12 Applying UML and Patterns Craig Larman.
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
1 CS 430 Database Theory Winter 2005 Lecture 17: Objects, XML, and DBMSs.
Chapter 6 Programming Languages. © 2005 Pearson Addison-Wesley. All rights reserved 6-2 Chapter 6: Programming Languages 6.1 Historical Perspective 6.2.
OOP Class Lawrence D’Antonio Lecture 3 An Overview of C++
Unified Modeling Language © 2002 by Dietrich and Urban1 ADVANCED DATABASE CONCEPTS Unified Modeling Language Susan D. Urban and Suzanne W. Dietrich Department.
UML Class Diagram Trisha Cummings. What we will be covering What is a Class Diagram? Essential Elements of a UML Class Diagram UML Packages Logical Distribution.
Chapter 12 Support for Object oriented Programming.
FEN NOEA/IT - Databases/ODB1 ODB – Object DataBases Object-Oriented – Fundamental Concepts UML and EE/R OO and Relational Databases Introduction.
Towards Multi-Paradigm Software Development Valentino Vranić Department of Computer Science and Engineering Faculty of Electrical Engineering.
Dale Roberts Object Oriented Programming using Java - Introduction Dale Roberts, Lecturer Computer Science, IUPUI Department.
ITEC 3220A Using and Designing Database Systems Instructor: Prof Z. Yang Course Website: 3220a.htm
Introducing Allors Applications, Tools & Platform.
ITEC 3220A Using and Designing Database Systems Instructor: Gordon Turpin Course Website: Office: CSEB3020.
Chapter 2 Object-Relational DBMSs Chapter 28 in Textbook.
CS451 - Lecture 2 1 CS451 Lecture 2: Introduction to Object Orientation Yugi Lee STB #555 (816) * Acknowledgement:
Testing OO software. State Based Testing State machine: implementation-independent specification (model) of the dynamic behaviour of the system State:
Chapter 5 Classes and Methods II Lecture Slides to Accompany An Introduction to Computer Science Using Java (2nd Edition) by S.N. Kamin, D. Mickunas, E.
OO in Context Lecture 13: Dolores Zage. Confused about OO Not alone, there is much confusion about OO many programs are claimed to be OO but are not really.
Inheritance and Class Hierarchies Chapter 3. Chapter 3: Inheritance and Class Hierarchies2 Chapter Objectives To understand inheritance and how it facilitates.
Inheritance and Class Hierarchies Chapter 3. Chapter Objectives  To understand inheritance and how it facilitates code reuse  To understand how Java.
Domain Inheritance Scaling Agility using Domain Inheritance.
The Object-Oriented Database System Manifesto Malcolm Atkinson, François Bancilhon, David deWitt, Klaus Dittrich, David Maier, Stanley Zdonik DOOD'89,
Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks.
Presented by Ted Higgins, SQL Server DBA An Introduction to Object – Oriented Programming.
Chapter 20 Concepts for Object-Oriented Databases Copyright © 2004 Pearson Education, Inc.
Chapter 7 Classes and Methods III: Static Methods and Variables Lecture Slides to Accompany An Introduction to Computer Science Using Java (2nd Edition)
A Survey of Object-Oriented Concept Oscar Nierstrasz.
Faeez, Franz & Syamim.   Database – collection of persistent data  Database Management System (DBMS) – software system that supports creation, population,
Data Models. 2 The Importance of Data Models Data models –Relatively simple representations, usually graphical, of complex real-world data structures.
CSCE 240 – Intro to Software Engineering Lecture 3.
ISBN Chapter 12 Support for Object-Oriented Programming.
Review for Test 2 Chapters 5 (start at 5.4), 6.1, , 12, 13, 15.1, Python.
Object-oriented programming (OOP) is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their.
The Object-Oriented Database System Manifesto
Lecture 2 The Relational Model
Object-Orientated Programming
Types of Programming Languages
ISC321 Database Systems I Chapter 10: Object and Object-Relational Databases: Concepts, Models, Languages, and Standards Spring 2015 Dr. Abdullah Almutairi.
Object-Oriented Programming
AP Computer Science DYRT Quiz
2.1 Introduction to Object-Oriented Programming
Some Programming Paradigms
Presentation transcript:

Relation Type Theory Foundations & Applications

Overview Introduction Type Theory Object Type Theory – Critique of Object Type Theory – Patches for Object Type Theory Relation Type Theory – Applications With Object Type Theory (Co-existence) Without Object Type Theory (Standalone)

Introduction Methodology of Science Contradictory Manifestos Programming Paradigm Proliferation

Methodology of Science Epistemology or theory of knowledge is the branch of philosophy that studies the nature, methods, limitations, and validity of knowledge and belief. (source: wikipedia) The methodology of Science is the study of the epistemology of scientific theories

Contradictory Manifestos The Object-Oriented Database System Manifesto n/OODBMS/Manifesto/htManifesto/M anifesto.html n/OODBMS/Manifesto/htManifesto/M anifesto.html Databases, Types and the Relational Model - The Third Manifesto

Programming Paradigm Proliferation Declarative – Functional – Logic – Constraint Imperative – Procedural – Object Oriented (and Subject Oriented) – Aspect Oriented – … But they are all based on Object Type Theory!

Type Theory What is a type? Why do we need types? What kind of types? How are things bound to types? How do types relate to each other?

What is a Type? (wiktionary) Type – A grouping based on shared characteristics; a class. – […] – (computing theory) A tag attached to variables and values used in determining what values may be assigned to what variables. Class – A group, collection, category or set sharing characteristics or attributes. [..] Often used to imply membership of a large class. – […] – (computing) A set of objects possibly differing in state but not behavior.

What is a Type? A type is – a grouping – of things – based on some kind of commonality.

Why do we need Types? To define behavior for the – Creation – Destruction – Mutation – Assignment (special kind of Mutation) of the things we are grouping. It is all about SHARED BEHAVIOR!

What kinds of types? Differentiate on the things that get grouped – things can be objects – things can be relations This gives us two kinds of types – Object Types – Relation Types

How are things bound to types? Objects are a priori bound to types – objects are bound to one type – objects remain bound to this same type Relations are a posteriori bound to Types – relations are bound to a type based on rules – relations can be rebound if relations/rules change

How do types relate to each other? Two kinds of type inheritance – Derivation by Extension (OO Languages, XML Schema) – Derivation by Restriction (Relational Model, XML Schema)

Kinds of Type Theory There are 2 kinds of Type Theory – Object Type Theory – Relation Type Theory

Object Type Theory No consensus, at least 2 competing camps – Object Oriented Model (OODBS Manifesto) – Relational Model (Third Manifesto) But from a Type Theory perspective, they are actually not that different!

Object Oriented Model (OODBS Manifesto) Defines mandatory and optional features that an OO Database System must support Most important are – Complex Objects – Object Identity

Complex Objects Complex objects are built from simpler ones by applying constructors to them. The simplest objects are […] atomic types. There are various complex object constructors: tuples, sets, bags, lists, and arrays are examples. The minimal set of constructors that the system should have are set, list and tuple. (source: OODBS Manifesto) Closure of Object Composition – Objects composed of ‘simpler’ or ‘simplest’ objects are themselves objects.

Object Identity Object identity has long existed in programming languages. The concept is more recent in databases […] an object has an existence which is independent of its value. Thus two notions of object equivalence exist – two objects can be identical ([..]same object) – they can be equal ([..] same value). This has two implications: – object sharing – object updates. […] identity-based models are the norm in imperative programming languages [..] But the concept is quite new in pure relational systems, where relations are value-based. (source: OODBS Manifesto)

Relational Model (Third Manifesto) The Relational Model (RM) was originally defined by Codd and refined by C.J. Date en H. Darwen in “The Third Manifesto” Some Prescriptions – Scalar values and variables are typed – Heading and Tuple/Attribute Value – Relation value – Relation variable – Relational Algebra and Assignment Some Proscriptions are – No duplicate tuples and No Nulls – Relvars are not domains* – No Object Ids* (source: Third Manifesto)

Relation-Valued Attributes The value of an attribute can be any type – So it can also be a Relation Type Closure of Relation Composition – Relations can contain other Relations (Relation- Valued attributes) or scalar values.

Relational Algebra and Assignment Relations are immutable Relation variables are mutable So all operations on relations are set based

Critique of Object Type Theory Object Types determine behavior – But relations actually determine behavior! Relations have different meaning – Relations are either set based or object based Type binding is too static Relations are second (or third) rate citizens – Objects are ‘owners’ of relation endpoints

Object Types determine behavior But relations actually determine behavior!

Relations have different meaning Relations are either set based or object based

Type binding is too static

Relations are second rate citizens

Patches for Object Type Theory Design by Contract State Machines (Finite Automata) Aspect Oriented Programming Subject Oriented Programming

Design By Contract Class invariants using Pre- and Post conditions

State Machines

Aspect Oriented Programming

Subject Oriented Programming

Relation Type Theory A Relation Type – is a type – that is a priori – statically bound – to a relation A Relations Type (Is this necessary?) – is a type – that is a posteriori – dynamically bound – to relations – based on rules about those relations – and that defines behavior for those relations

Applications Applications of Relations Type Theory – With Object Type Theory (Co-existence) Relation Oriented Method Overloading Multiple Type Declarations 3 rd Generation Object Oriented Programming (OOP) – Without Object Type Theory (Standalone) Relation Oriented Programming (ROP)

Relation Oriented Method Overloading Same signature, Different behavior

RO Method Overloading - Advantages Extra level of polymorphism More robust (contrary to Contract Based)

Multiple Type Declarations Definition Advantages Example Implementation

Muldecs - Definition A Multiple Type Declaration (muldec) is the specification of a variables types – the objects assigned to the variable should implement all types (usually interfaces) Muldecs can be supported at – The platform level (JVM, CLR, C++ linker …) – The language level (Java, C#, C++, …) – The framework level (Allors, …) Muldecs can be overloaded

Muldecs - Advantages Reduces the gap between statically and dynamically typed languages Less casting Higher level of modularization – Looser coupling is possible Better evolution – More additive Especially suited for 3 rd generation OOP

Muldecs - Example

Muldecs – Implementation in Allors

Muldecs - Notations C derivatives – type1 type2 … variable – methodName( type1 type2 … argument) Uml

3 rd Generation Object Oriented Programming (OOP) Can be seen as a evolution from – 1 st Generation OOP (Inheritance) – 2 nd Generation OOP (Delegation) Builds upon – Relation Oriented Method Overloading – Multiple Type Declaration

1 st Generation OOP

2 nd Generation OOP

3 rd Generation OO

Relation Oriented Programming