A UML-based approach to reverse engineering of ...

33 downloads 0 Views 215KB Size Report
November 2017. reverse engineering of relational databases. Dragana Vukovic(1), Drazen Brdjanin(2) , Slavko Maric(3). LANACO(1), University of Banja Luka, ...
25th Telecommunications Forum TELFOR 2017 Belgrade, 21-22. November 2017.

A UML-based approach to reverse engineering of relational databases

Dragana Vukovic(1), Drazen Brdjanin(2) , Slavko Maric(3) LANACO(1), University of Banja Luka, Bosnia & Herzegovina(2)(3)

Presentation outline • • • • • •

Motivation Related work UML-based RDBS representation Implemented tool Reverse engineering example Conclusion and future work

Vukovic, Brdjanin, Maric: A UML-based approach to reverse engineering of relational databases

1

Motivation

• Automatic RDBS extraction and its visualization by the standard UML diagram • Using standard UML notation for database modeling

Vukovic, Brdjanin, Maric: A UML-based approach to reverse engineering of relational databases

2

Related work • Extracting and visualization of the RDBS • Various approaches, techniques and notations

Vukovic, Brdjanin, Maric: A UML-based approach to reverse engineering of relational databases

3

Related work Object-oriented IFO2 model (Soutou) Object relationship model (Embley, Xu) Object Modelling Technique (Premerlani, Blaha) ER-based RDBS representation (Mfourga, Markowitz, Makowsky) • Different UML profiles (Naiburg, Maksimchuk, Ambler, Marcos) • • • •

Vukovic, Brdjanin, Maric: A UML-based approach to reverse engineering of relational databases

4

UML-based RDBS representation • All RDBS elements are represented by the standard UML notation package SchemaName Schema package DataTypes Data types Tables

package Tables

Views package Views

Vukovic, Brdjanin, Maric: A UML-based approach to reverse engineering of relational databases

5

UML-based RDBS representation – Representation of primary keys Example1 att1 : type PK(attr1 : type)

– Representation of foreign keys
Example1 att1 : type PK(attr1 : type)

Example2 att2 : type att1 : type PK(attr2 : type) FK_Example1(att1 : type)

Vukovic, Brdjanin, Maric: A UML-based approach to reverse engineering of relational databases

6

UML-based RDBS representation – Representation of complex keys – Several foreign keys referenced
Example1 to the same table?

att1 : type att2 : type PK(attr1 : type, attr2:type)

– Representation of multiple foreign keys

Example3

att1:type1 att2:type2

FK_Example2_attr1(attr1:type) FK_Example2_attr2(attr2:type)

Example2 att1:type1 att2:type2 att3:type3 PK (attr3 : type) FK_Example1(attr1:type, attr2:type) FK_Example(attr3:type)

Vukovic, Brdjanin, Maric: A UML-based approach to reverse engineering of relational databases

7

UML-based RDBS representation – Representation of views viewExample + att1 : type + att2 : type + att4 : type att4(Example2.attr3 : type)

Example1 att1 : type PK(attr1 : type)

Example2 att2 : type + att3 : type PK(attr2 : type)

Vukovic, Brdjanin, Maric: A UML-based approach to reverse engineering of relational databases

8

UML-based RDBS representation

– Referential integrity DDL script – constraint of the operation that corresponds to the foreign key ON DELETE RESTRICT ON UPDATE CASCADE

Vukovic, Brdjanin, Maric: A UML-based approach to reverse engineering of relational databases

9

Implemented tool •Eclipse (Topcased) plugin

• GUI

• RDBS extractor • UML generator

Vukovic, Brdjanin, Maric: A UML-based approach to reverse engineering of relational databases

10

Reverse engineering example - Simple MS SQL relational database schema

Vukovic, Brdjanin, Maric: A UML-based approach to reverse engineering of relational databases

11

Reverse engineering example - Automatically generated UML schema

Vukovic, Brdjanin, Maric: A UML-based approach to reverse engineering of relational databases

12

Conclusion • Automatic reverse engineering completely based on standard UML notation and open source tools • Representation and visualization of the relational database schema directly in the tool providing UML modelling capability • Intuitive way of presenting UML notation • Easier and more efficient reverse engineering

Vukovic, Brdjanin, Maric: A UML-based approach to reverse engineering of relational databases

13

Future work

• Representation of other RDBS-related concepts (indices, triggers, etc.) • Adding reverse engineering functionality of other DBMS’s (MySQL, Oracle SQL, PostgreSQL, etc.) to implemented tool • Better visualization

14

25th Telecommunications Forum TELFOR 2017 Belgrade, 21-22. November 2017.

Dragana Vukovic(1), Drazen Brdjanin(2) , Slavko Maric(3) LANACO(1), University of Banja Luka, Bosnia & Herzegovina(2)(3)

A UML-based approach to reverse engineering of relational databases

Thank you!