profit from (Schmoelzer et al., 2006) if or when
ABC components and client application run in
different address spaces.
Data Transfer Objects (Flower, 2002) is a design
pattern used whenever an entity gathers a group of
attributes that must be accessed in a swift way.
Accessing those attributes one by one through a
remote interface raises several disadvantages such as
the increase of the network traffic, latency is
increased, performance is negatively affected,
demand on server and client processing is increased.
Data Transfer Objects are tailored to address these
situations. They are organized in serializable classes
gathering the related attributes and forming a
composite value. An entire instance of the serialized
object is transferred from the server to the client.
This approach is quite similar to the previous
conveying the same disadvantages.
O/RM tools (Hibernate (Bauer and King, 2007),
TopLink (2011), LINQ (Erik et al., 2006)) are
powerful tools to integrate object-oriented
applications with relational databases. Their
extended functionalities are mostly used to build
persistent business tiers relying on object to
relational mapping techniques. They may also
support native queries, proprietary SQL language,
language extensions and other relevant tools to ease
programmers’ work. Their scope is too wide and
deeply diverges from the scope of this work.
Anyway, if required, ABC components may be
developed with and above O/RM frameworks. Their
services have to be coordinated, integrated and
wrapped by the architecture herein presented.
4 JDBC
One of the key requirements of ABC component is
the ability to execute any SQL statement, very
simple ones and very complex ones. Before this
requirement, the option for a database driver (DB
Driver) is a key issue. The choice fell upon low-
level APIs being Call Level Interfaces an important
candidate. Call Level Interfaces are considered
important options whenever performance and SQL
expressiveness are considered key issues (Cook and
Ibrahim, 2006). Call Level Interfaces provide
mechanisms to encode Select, Insert, Update and
Delete SQL expressions inside strings, easily
incorporating the power and the full expressiveness
of SQL. JDBC (Microsystems, 2008) and ODBC
(Microsoft, 2010) are two of the most relevant Call
Level Interfaces. We will explore JDBC as
representative of Call Level Interfaces. JDBC has
two main interfaces to manage the execution of SQL
statements: the Statement interface (Microsystems,
2010b) and the ResultSet interface (Microsystems,
2010a). The Statement interface is used to execute
SQL statements and to return the possible results
they produce (only for Select statements). The
returned results are managed by the ResultSet
interface. Loosely speaking, ResultSet interface
provides two orthogonal functionalies: scrollability
and updatability. Scrollability defines the ability to
scroll over the retuned relation from the database.
There are two possibilities: forward-only – in this
case cursors may only move forward one row at a
time; scrollable – in this case cursors may move in
any direction and jump several rows at a time.
Updatability defines the capacity to change the in-
memory data managed by the ResultSet interface
and therefore the content of the host database. There
are two possibilities: read-only – the content of the
ResultSet is read-only and, no changes are allowed;
updatable – changes may be performed over the in-
memory data (insert new rows, update current rows
and delete rows). These functionalities are defined at
instantiation time of the parent Statement (or
PreparedStatement) entity and will be incorporated
and made available in the ABC architecture.
5 ABC ARCHITECTURE
The main goal of this paper is to present a
component, known as ABC component, with the
ability to manage and execute a pool of SQL
statements on behalf of client applications. The pool
of SQL statements is dynamically updated in
runtime by an external authorized entity. From client
applications (CA) point of view ABC components
always play the role of server components. From
host database point of view ABC components
always play the role of client components. Figure 3
presents a possible deployment of database
applications relying on ABC components. The
communication between client applications and
ABC components are always through predefined
interfaces. The static architecture of ABC
components comprises three main blocks: Business
Manager (BM), Business Entities (BE) and the
Database Driver (DB Driver), as shown in Figure 4.
The DB Driver is the block responsible for
providing the required services to manage the
communication with a local or remote database
management system (DBMS).
AN ADAPTABLE BUSINESS COMPONENT BASED ON PRE-DEFINED BUSINESS INTERFACES
95