High cost of change has to do with evolution.
Over its lifecycle an ERP system will go through a
number of changes. If these changes affect internal
data organization most probably all data services that
work with affected data structures will need revision.
In the worst case a subset of data service operations
may become irrelevant and require full substitution.
Revising these operations is costly. The situation ex-
acerbates if changes to service operations make their
new versions incompatible to previous ones. This im-
plies failures in ECAs that already consume previ-
ous versions. The SQL against views approach has
less cost of change. A set of views that map the
old schema to the new one localizes changes on the
database level and does not require the revision of all
outstanding ECAs.
As one can see both approaches have advantages
and disadvantages. SQL as a data access API gives
great flexibility by allowing to construct queries that
match the granularity of a user’s information needs.
However, SQL exposes too much control over the
database, circumvents business logic rules and binds
ECAs to a specific implementation platform. The data
as a service approach on the other hand enforces busi-
ness rules by exposing a set of Web operations which
encapsulate data access and hide data organization.
However, the granularity of the exposed operations
does not match that of a user’s needs, which creates
inflexibility and hits performance. Furthermore, data
as a service approach has high cost of changes.
2.2 Business Object Query Language
In this subsection we contribute with an idea of
how to combine the advantages of discussed ap-
proaches while eliminating their disadvantages and
propose a concept called business object query lan-
guage (BOQL).
It is clear that accessing raw data directly and
circumventing business logic contradicts with data
encapsulation. For this reason business objects ap-
peared. They fully control the access to the data and
protect the integrity of data. From external perspec-
tive business objects are simply a collection of seman-
tically related data, e.g. invoice, bill of material, pur-
chase order, and a number of business operations that
can be performed on the data, e.g. read, create, etc. A
business object can be represented as set of data fields
or attributes, e.g. id, count, name, and associations or
links with other business objects, e.g. a SalesOrder
is associated with a Customer and Product business
objects.
Despite the diverse semantics of business objects
they all have the same structure (an array of attributes
and associations) and behavior (a set of operations).
The most basic set of operations a business object
supports is known as CRUD - Create, Retrieve, Up-
date, Delete. Although too generic, this set of op-
erations has an advantage that any business object
can support it. Therefore, all business objects can
be derived from the same base class featuring the
mentioned arrays (of attributes and associations) and
CRUD-operations. Such uniform behavior and struc-
ture allow to introduce a query language for business
objects very much like SQL for relational entities. We
propose the following scenario:
1. A programmer composes a query, the description
of what to retrieve from the system, according to
some SQL-like grammar and sends the query as
a string to the system via a generic service opera-
tion, for example ExecuteQuery.
2. The system parses the string to detect present
clauses (from, select, where, etc.) and builds a
query tree - an internal representation of the query.
The tree is then passed for further processing to
a query execution runtime, very much like in a
DBMS).
3. Using the from clause the runtime obtains refer-
ences to the business objects from which the re-
trieval must be performed: source business ob-
jects. Then the runtime traverses the query tree
in a specific order and converts recognized query
tokens to appropriate operation calls on the source
business objects. For example, tokens from select
clause are converted to Retrieve or RetrieveByAs-
sociationChain operations, while tokens from up-
date clause are converted to Update operations.
4. Having constructed the call sequence, the runtime
binds corresponding string tokens to the input pa-
rameters of CRUD-operations. For example, the
token Customer.Name of the select clause is inter-
preted as a call to Retrieve operation with the in-
put parameter value ”Name” on the business ob-
ject Customer. Now everything is ready to per-
form the calls of CRUD-operation in the on-the-
fly constructed sequence. The last step the run-
time performs is the composition of result set. Af-
ter that the result is formatted in XML and sent
back to the calling programm.
In its essence the query language performs orches-
tration of calls to objects’ operations based on user-
defined queries. These queries are transformed to
a sequence of operation calls that yield the required
data. Business object query language has an advan-
tage of supporting fine-grained queries as in the case
of SQL without circumventing business rules as in
the case of the data as a service approach. Such an
ICEIS 2010 - 12th International Conference on Enterprise Information Systems
98