Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: You have my sympathies
Whilst I am a strong believer in
database-enforced integrity, I
would like to throw out the following
thought;
In the current Nirvana of 3-tier architecture we have as the three layer of the system (adjust names to suit your favourite terminology)
presentation
business rules
data server
Now, the fact that an order can only be
placed by an existing customer is a
business rule, is the responsibility
of the middle tier. Therefore, by putting in
a foreign key referential integrity constraint
on the database between ORDERS
and CUSTOMERS you are pushing
business rules down into the data server
and introducing a conflict of interest in
the system.
(My personal theory on this one is that
theory is grand, but belts and braces means
you don't lose your trousers).
-- Jonathan Lewis Yet another Oracle-related web site: http://www.jlcomp.demon.co.uk Steven Hauser wrote in message <8amk31$18s$1_at_garnet.tc.umn.edu>...Received on Wed Mar 15 2000 - 00:00:00 CST
>So there are several points here.
>
>One is that constraints enforced by primary and foreign keys are
>faster, better, stronger than triggers or procedures.
>
>Another is that any real DBA does not want a programmer whaling away
>on a data model that has no enforced constraints.
>
>HEH.
>--
>---------------------------------------------------------
>Steven Hauser
>email: hause011@tc.umn.edu URL: http://www.tc.umn.edu/~hause011
>---------------------------------------------------------
![]() |
![]() |