management represents a way of realizing a particu-
lar and important type of application exploration. Be-
side, the conceptual schemas of the databases provide
a domain model nearest to the applications model do-
main. Unfortunately conceptual schemas represent a
rare resource within organizations,and in particular in
large organizations with different and large informa-
tion sources, including not only relational databases.
Motivations for such a rarity depends on different fac-
tors: age difference between the deployment of vari-
ous legacy systems, lack of design skills and capabil-
ities in developers, time-to-market issues leading to
a poor attention to the design phase, major focus on
applications and relevance of what we can call trans-
action script (Fowler, 2002) attitude, etc.
Exploiting patterns like Domain Model and Data
Mapper it is possible to represent data in the object
oriented way, using objects for representing data en-
tities. These patterns are the glue between software
and data in object oriented systems. We argue that the
identification of these patterns shows the link between
the object model and the conceptual entities, walking
through their associations to the physical data objects
(i.e. relational tables, XML entities). In this way it is
possible to infer the knowledge gained about the data
and transfer it to the application, or vice-versa.
3 DESIGN PATTERN
DETECTION FOR DRE
The development of an enterprise system is a very
complex task; for this reason software engineers de-
cide to use architectural patterns for the design phase.
In the literature several architectural patterns have
been proposed (Fowler, 2002) and in particular there
are some architectural patterns designed for the inter-
action between the application and persistent data.
In this kind of applications the most common view
is the Data-centered view (Avgeriou and Zdun, 2005)
that sees the system as a persistent, shared data store
that is accessed and modified by a certain number of
elements. In this view we can find at least three archi-
tectural patterns: Shared Repository, Active Reposi-
tory and Blackboard.
The identification of this kind of patterns allowsus
to identify the link between the application and per-
sistent data and through it we can increase the knowl-
edge on both the application and the persistent data.
A well-known and widely used Enterprise De-
sign Pattern has been proposed as a specialization of
the Shared Repository architectural pattern, and it is
very interesting in the Reverse Engineering phase: the
Data Access Object Pattern (DAO) (Alur et al., 2001).
It is defined as a way to abstract and encapsulate all
access to the data source. It manages the connection
with the data source to obtain and store data.
If engineers know about the presence and the lo-
cation of that pattern instance, he can directly know
the connected domain entity (business object). The
identification of the pattern instances is not very com-
plex because DAO patterns are often organized using
a Factory Method or Abstract Factory design pattern,
so they belong to well-organized structures and look-
ing at factories it is possible to know all of them.
In the context of data-oriented patterns other pat-
terns have been proposed, for example in (Fowler,
2002), the author addresses many type of problem and
defines a set of patterns which are currently used in
many widely adopted persistence layer frameworks.
The identification of those framework instances can
be a good hint about the identification and manage-
ment of persistent entities; in addition a deeper analy-
sis can also reveal which type of technology has been
used in order to implement the persistence layer.
4 THE UNIFIED APPROACH
The detection of data-related patterns or frameworks
(see Section 3) in the application can lead to the iden-
tification of the domain model entities, looking at the
upper application layer, and to the connection of each
of those entities to the underlying relational table/s (in
the case of a relational database physical data layer).
Combining the gained knowledge carried out with
data reverse engineering techniques (seee Section 2),
that abstracts a relational database to a conceptual
schema, it is possible to associate conceptual data en-
tities to the object model entities, putting together the
knowledge about the two separated layers. A conse-
quence of these merging is for example the transfer
of the abstraction hierarchy defined on schemas to the
domain model, permitting an higher-level view of the
model itself. More generally this approach will bring
us towards an integrated view of application entities
and data entities, and their interdependencies. An ex-
ample of the approach is represented in Figure 1, that
shows how the entity e5 is recognized to be associ-
ated to the domain object do5, because they are both
associated to table t4.
In this Section we discuss the steps of the pro-
posed unified approach. Considering the information
system of an hypothetical organization, the starting
input are (i) the available classes (software perspec-
tive), and (ii) the legacy database(s) (data perspec-
tive). Data and Software Reverse Engineering look
for similar concepts in data and software schemas, in
UNIFYING SOFTWARE AND DATA REVERSE ENGINEERING - A Pattern based Approach
209