On Sat, 26 Jun 2004 22:30:02 GMT, "Albert D. Kallal"
Post by Albert D. Kallal
They also choose NOT to enforce RI, and the relationships window does NOT
show any relations. I not sure why this is so, but it does NOT make sense as
a general course of development. I would love to hear the reasons behind
leaving out such a important detail, and some good designed commercial
products based on the ms-access database do NOT have relationships setup, or
any RI enforced.
First of all, I always enforce RI via JET, regardless of where I place
other validation/business rules.
But, I have discussed this issue of where to place
RI/validation/business rules in database applications, and there is
some logic for taking RI out of the database and placing it in a
middle-tier or the front-end piece of the application.
Performance - you may want to detect an RI error prior to hitting the
database with a save/update/deletion.
Redundancy - you may not want to have RI rules duplicate in both the
database and the front-end/middle-tier. Therefore performance plus
eliminating rdundancy may push you to take the RI out of the database.
Consistency - you may want all the RI/validation/business rules
located together. I believe that it is better to push such rules
closer to the database (e.g. use stored procedures, triggers), but
performance and transportability may dictate pushng such rules out of
Transportability - using the database to only store data/indexes makes
it easier to move to other databases. Also, if the data and business
rules are combined in the server, there is an issue of upgrading the
business rules, and providing your customers access to the database.
OOP - base on my limited discussions with OOP developers, and my more
limited understanding of OOP, it appears that many of the business
rules that would be captured in the classes (e.g. properties and
methods) would be duplicated in the database (triggers and
procedures). This would be redundant and lead to maintenance and
This is my best shot of defending a practice that I don't participate
However, there is one application that I may work on whereby there are
significant "on-the-fly" calculations required. It may be better to
read all the data into arrays, and work off the arrays. Data may then
be save to the server using whatever data engine the client wants,
from ASCII to SQL Server. In this case, putting RI or any other rules
in the database would be useless. However, I doubt that I would use
Access to write this application, but I may store the data in MSDE or
JET to enable the client to pull off data, as required.
Steven R. Zuch, CPA
Cogent Management Inc.