.. I love it. I agree with all you
have said. I just would not characterize it as "two sides of an
argument." Both "sides" must spring from an environment of
understanding of the basic concepts. There are two main traps we fall
into:
1. Believing that someday we can reach the ideal
state of a perfect world. Your discourse is filled with those thoughts,
e.g., "no DBMS currently available..." (implying that one may be in
the future), "at this current state in time" (suggesting that there
may come a time), "no DBMS allows that just yet" (but perhaps a
future DBMS product might?), "right now it is impossible" (with the
implication that in the future it will be), "until a better DBMS is
created" (better yes, but never perfect or complete).
"Man" (which includes woman) is imperfect, and therefore, so are his
constructions, our DBMSs, our databases, our code, our systems. So try as
we might to improve (and we should), we must always be alert to imperfection,
weaknesses, failures, attacks, (whether inadvertent or deliberate, intentional)
and build in countermeasures. That is why we back up our data, build in
redundancy, and why every government (every locus of power) must have "her
majesty's loyal opposition" and the watchful eye of citizens and the
media.
2. We tend to use, to favor that which is more
familiar to us. If we are a programmer and that is what we know how to do,
we will get things done by writing code in our favorite programming
language. If we know how to use the full functionality of some DBMS, then
that is what we will do as much as we can. Some application coders need
to be stretched to consider an alternative way of doing things that might get
us closer to the ideal of serving people (management, organizations) AND
incorporating appropriate safeguards (which also will never be perfect).
.. The business rules and integrity constraints
are those mechanisms that can lead to higher quality data, greater user confidence
(in our databases, our systems, our IT departments, and our organizations), better
decisions, and more effective and efficient operation. As you rightly state,
ALL that happens in a computer system is done by executing code. But that
is only half the story. ALL that executing code is driven by
specifications, definitions, declarations, input parameters, in other words
"data" more broadly interpreted. Even the program code is the
specification of a process. The accuracy and completeness of the process
depends on the specifications, the directives, etc.
.. As I show in my lecture on Business Rules (slides
BRules.23 and .27), there is a hierarchy of levels where this information, the
business rules, can be expressed:
1. DBMS
2. Stored Procedures, whose execution is under
the control of the DBMS.
3. Code (methods) embedded (encapsulated) in
"objects" which execute in a well-managed and controlled environment
(OO, SOA, SaaS...)
4. User application code
5. External user actions (manual or sysadmin)
.. At all these levels the processes are driven
by definitions, specifications. The efficacy of those processes depends
on those specifications, and we (humans) understand those processes through
documentation which itself is usually quite imperfect.
.. Moving down these levels we encounter
decreasing levels of control and increased dispersion. I put DBMS at the
top, because that is the closest to the data and the most likely centralized
point of control (least dispersion). Our objective is (or should be) to
move these boundaries down so that work gets pushed up into more controlled
environments. Another thing that happens as we move through these levels
is increasing abstraction. When we declare database integrity
constraints, that is a specification (abstraction) of some underlying process
(executed by code... somewhere). We (humans) do not need to know what goes
on under the covers, we merely need to have confidence that it will be done
correctly and consistently, as reflected in the definition or
specification. For example, we may understand the meaning of the square
root operator, but how it gets executed on a computer is quite complex. I
want to be hidden from that complexity. When we write a program we call
all sorts of subroutines or functions, which are defined at a pretty high level
(of abstraction).
.. To the comment of "too bad we waited so
long": The focus of my course is data modeling. The subject of a
companion course would be DBMS and Database Administration. This issue we
are discussing would properly belong in the second course. However, I
raise the question here because the success of maintaining the integrity of our
databases according to our defined semantics depends upon the execution
environment, the DBMS ++.
.. Let the discussion continue.