Relational Database Structure and Operations Engineering Using Class Diagram and Activity Diagram
Relational Database Structure and Operations Engineering Using Class Diagram and Activity Diagram
Relational Database Structure and Operations Engineering Using Class Diagram and Activity Diagram
Abstract— Software system plays an important role especially as XMI file. The pre-processing module parses XMI file based
for processing large amounts of data. Currently, the operation of on certain tags according to the object want to build
a data is mostly done on the application layer, so the DBMS only
serves to store data processing results. Data processing on the CIM layer will be used to define entity entities and
DBMS layer will result in better performance, as it is closer to processes that exist in the database schema, at this layer, detail
the physical data. Application of constraints as well as data of how a process will be run has not been defined. The diagram
access rights at the DBMS level will apply consistently to the used in the CIM layer is the class diagram.
system as a whole so as to maintain data integrity. In this
The PIM layer will be used to build an activity diagram
research, UML-based approach is proposed to map the structure
and operation in a domain model into the structure and object that contains a detailed representation of an operation in
operation of relational database. A software will be built using a a class diagram. PSM layer will be to define rules for
driven architecture model (MDA) to automate the transforming the model that has been generated on the PIM
transformation from UML to SQL script. Class diagrams that layer. In this research, the model generated from the PIM layer
describe the domain structure of the model will be mapped into will be transformed into a MySQL script.
the table structure on the relational database, while the Activity
diagram that describes the behavioral aspects of a domain model I. RELATED WORK
will be mapped into procedure and function. It is expected that
this research can simplify the process of database schema
development, increase data processing speed and maintain data Various works in the field of UML to relational data modeling
integrity. have been conducted during the last few years using various
techniques. However, almost all of the previous research focus
Keywords; UML Diagram, Model Driven Architecture, on static schema; none of them discuss about operations at
Relational database , Code Generator database layer.
INTRODUCTION Pavkovic and Brdjanin [1] discuss a method for forward
engineering of SQLite database. This research proposed an
Software is built to provide an interface that allows users to approach based on the standart UML Notation for conceptual
perform operations into the database system. So there must be
modelling and for representation of the target relational
compatibility between software design and database design.
database schema.
The current software is mostly built using an object-oriented
programming language modeled using UML diagrams, but on Yang [2] proposed a database modeling method on Enterprise
the other hand the DBMS used is a relational model. The Management Information System (MIS) using UML diagrams.
operation of a data is mostly done on the application layer so This research discusses how to model the database structure,
that the DBMS only serves to store the data processing results. especially how to manage the complexity of relationships
According to Andersuu and Mircea [4], data processing on the between tables. This research does not discuss how to map
DBMS layer will result in better performance, as it is closer to operations on a database.
the physical data. Chih-Min Lo and Hsiu-Yen Hung [3] proposed adding
additional notation to UML diagrams to model the structure
This research proposed the use of DBMS, not only to store and retrieval of data in the database. The addition of new
the results of data processing, but also to handle the operation
notation to the UML diagram causes this approach not
of the data, as well as to control the operation of a data. It can
be done by building a software to transform UML diagrams necessarily acceptable to all parties. This research uses
into scripts that can run on the DBMS. sequence diagrams to model operations on the database.
Though sequnce diagram is more appropriate used to model
This research uses Model Driven Architecture (MDA) interaction between object, not detail of an operation
which consists of 3 layers: Computational Independent Model
(CIM), Platform Independent Model (PIM) and Platform
Specific Model (PSM) with input of XMI file that representing
UML diagram. UML modelling is done using papyrus
extension on Eclipse IDE. The modeling results are then stored
II. UML DIAGRAM METAMODEL UMLComponent
UMLComponent UMLRelation
UMLAttribute UMLOperation
Action A
Action B
Tag <node> will be parsed to find control nodes and action Action B
nodes in the XMI file. The data stored in the <node> tag is
used to build control node object. Control nodes and Action
nodes have been built are not equipped with execution Figure 7. Decision block mapping result
sequence. In XMI files, the execution sequence is stored in the
<edge> tag. The result of parsing the <edge> tag will be
represented in Node List. A Relation object will be formed for
each node that be found. The Relation will control exection
sequence of action node.
Action A Action A
False
IF A < 5 THEN
IF C < 5 THEN C<5
SET B=True True
ELSE
SETB= False
ENDIF False
ELSE
SET B= False A<5
ENDIF True
Action B
SET A+=1
Figure 9. Final result of decision block mapping
Activity diagram does not provide a special notation for Figure 12 shows the final result of nested loop processing. An
looping block. A loop can be formed when the process flow action node will be formed in place of the looping block. The
from a decision node block returns to the beginning of the program code representing the previously processed decision
decision node again after running some processes. As shown node will be inserted in the body of the action node.
in figure 10 , the process flow on the red arrow returns to the
beginning of the decision node after running some processes, Action A
therefore the activity block is detected as looping.
Action B
SET B+= B
V. EVALUATION
Action B
Tests is conducted on two applications namely library
Figure 10. Looping block information system and academic information system
developed by JIBAS (Jaringan Informasi Bersama Sekolah).
Figure 11 show an example of nested loop. The deepest The following table is the specification of each information
looping block will be converted to be an action node with system used.
looping seouce code within its body. The process then
continued to next deepest looping node. The process is ended Table I. Testing environment spesifications
when all of looping block have been converted to be action
node. System under test