Information Technology Reference
In-Depth Information
3.1 Base Type Satisfiability
Satisfiability (or liveliness) is a well known property of base entity and relationship
types. A base type is satisfiable (or lively) if it may have a non empty finite popu-
lation at certain time. In a conceptual schema, a base type is unsatisfiable when the
set of constraints defined in that schema can only be satisfied if the population of
that type is empty or infinite [
17]
. In conceptual modeling, it is usually required that
Let
T
i
be a base type (entity types, attributes and associations) defined in a con-
ceptual schema. The satisfiability of
T
i
can be checked by means of testing. The idea
is to set up a test case
TC
j
such that it:
•
builds a state of the IB having at least one instance of
T
i
, and
•
makes an assertion
TA
k
that can only
Pass
if the above IB state is consistent (that
is, it satisfies all constraints).
If the execution of
TA
k
gives the verdict
Pass
, then it is experimentally proved
that
T
i
is satisfiable. Note that in a single test case we can instantiate several types
and that a single assertion can experimentally prove that all of them are satisfiable.
In the test program of Fig.
3,
the fixture creates the customer
john
and the
session
s
. It also initializes the online catalog with the product
shirt
and the special
product
trousers
. The execution of any of the test cases of the test program exam-
ple implies the execution of this fixture and ensures that the entity types
Customer
,
Session
,
Product
and
Special
(and also their attributes) are satisfiable.
Moreover, the test case
confirmOrder
adds a shopping cart item with two
units of
shirt
and another item with a pair of
trousers
. The shopping cart is
created when adding the first item. By this way, the entity types
ShoppingCart
and
ShoppingCartItem
(and also their relationship types, including attributes)
are proved satisfiable. The relationship types
ShoppingCart-Session, Session-
Customer
and
Customer-ShoppingCart
are also satisfiable when the
LogIn
event
occurs (the session is assigned to a customer and the anonymous shopping cart
becomes the shopping cart of the customer of the session). The entity types
Order
and
OrderLine
(and their relationship types) become satisfiable when the
event
OrderConfirmation
occurs (the order and its order lines are created from
the shopping cart). Finally, the occurrence of the instance
ndp
of the domain
event type
NewDownloadableProduct
proves the satisfiability of the entity type
DownloadableProduct
.
If a conceptual schema includes a base type
T
i
that is unsatisfiable, then the
conceptual modeler will be unable to set up a test case that builds a state of the IB
with at least one instance of
T
i
, and an assertion that can only
Pass
if that state is
consistent. This is not formal proof that
T
i
is unsatisfiable, but in many practical
cases it provides a clue that helps to uncover a faulty constraint.
The association
Manages
is satisfiable if we do not take into account that
Manager
Search WWH ::
Custom Search