Databases Reference
In-Depth Information
series of SQL insert and update statements, all to carry out what,
to the business, is a single action for example, “Extend the start
date on policy P861 back to the beginning of the year”.
Query encapsulation is provided for both ad hoc queries and
production queries. Ad hoc queries, usually written by business
analysts and researchers who are not IT technical specialists,
may benefit from a rich set of views which hides much of the
temporal selection and join criteria that might otherwise be dif-
ficult for those authors to write. Production queries, written by
developers and DBAs, will generally not make use of views. But
because Asserted Versioning insures that all data being queried
already satisfies temporal entity integrity and temporal referen-
tial integrity constraints, it eliminates the need to filter out vio-
lations of those constraints from query result sets. In this way,
Asserted Versioning eliminates much of the complexity that
would otherwise have to be written into queries that directly
access asserted version tables. In this way, Asserted Versioning
provides as simple a target as possible for both ad hoc queries
and production queries and, in doing so, provides the query
encapsulation that assists both kinds of query authors.
Design Encapsulation
Data modeling is usually on a project's critical path. That's
because it is difficult to write code when you don't know what
the database is going to look like! Database schemas come first;
code comes after that.
The first thing the data modeler must do, with respect to tem-
poral data, is to get the temporal requirements right. This can
often be difficult because while IT and technically conversant
business people usually have developed a business/IT pidgin
that enables them to communicate clearly, there is no such pid-
gin for temporal requirements. But with Asserted Versioning,
and its extensive Glossary, the material for such a pidgin does
exist.
For example, technically conversant business people often
understand IT people when they say things like “No, you don't
really want a referential integrity relationship between sales-
persons and clients, because you want to be able to add a client
before you assign a salesperson to him and, for that matter,
be able to add a salesperson before you assign her a client”.
The modeler may be right or wrong; but both she and the busi-
ness lead on the project understand what she's saying.
Now think of trying to explain temporal referential integrity
with the language only of overlaps and gaps, and begin and
Search WWH ::




Custom Search