E.Bertino, L.Matino Object-Oriented Database Systems 1 Chapter 5. Evolution Seoul National University Department of Computer Engineering OOPSLA Lab.

Slides:



Advertisements
Similar presentations
OO databases 1 Object Oriented databases. OO databases 2 Developing OODBMS - motivation motivation more and more application areas require systems that.
Advertisements

Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 5 More SQL: Complex Queries, Triggers, Views, and Schema Modification.
E.Bertino, L.Matino Object-Oriented Database Systems 1 Chapter 2. Object-Oriented Data Model Seoul National University Department. of Computer Engineering.
Introduction to Databases
Chapter 6 Advanced Data Modelling
Inheritance “a mechanism for propagating properties (attributes & methods) of superclasses to subclasses.”
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 5 More SQL: Complex Queries, Triggers, Views, and Schema Modification.
Chapter Object-Oriented Practices. Agenda Object-Oriented Concepts Terminology Object-Oriented Modeling Tips Object-Oriented Data Models and DBMSs.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 8 The Enhanced Entity- Relationship (EER) Model.
File Systems and Databases
Chapter 14 (Web): Object-Oriented Data Modeling
Object-Oriented Databases
Object-oriented Programming Concepts
Chapter 10 Class and Method Design
7M822 UML Class Diagrams advanced concepts 15 September 2008.
Database Systems More SQL Database Design -- More SQL1.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
Object Oriented Databases - Overview
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 11 Object and Object- Relational Databases.
Slide 1 Chapter 10 Class and Method Design. Slide 2 REVISITING THE BASIC CHARACTERISTICS OF OBJECT-ORIENTATION.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
Chapter 14: Object-Oriented Data Modeling
Chapter 7 Constraints and Triggers Spring 2011 Instructor: Hassan Khosravi.
Chapter 14: Object-Oriented Data Modeling
Object Oriented Programming: Inheritance Chapter 9.
Chapter 6: Integrity and Security Thomas Nikl 19 October, 2004 CS157B.
Chapter 12: Adding Functionality to Your Classes.
Dr. Ahmad R. Hadaegh A.R. Hadaegh California State University San Marcos (CSUSM) Page 1 Virtual Functions Polymorphism Abstract base classes.
11 1 Object oriented DB (not in book) Database Systems: Design, Implementation, & Management, 6 th Edition, Rob & Coronel Learning objectives: What.
CSE314 Database Systems More SQL: Complex Queries, Triggers, Views, and Schema Modification Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E Pearson.
Concepts and Terminology Introduction to Database.
Session 11 The Class Diagram: Aggregation and Generalization Written by Thomas A. Pender Published by Wiley Publishing, Inc. October 12, 2011 Presented.
70-294: MCSE Guide to Microsoft Windows Server 2003 Active Directory, Enhanced Chapter 4: Active Directory Architecture.
CS 403 – Programming Languages Class 25 November 28, 2000.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
Database Management System Prepared by Dr. Ahmed El-Ragal Reviewed & Presented By Mr. Mahmoud Rafeek Alfarra College Of Science & Technology Khan younis.
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Next-generation databases Active databases: when a particular event occurs and given conditions are satisfied then some actions are executed. An active.
Schema Evolution & Version Control in OODB Group members: Lynne Ward, Alistair Hamilton,Ben Hall, Joe W Falke, Kriss PaulPresenter: Joe W Falke.
CHAPTER 13 (ONLINE): OBJECT-ORIENTED DATA MODELING © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition.
1 © Prentice Hall, 2002 Chapter 14: Object-Oriented Data Modeling Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred R.
© 2011 Pearson Education 1 Chapter 13 (Online): Object-Oriented Databases Modern Database Management 10 th Edition, International Edition Jeffrey A. Hoffer,
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 15: Object-Oriented Data Modeling Modern Database Management 9 h Edition Jeffrey A.
© 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 13 (Online): Object-Oriented Data Modeling Modern Database Management 10 th Edition.
Object-Oriented Data Modeling
1 CS457 Object-Oriented Databases Chapters as reference.
Chapter 6 Introduction to Defining Classes. Objectives: Design and implement a simple class from user requirements. Organize a program in terms of a view.
11-1 CHAPTER 11 Concepts for Object-Oriented Databases.
Object-Oriented Programming Chapter Chapter
(1) ICS 313: Programming Language Theory Chapter 12: Object Oriented Programming.
Object Oriented Programming
Testing OO software. State Based Testing State machine: implementation-independent specification (model) of the dynamic behaviour of the system State:
ISBN Object-Oriented Programming Chapter Chapter
C++ Inheritance Data Structures & OO Development I 1 Computer Science Dept Va Tech June 2007 © McQuain Generalization versus Abstraction Abstraction:simplify.
DATA AND SCHEMA MODIFICATIONS CHAPTERS 4,5 (6/E) CHAPTER 8 (5/E) 1.
Chapter 5 System Modeling. What is System modeling? System modeling is the process of developing abstract models of a system, with each model presenting.
E.Bertino, L.Matino Object-Oriented Database Systems 1 Chapter 9. Systems Seoul National University Department of Computer Engineering OOPSLA Lab.
Experience with XML Schema Ashok Malhotra Schema Usage  Mapping XML Schema and XML documents controlled by the Schema to object classes and instances.
E.Bertino, L.Matino Object-Oriented Database Systems 1 Chapter.4 Version Seoul National University Department of Computer Engineering OOPSLA Lab.
E.Bertino, L.Matino Object-Oriented Database Systems Chapter 3. Query Language Seoul National University Department of Computer Engineering OOPSLA Lab.
More SQL: Complex Queries, Triggers, Views, and Schema Modification
Logical Database Design and the Rational Model
Chapter 4 Relational Databases
TIM 58 Chapter 8: Class and Method Design
Chapter 12 Outline Overview of Object Database Concepts
File Systems and Databases
Lec 3: Object-Oriented Data Modeling
Chapter 11: Classes, Instances, and Message-Handlers
Data Model.
Presentation transcript:

E.Bertino, L.Matino Object-Oriented Database Systems 1 Chapter 5. Evolution Seoul National University Department of Computer Engineering OOPSLA Lab.

OOPSLA Lab Chapter5. Evolution 2 Table of Contents 4 Schema Evolution 4 Taxonomy of Schema Modification 4 Schema Invariant 4 Semantics of Schema Modification 4 Implementation of Schema Evolution 4 Instance Evolution 4 Evolution in Gemstone, O 2 and Iris

OOPSLA Lab Chapter5. Evolution 3 Taxonomy of schema modification Schema A Schema A’ Schema Invariants Instance Evolution Instances O Instances O’

OOPSLA Lab Chapter5. Evolution 4 Schema Evolution in OODB 4 Repository of possible modifications is larger 4 increased complexity in model 4 modifications to a class can involve several classes 4 Concept of inheritance hierarchy 4 other schema modification operations 4 On-line execution of schema modification 4 efficiency

OOPSLA Lab Chapter5. Evolution 5 Taxonomy of Schema Modifications 4 Modifying the class definition 4 modifying attributes 4 modifying methods 4 Modifying the inheritance hierarchy 4 making a class S the superclass of a class C 4 removing a class S from the list of superclasses of C 4 modifying the order of the superclass of C 4 Modifying the set of classes 4 creating new classes 4 deleting classes 4 modifying class names

OOPSLA Lab Chapter5. Evolution 6 Taxonomy of Modifying Attributes 4 Adding attributes 4 Deleting attributes 4 Renaming attributes 4 Modifying the domain of attribute 4 Modifying the inheritance of attributes 4 Modifying the default value of attributes 4 Manipulating shared attributes 4 transforming non-shared attributes into shared attributes 4 modifying the value of shared attributes 4 transforming shared attributes into non-shared attributes 4 Modifying composite attributes into non-composite attributes

OOPSLA Lab Chapter5. Evolution 7 Taxonomy of Modifying Methods 4 Adding methods 4 Deleting methods 4 Modifying the names of methods 4 Modifying the implementation of methods 4 Modifying the inheritance of methods

OOPSLA Lab Chapter5. Evolution 8 Schema Consistency 4 After schema modification, schema consistency should be maintained 4 Schema invariants to make schema consistent 4 inheritance hierarchy invariant 4 unique names invariant 4 single origin invariant 4 complete inheritance invariant 4 domain compatibility invariant 4 preserving information invariant

OOPSLA Lab Chapter5. Evolution 9 Example of the Inheritance Hierarchy

OOPSLA Lab Chapter5. Evolution 10 Rules for Schema Consistency 4 Must be specified in such a way that schema invariants are respected 4 Classification of rules 4 for conflict resolution caused by multiple inheritance, redefinition of attributes and methods in a subclass 4 for propagation of modifications to subclasses 4 for aggregation, inheritance and existence of classes 4 for composite objects

OOPSLA Lab Chapter5. Evolution 11 Rules for Conflict Resolution 4 [S1] Rule for precedence of subclasses over superclasses 4 [S2] Rule for precedence between superclasses of a different origin 4 one from the first superclass 4 [S3] Rule for precedence between superclasses of the same origin 4 with same name and origin, inherited only once 4 for redefined attributes, the most specialized one 4 for incomparable domains, one from the first superclass

OOPSLA Lab Chapter5. Evolution 12 Rules for Modification Propagation 4 [P1] Rule for propagation of modifications 4 always propagated to the subclasses except for those classes in which have redefined them 4 [P2] rule for propagation of modifications in the event of conflicts 4 propagated to the subclasses only if no name conflicts 4 [P3] rule for modification of domains 4 modifiable to be more general 4 domain of inherited attribute can’t be more general than that of attribute of the superclass

OOPSLA Lab Chapter5. Evolution 13 Rules for Class Hierarchy 4 [E1] Rule for inserting superclasses 4 inserted class becomes the last superclass 4 [E2] Rule for removing superclass C’ from C 4 C’ is deleted from superclass list of C 4 if C’ is the only superclass, C gets superclass list of C’ 4 [E3] Rule for inserting a class into a schema 4 if no explicit superclass, it becomes the subclass of OBJECT class 4 [E4] Rule for removing a class from a schema 4 removed from the superclass list of all its subclasses

OOPSLA Lab Chapter5. Evolution 14 Rule for Composite Object 4 [C1] Rule for modification of the definition of composite attributes 4 exclusive composite attribute can be transformed into a non-composite or shared, but vice-versa 4 dependent attribute can be transformed into an independent and vice-versa

OOPSLA Lab Chapter5. Evolution 15 Semantics of Attribute Modification(1) 4 [1.1.1] Adding an attribute 4 if no conflicts, done  propagation to all subclasses 4 [1.1.2] Deleting an attribute 4 the attribute must have been defined locally in C. 4 [1.1.3] Modifying the name of attribute 4 can only be executed if they do not create conflicts 4 [1.1.4] Modifying the domain of attribute 4 can only be generalized 4 rule P1 (about propagation)

OOPSLA Lab Chapter5. Evolution 16 Semantics of Attribute Modification(2) 4 [1.1.5] Modifying the inheritance of attributes 4 with different origin is equivalent to delete old attribute(S.A) and add newly inherited attribute(S’.A) 4 with same origin, if both have same domain or domain of S’.A is superclass of that of S.A, then properties of S’.A are inherited otherwise, same with the case of different origin 4 [1.1.6] Modifying the default values of attributes 4 rule P1. propagated only to those subclasses which have not redefined the default value locally

OOPSLA Lab Chapter5. Evolution 17 Semantics of Attribute Modification(3) 4 [1.1.7] Manipulating shared attributes by rule P1 4 [ ] Instance attributes  shared attributes 4 [ ] modifying the values of shared attributes rule 4 [ ] Shared attributes  non-shared attributes 4 [1.1.8] Modifying composite attributes into non- composite attributes follows rule P1

OOPSLA Lab Chapter5. Evolution 18 Semantics of Modifying Methods 4 [1.2] Similar to those rules previously for modifications to attributes

OOPSLA Lab Chapter5. Evolution 19 Semantics of Modifying Inheritance Hierarchies 4 [2.1] Making a class S a superclass of a class C 4 only if not cause cycles in inheritance hierarchies 4 rule E1, S3 4 [2.2] Removing a class S from superclasses of a C 4 C should not become disconnected from its inheritance hierarchy as [1.1.2], [1.2.2] 4 [2.3] Modifying the order of the superclasses 4 results in a complete revaluation of the inheritance 4 rule S1, S2 and S3 as [1.1.5], [1.2.5]

OOPSLA Lab Chapter5. Evolution 20 Semantics of Modifying a Set of Classes 4 [3.1] Creation of a new class C 4 rule E3, rule S1, S2 and S3 4 [3.2] Deleting a class C 4 if C is the domain of an attribute, change it’s domain to the superclass of C 4 all of C's instances are deleted, as a result pending references can be made 4 [3.3] Modifying class names 4 only if other classes do not have the same name

OOPSLA Lab Chapter5. Evolution 21 Deletion of age() from Person

OOPSLA Lab Chapter5. Evolution 22 Deletion of monthly_salary() from Researcher

OOPSLA Lab Chapter5. Evolution 23 Deletion of address from Researcher_Part_Time

OOPSLA Lab Chapter5. Evolution 24 Appliance of Class Modification to Instances 4 How modifications of classes can be applied to the class instances 4 only certain type of modifications 4 modifying methods have no impact on instances 4 Immediate approach 4 proposed for GemStone, but not yet implemented 4 disadvantage : high cost 4 Deferred approach

OOPSLA Lab Chapter5. Evolution 25 Deferred Approach for Appliance of Class Modification to Instances 4 Class version 4 new version of a given class C whenever C is modified 4 each instance of C has the version of the class 4 exception manager 4 Screening system 4 instances are modified when accessed by application 4 ORION system 4 Disadvantage 4 the access to the instances can take longer

OOPSLA Lab Chapter5. Evolution 26 Consistency of Methods 4 Structural consistency 4 Behavioral consistency 4 ex) if a method refers to deleted or modified attribute? 4 compile-based solution recompile the entire schema and its method  cost overhead 4 interpretation-based solution type error or semantically incorrect method can be executed 4 No general solutions 4 difficult to determine the effects of a schema modifications to the set of methods

OOPSLA Lab Chapter5. Evolution 27 Other Approaches to Schema Evolution 4 Versions of schema 4 objects created in a specific schema version are only visible in that schema version 4 Object oriented view 4 no information loss 4 object is visible in all view, if the conditions are met

OOPSLA Lab Chapter5. Evolution 28 Instance Evolution 4 State evolution 4 modifications to an object’s attributes 4 Structural and behavioral evolution 4 migrating of the object to different classes 4 the dynamic addition of classes 4 specialization of instances

OOPSLA Lab Chapter5. Evolution 29 Integrity Constraints for Evolution 4 Migrations within the application domain 4 specifying a class as essential 4 specifying a class as exclusive 4 Migration poses inconsistency problems 4 temporary inconsistency with notification mechanism

OOPSLA Lab Chapter5. Evolution 30 Example of Instance Evolution

OOPSLA Lab Chapter5. Evolution 31 Evolution in GemStone, O 2, and Iris 4 Not provide all the evolution of functions in schemas and instanecs 4 All support 4 state evolution of instances 4 dynamic creation of classes

OOPSLA Lab Chapter5. Evolution 32 Class Evolution in GemStone 4 All types of modification to a class definition can be executed, if the class is modifiable. 4 Modifiable class cannot be instantiated 4 schema modifications which can affect instances can’t be executed on classes with instances 4 No explicit class deletion operation 4 Implicit deletion 4 no instance, no subclasses, not used as the domain in the definition of another class

OOPSLA Lab Chapter5. Evolution 33 Instance Evolution in GemStone 4 State evolution and migration between classes 4 State evolution can be controlled by 4 immediateInvariant message 4 (instanceInvariant) flag 4 Instance migration only if it wasn’t modified and the new class is 4 subclass of the old class 4 no additional instance attributes 4 same storage format as old 4 same domains of attributes

OOPSLA Lab Chapter5. Evolution 34 Example of Instance Evolution in GemStone 4 changeClassTo message | tempVar | tempVar := C new. 'Creates an instance of class C' … tempVar changeClassTo: C1 'Converts the instance of class C to the instance of class C1'

OOPSLA Lab Chapter5. Evolution 35 Evolution in O 2 4 Schema modifications can’t be done dynamically 4 Class deletion only for the class 4 no instances 4 not used in the definition of other class 4 State and structural instance evolution 4 exceptional instances

OOPSLA Lab Chapter5. Evolution 36 Evolution in Iris 4 Schema evolution is very limited 4 Function deletion 4 type properties can’t be added and deleted dynamically automatically deleted if the type is deleted 4 other functions can always be deleted DELETE FUNCTION function-name 4 system automatically deletes all those derived functions from the deleted functions

OOPSLA Lab Chapter5. Evolution 37 Type Evolution in Iris 4 No instruction to change the ordering of supertype 4 ordering of supertypes have no effect on type definition 4 Type deletion DELETE TYPE type-name 4 only if no subtype and not used in defining other types 4 not result in the deletion of its instances 4 Dynamic instance evolution 4 add type and remove type dynamically 4 default type : UserTypeObject