![Page 1: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/1.jpg)
DataModel Evolution
Sander VermolenEelco Visser
This research is supported by NWO/JACQUARD project638.001.610, MoDSE: ModelDriven Software Evolution.
![Page 2: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/2.jpg)
Data Models
![Page 3: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/3.jpg)
![Page 4: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/4.jpg)
![Page 5: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/5.jpg)
![Page 6: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/6.jpg)
User 1name bob real name Bob Johnsonemail [email protected]
Page 1title "The first page"isRedirect falsetext "Hello world"
![Page 7: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/7.jpg)
Count page views
Version history
![Page 8: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/8.jpg)
![Page 9: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/9.jpg)
User 1name bob real name Bob Johnsonemail [email protected]
Page 1title "The first page"isRedirect falsetext "Hello world"
No page countNo revisions
![Page 10: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/10.jpg)
![Page 11: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/11.jpg)
Coupled Data Evolution
![Page 12: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/12.jpg)
...
$dbh->bz_add_column('attachments', 'submitter_id', {TYPE => 'INT3', NOTNULL => 1}, 0);$dbh->bz_rename_column('bugs_activity', 'when', 'bug_when');_add_bug_vote_cache(); _update_product_name_definition(); _add_bug_keyword_cache();$dbh->bz_add_column('profiles', 'disabledtext', {TYPE => 'MEDIUMTEXT', NOTNULL => 1}, '');_populate_longdescs(); _update_bugs_activity_field_to_fieldid();
if (!$dbh->bz_column_info('bugs', 'lastdiffed')) {$dbh->bz_add_column('bugs', 'lastdiffed', {TYPE =>'DATETIME'});$dbh->do('UPDATE bugs SET lastdiffed = NOW()');
}
_add_unique_login_name_index_to_profiles(); $dbh->bz_add_column('profiles', 'mybugslink', {TYPE => 'BOOLEAN', NOTNULL => 1, DEFAULT => 'TRUE'});_update_component_user_fields_to_ids();$dbh->bz_add_column('bugs', 'everconfirmed', {TYPE => 'BOOLEAN', NOTNULL => 1}, 1);$dbh->bz_add_column('products', 'maxvotesperbug', {TYPE => 'INT2', NOTNULL => 1, DEFAULT => '10000'});$dbh->bz_add_column('products', 'votestoconfirm', {TYPE => 'INT2', NOTNULL => 1}, 0);_populate_milestones_table();$dbh->bz_alter_column('bugs', 'target_milestone', {TYPE => 'varchar(20)', NOTNULL => 1, DEFAULT => "'---'"});$dbh->bz_alter_column('milestones', 'value', {TYPE => 'varchar(20)', NOTNULL => 1});_add_products_defaultmilestone();
if (!$dbh->bz_index_info('cc', 'cc_bug_id_idx') || !$dbh->bz_index_info('cc', 'cc_bug_id_idx')->{TYPE}) {$dbh->bz_drop_index('cc', 'cc_bug_id_idx');$dbh->bz_add_index('cc', 'cc_bug_id_idx', {TYPE => 'UNIQUE', FIELDS => [qw(bug_id who)]});
}if (!$dbh->bz_index_info('keywords', 'keywords_bug_id_idx') || !$dbh->bz_index_info('keywords', 'keywords_bug_id_idx')->{TYPE}) {
$dbh->bz_drop_index('keywords', 'keywords_bug_id_idx');$dbh->bz_add_index('keywords', 'keywords_bug_id_idx', {TYPE => 'UNIQUE', FIELDS => [qw(bug_id
keywordid)]});}
...
![Page 13: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/13.jpg)
Costly
High risk
Holds back the development process
Large infrequent development steps
![Page 14: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/14.jpg)
Userid : integername : varcharrealName : varcharemail : tinytext
Pageid : integertitle : varcharauthor - User *isRedirect : booleancontent : text
set of
![Page 15: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/15.jpg)
Userid : integer Uniquename : varcharrealName : varchar ?email : tinytext
Page : Mediumauthor - User min(1) max(8)content : textrefs : url * Indexed
abstract Mediumid : integer Uniquetitle : ANY_NAME
![Page 16: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/16.jpg)
EvolvingData Models
![Page 17: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/17.jpg)
![Page 18: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/18.jpg)
![Page 19: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/19.jpg)
![Page 20: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/20.jpg)
![Page 21: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/21.jpg)
SpecifyingData Model Evolution
![Page 22: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/22.jpg)
Userid :: integername :: varcharrealName :: varcharemail :: tinytext
Pageid :: integertitle :: varcharauthor UserisRedirect :: booleancontent :: text
Userid :: integername :: varcharrealName :: varcharemail :: tinytext
Pageid :: integertitle :: varcharcounter :: bigintegerisRedirect :: booleanrevisions set of Revision
Revisionid :: integerpage Pagecomment :: tinyblobtimestamp :: timerevisionText :: textauthor User
![Page 23: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/23.jpg)
Added type revisions
Added attribute revisions
Moved content to revision text
Added attribute counter
Revisionid :: integerpage Pagecomment :: tinyblobtimestamp :: timeauthor User
Pagerevisions set of Revision
RevisionrevisionText :: text
Pagecounter :: biginteger
What happened?
![Page 24: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/24.jpg)
add or remove entity
change name of entity
change type of set
8 Basic Transformations
add or remove property
change name of property
change type of property
![Page 25: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/25.jpg)
move property
1 Advanced Transformation
![Page 26: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/26.jpg)
addRevision
id : integerpage - Pagecomment : tinyblobtimestamp : timeauthor - User
addcounter : biginteger
![Page 27: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/27.jpg)
![Page 28: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/28.jpg)
At / Entity Page / Property Titleadd counter : biginteger
![Page 29: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/29.jpg)
At / Entity[Id=''Page''] / Property[Id=''Title'']add counter : biginteger
![Page 30: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/30.jpg)
at // Property [Id = ../Id]add counter :: biginteger
![Page 31: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/31.jpg)
RevisionrevisionText :: text
At / Entity Revision / Property timeStampmove page.content to revisionText :: text
![Page 32: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/32.jpg)
at Entity Page / Property Titleadd counter :: biginteger
at Entity Revision / Property timeStampadd revisionText :: textfrom page.content
;
![Page 33: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/33.jpg)
EvolvingData Models
8 basic transformations
1 advanced transformation
Language to specify transformations
Positioning sub language
Specify data model evolutions
![Page 34: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/34.jpg)
DataMigration
![Page 35: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/35.jpg)
![Page 36: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/36.jpg)
Technical Domain
WebDSL
Stratego/XT
Stratego/XTGeneric Aterm
SQL Databases (MySQL)
![Page 37: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/37.jpg)
Because
we really like program transformations
generally richer than regular data acessing languages (SQL)
data migration = model transformation
Program transformation for data migration
![Page 38: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/38.jpg)
Userid :: integername :: varcharemail :: tinytext
Pageid :: integertitle :: varcharauthor User
User(id(1),name(“John”),email(“[email protected]”)
)
Page(id(2),title(“Hello World”),[author(1)]
)
![Page 39: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/39.jpg)
User(id(1),name(“John”),email(“[email protected]”)
)
Page(id(2),title(“Hello World”),[author(1)]
)
<user><id>1</id><name>John</name><email>[email protected]</email>
</user>
<page><id>2</id><title>Hello World</title><authors>
<author>1</author></authors>
</page>
![Page 40: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/40.jpg)
Userid :: integername :: varcharemail :: tinytext
Pageid :: integertitle :: varcharauthor User
User(id(1),name(“John”),.....
)
Page(id(2),title(“Hello World”),[author(1)]
)
Remove Attribute (1)
Signature:User := Id * Name * Email
![Page 41: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/41.jpg)
Userid :: integername :: varcharemail :: tinytext
Pageid :: integertitle :: varcharauthor User
User(id(1),name(“John”),email(“[email protected]”)
)
Page(id(2),title(“Hello World”),[author(1)]
)
Remove Attribute (2)
![Page 42: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/42.jpg)
Userid :: integername :: varcharemail :: tinytext
Pageid :: integertitle :: varcharauthor User
User( 0,[
id(1),name(“John”),email(“[email protected]”)
])
Page( 1,[
id(2),title(“Hello World”),author(0)
])
Generic Aterm (GTerm)
![Page 43: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/43.jpg)
User( 0,[
id(1),name(“John”),email(“[email protected]”)
])
Page( 1,[
id(2),title(“Hello World”),author(0)
])
XMI
<user id='0'><id>1</id><name>John</name><email>[email protected]</email>
</user>
<page id='1'><id>2</id><title>Hello World</title><author>0</author>
</page>
![Page 44: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/44.jpg)
GTerm Characteristics
Explicit references
No nesting
Implicit sets/lists
Storage...
![Page 45: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/45.jpg)
GTerm Transformation
Gterm libraryObject creationModifying attributes
(add, remove, change, rename, ...)Object equivalenceObject traversals(Object graph traversals)
Data model libraryType examinationSuper/Sub type handlingAbstract type handling
![Page 46: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/46.jpg)
GTerm Storage
Large quantities of data...
Storage engine:In memory list based ~10KIn memory hash table based ~500KIn database ~25M ...
![Page 47: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/47.jpg)
User( 0,[
id(1),name(“John”),email(“[email protected]”)
])
Page( 1,[
id(2),title(“Hello World”),author(0)
])
GTerm Storage – In database (1)
0 User id 10 User name John0 User email [email protected] Page id 21 Page title Hello World1 Page author 0
0 User1 Page
![Page 48: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/48.jpg)
GTerm Storage – In database
CREATE TABLE Attributes (id varchar(16),type varchar(30),name varchar(30),value text,INDEX USING HASH (id (5)),INDEX USING BTREE (v(10))
)
CREATE TABLE Objects (id varchar(16),type varchar(30)
)
GTerm Storage – In database (2)
![Page 49: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/49.jpg)
GTerm Performance
Database indexes
Stratego memory usage
Parallel execution
![Page 50: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/50.jpg)
GTerm Storage – Regular database
0 User id 10 User name John0 User email [email protected] Page id 21 Page title Hello World1 Page author 0
User:1 John [email protected]
Page:2 Hello World
PageUser:2 1
![Page 51: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/51.jpg)
Old Database Generic Database
SQL Script
Data model
Migration (Stratego)
SQL Script
GTerm 2 SQL
New Database
![Page 52: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/52.jpg)
ResearchrDBLP
![Page 53: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/53.jpg)
<dblp><incollection mdate="20020103" key="books/acm/kim95/AnnevelinkACFHK95">
<author>Jurgen Annevelink</author><author>Rafiul Ahad</author><author>Amelia Carlson</author><author>Daniel H. Fishman</author><author>Michael L. Heytens</author><author>William Kent</author><title>Object SQL A Language for the Design and
Implementation of Object Databases.</title><pages>4268</pages><year>1995</year><booktitle>Modern Database Systems</booktitle><url>db/books/collections/kim95.html#AnnevelinkACFHK95</url><crossref>books/crc/KIM95</crossref>
</incollection>
....</dblp>
![Page 54: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/54.jpg)
article {key : stringtitle : string *author : string *editor : string *booktitle : string *pages : string *address : string *journal : string *volume : string *number : string *publisher : string *crossref : string *series : string *school : string *chapter : string *month : string *year : string *url : string *note : string *mdate : string *cite : string *ee : string *cdrom : string *isbn : string *
}
book {key : stringtitle : string *author : string *editor : string *booktitle : string *pages : string *address : string *journal : string *volume : string *number : string *publisher : string *crossref : string *series : string *school : string *chapter : string *month : string *year : string *url : string *note : string *mdate : string *cite : string *ee : string *cdrom : string *isbn : string *
}
....
![Page 55: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/55.jpg)
~ 800,000 Authors
~ 1,200,000 Publications
~ 14,000,000 Lines of XML
~ 16,000,000 Database records
DBLP Data
![Page 56: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/56.jpg)
Publication {key : string Uniquetitle : stringauthors - Author + Indmonth : stringyear : stringdblpUrl : string ?doi : stringlinks - Link *abstract : stringnote : stringannote : stringmodified : datemodifiers - User *cites - Publication *ee : string ?isbn : stringissn : stringconflicts : bool
}
abstract PrintPublication - Publication {
pages : stringpublisher : string ?firstpage : intlastpage : int ?
}
Article - PrintPublication {journalname : stringvolumenumber: stringissuenumber : string
}
Alias {name : string Unique
}
AbstractAuthor {alias - Alias
}
![Page 57: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/57.jpg)
Load objects into database
9 Stages of migration
Generate SQL
Migration Approach
![Page 58: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/58.jpg)
BridgingMeta levels
![Page 59: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/59.jpg)
![Page 60: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/60.jpg)
article - PrintPublication {reviewid : string ?rating : string ?journal : string ?volume : string ?number : string ?
}
Article - PrintPublication {reviewid : string ?rating : string ?journal : string ?volume : string ?number : string ?
}
renameType(|oldType, newName)
?Transformation(path, Substitution(newName), _)
UPDATE At SET t=newName WHERE t = ...;
![Page 61: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/61.jpg)
Proceedings - Collection {booktitle : string ?
}
Proceedings - Collection {conference : string ?
}
renameAtt(|oldName, newName, type, dmodel)
?Transformation(path, Substitution(newName), _)
UPDATE At SET n = newName WHERE n = oldNameAND t = <getSubTypeQuery(|dmodel)> type;
![Page 62: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/62.jpg)
abstract Thesis - Publication {school : string
}
abstract Thesis - Publication {school : stringtype : string ?
}
...
?Transformation(path, Addition(Att(Name(attName), PrimType(_), annotations)),_);<getAttAnn(|"MinCard")> annotations; ?0
...
![Page 63: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/63.jpg)
abstract Thesis - Publication {school : string
}
abstract Thesis - Publication {school : stringtype : string
}
<addDefaultAttributesToType(|type, <makeint> low, attName, attType, mmodel
)> model;
?Transformation(path, Addition(Att(Name(attName), PrimType(_), annotations)),_
);<getAttAnn(|"MinCard")> annotations; ?low
onType(addDefaultAttributes(|type, nr, attName, attType)
| type, mmodel)
![Page 64: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/64.jpg)
1. find objects of type
2. divide into chunks
3. per chunk in parallel
Load objects in chunkper object
ssave object if changed
onType
![Page 65: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/65.jpg)
Publication {key : string Uniquetitle : string ?authors : string + Indexedyear : string...
}
?Transformation(path, Substitution(DeclType(Name(newTypeName))), _)...Author alias mandatoryAuthor alias not unique
Publication {key : string Uniquetitle : string ?authors - Author + Indexedyear : string...
}
Author {alias : string
}
onType(for each author
create author objectset author attribute
)
![Page 66: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/66.jpg)
Author {alias : string
}
?Transformation(path, Substitution(DeclType(Name(newTypeName))), _)...Alias name mandatoryAlias name unique
Author {alias : Alias
}
Alias {name : string Unique
onType(if alias exists then
set alias attribute to existing idelse
create alias objectset alias attribute to new id
)
![Page 67: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/67.jpg)
IdentityPrimitive attribute addition (3)Complex attribute additionAttribute removalAttribute name changeAttribute move (2)Primitive type changeImplicit reference resolutionAttribute wrappingType additionType removalType name changeAbstract type handlingInverse annotation handling (2)Cardinality changes (2)
Supported transformations
![Page 68: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/68.jpg)
Easy to define Hard to define
Easy to optimize No need to optimize
Expressive Limited expressiveness
Easy to abstract Abstraction near impossible
Performance OK Performance great
In memory vs. Database transformations
![Page 69: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/69.jpg)
DetectingEvolution
![Page 70: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/70.jpg)
![Page 71: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/71.jpg)
article - PrintPublication {reviewid : string ?rating : string ?journal : string ?volume : string ?number : string ?
}
Article - PrintPublication {reviewid : string ?rating : string ?journal : string ?volume : string ?number : string ?
}
diff?
![Page 72: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/72.jpg)
![Page 73: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/73.jpg)
article - PrintPublication {reviewid : string ?rating : string ?journal : string ?volume : string ?number : string ?
}
Article - PrintPublication {reviewid : string ?rating : string ?journal : string ?volume : string ?number : string ?
}
Entity(Name(“article”),Name(“PrintPublication”),[
Att(Name(“reviewid”),PrimType(
Name(“string”)),[
MinCard(0),MaxCard(1)
]),...
])
Entity(Name(“Article”),Name(“PrintPublication”),[
Att(Name(“reviewid”),PrimType(
Name(“string”)),[
MinCard(0),MaxCard(1)
]),...
])
![Page 74: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/74.jpg)
article - PrintPublication {reviewid : string ?rating : string ?journal : string ?volume : string ?number : string ?
}
Article - PrintPublication {reviewid : string ?rating : string ?journal : string ?volume : string ?number : string ?
}
Entity(Name(“article”),Name(“PrintPublication”),[
Att(Name(“reviewid”),PrimType(
Name(“string”)),[
MinCard(0),MaxCard(1)
]),...
])
Entity(Name(“Article”),Name(“PrintPublication”),[
Att(Name(“reviewid”),PrimType(
Name(“string”)),[
MinCard(0),MaxCard(1)
]),...
])
diff?
![Page 75: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/75.jpg)
article - PrintPublication {reviewid : string ?rating : string ?journal : string ?volume : string ?number : string ?
}
Article - PrintPublication {reviewid : string ?rating : string ?journal : string ?volume : string ?number : string ?
}
Removed type article; Added type Article
Added type article; Removed type Article
Substituted article name with Article
What happened?
![Page 76: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/76.jpg)
Article - PrintPublication {reviewid : string ?rating : string ?journal : string ?volume : string ?number : string
}
Article - PrintPublication {reviewid : string ?rate : stringjournal : string ?volume : string ?nr : string ?
}
renamed rating; renamed number;changed rating cardinality; changed number cardinality
What happened?
![Page 77: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/77.jpg)
Article - PrintPublication {reviewid : string ?rating : string ?journal : string ?volume : string ?number : string
}
Article - PrintPublication {reviewid : string ?rate : stringjournal : string ?volume : string ?nr : string ?
}
renamed rating; renamed number;changed rating cardinality; changed number cardinality
swapped rating and number; renamed rating; renamed number
What happened?
![Page 78: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/78.jpg)
Article - PrintPublication {reviewid : string ?rating : string ?journal : string ?volume : string ?number : string
}
Article - PrintPublication {reviewid : string ?rate : stringjournal : string ?volume : string ?nr : string ?
}
renamed rating; renamed number;changed rating cardinality; changed number cardinality
swapped rating and number; renamed rating; renamed number
deleted Article; added Article
What happened?
![Page 79: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/79.jpg)
Addition: 0.8 * relativeSize4
Removal: 0.5 * relativeSize4
Substitution 0.4 * relativeSize6
Weighing transformations
Custom weights:Type removalType substitution (0)Attribute substitution (0)
![Page 80: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/80.jpg)
On both versions at the same time
Bound on weightIncreasing bound
Weight computation caching
Try them all!
![Page 81: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/81.jpg)
![Page 82: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/82.jpg)
HeterogeneousCoupled Evolution
![Page 83: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/83.jpg)
![Page 84: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/84.jpg)
![Page 85: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/85.jpg)
![Page 86: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/86.jpg)
Horizontal Generalization
![Page 87: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/87.jpg)
Username :: varcharrealName :: varcharemail :: tinytext
Pagetitle :: varcharauthor UserisRedirect :: boolean
Entities
Properties
Types
Meta model / Grammar
![Page 88: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/88.jpg)
![Page 89: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/89.jpg)
Lists
More types
Inverse associations
Abstract types
![Page 90: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/90.jpg)
Vertical Generalization
![Page 91: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/91.jpg)
Heterogeneous Coupled Evolution
ofSoftware Languages
![Page 92: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/92.jpg)
The ingredients
Software Language Definition Formalism
EvolvingSoftware Language
Software
![Page 93: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/93.jpg)
DiverseEvolution
What did we generalize?
Why did we generalize?
![Page 94: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/94.jpg)
A GenericArchitecture
![Page 95: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/95.jpg)
![Page 96: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/96.jpg)
![Page 97: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/97.jpg)
![Page 98: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/98.jpg)
Input
Coupled evolution scenario
Mapping from Mi to Mi+1
![Page 99: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/99.jpg)
Output
Domain Specific Transformation Language
(DSTL)
Transformation Interpreter
Software Migration
![Page 100: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/100.jpg)
Stratego
SDF SDF
![Page 101: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/101.jpg)
Entity* > DataM ModelId "{" Prop* "}" > Entity EntityId "::" Type > Prop Prop"int" > Type Int"bool" > Type BoolId > Type "set of" Type > Type SetNAME > Id Id
![Page 102: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/102.jpg)
Entity* > DataM Model
Lists
"add" Entity > LocalTransformation"remove" > LocalTransformation
[...]
![Page 103: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/103.jpg)
NAME > Id Id
Lexicals
"substitute" NAME > LocalTransformation
''...''
![Page 104: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/104.jpg)
"int" > Type Int"bool" > Type BoolId > Type "set of" Type > Type Set
Multiple productions
"substitute" Type > LocalTransformation
>*
![Page 105: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/105.jpg)
"at" APath LocalTransformation > Transformation
Type checking
Generation of local transformation domainsAPath type derivation
Type checking
.../...
![Page 106: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/106.jpg)
Transform
Constant
Larger grammars
![Page 107: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/107.jpg)
![Page 108: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/108.jpg)
Interpreter generation
Transformations library
Generic DSTL constructs
APath evaluation
![Page 109: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/109.jpg)
A GenericArchitecture
![Page 110: Model Driven Software Development - Data Model Evolution](https://reader037.vdocuments.mx/reader037/viewer/2022100214/54b790244a7959d7418b4646/html5/thumbnails/110.jpg)
Software Language Evolution
This research was supported by NWO/JACQUARD project638.001.610, MoDSE: ModelDriven Software Evolution.