Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Help with SQL constraint

Re: Help with SQL constraint

From: <hasta_l3_at_hotmail.com>
Date: 15 Feb 2007 22:20:30 -0800
Message-ID: <1171606830.317583.103050@v45g2000cwv.googlegroups.com>


On 16 fév, 01:48, DA Morgan <damor..._at_psoug.org> wrote:
> dean wrote:
> > On Feb 15, 11:41 am, DA Morgan <damor..._at_psoug.org> wrote:
> >> Arto Viitanen wrote:
> >>> dean wrote:
> >>>> Hello all,
> >>>> A table T has 2 fields, one (L) holding letters 'Y' and 'N', and one
> >>>> (X) holding numbers. Is there a (non trigger)constraintsuch that for
> >>>> L='N' (and only this letter) the numbers must be unique? Records
> >>>> where L='Y' do not have to be unique.
> >>>> (I need to join another table to the L='N' group of records, and the
> >>>> join must be key-preserved).
>
> So, essentially, you want to NOT have unique data but convince Oracle,
> by some hocus-pocus magic trick, that the data is unique.
>
> As I presume you intend to put this into production there is no more
> help available from me. > YOYO. There is one and only one solution ...
> correctly model your business requirement.

I dont have the slightest idea of the OP requirements, Daniel, but consider this one :

You are monitoring N crossroads. On each crossroad, there is a sensor that detects whether a car is passing through (actually, we need four, but well... :-)

A sensor sends a message to the monitoring application whenever a car is seen.

You have to count and keep an history of the number of cars passing through each crossroad within period of times of - say - one hour. Traffic is very intense.

How would you model this ? Received on Fri Feb 16 2007 - 00:20:30 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US