Re: Business Rules .. etc ...
Date: 2000/01/05
Message-ID: <8ef77s8etolsb81lkv0ami9slkd9ov5q25_at_4ax.com>#1/1
A copy of this was sent to "GM" <gravem_at_yahoo.com> (if that email address didn't require changing) On Wed, 05 Jan 2000 23:45:48 GMT, you wrote:
>I am wondering if anyone can help me answer this question I have...
>
>At work, we are setup such that our Oracle server runs on a UNIX box and the
>client machines are all on NT workstations (not too unusual). We are not
>doing any web based programming at all at the moment .. just client/server.
>What I want to do, is create some objects that handle the business rules.
>For example, if column X is null then column Y and Z can (or must) be empty
>... but ... if column X has a value, then columns Y and Z MUST have values
>(and only certain values).
>
use constraints when possible. for example, the above can be done as a table level constraint:
check ( ( x is NULL and y is NULL and z is NULL ) or ( x is not null and y in (some set...) and z in (some set...) ) )
does the rule if "if x is null then column Y and Z must be empty but if column X has a value, then columns Y and Z must have values in some set of valid values"
In other cases, triggers will be the way to go.
>What would be the easiest way to implement something like this? Most of our
>applications at the moment run on Powerbuilder applications ... some are
>done in Visual Basic ... and stored procedures are done (obviously) in
>PL/SQL. I do not want to use ODBC at all. Any help on this issue would be
>greatly appreciated!!
>
>Thanks!
>
>G.
>
-- See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'... Current article is "Part I of V, Autonomous Transactions" updated June 21'st Thomas Kyte tkyte_at_us.oracle.com Oracle Service Industries Reston, VA USA Opinions are mine and do not necessarily reflect those of Oracle CorporationReceived on Wed Jan 05 2000 - 00:00:00 CET