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

Home -> Community -> Usenet -> c.d.o.server -> data definition

data definition

From: Gavin Sim <schowe_at_singnet.com.sg>
Date: Sun, 15 Dec 2002 17:32:05 +0800
Message-ID: <athhn7$gde$1@reader01.singnet.com.sg>


Hi
Hope someone here is able to help me.

There is this particular questions which I am not sure how to go about doing it.

example
hotel(hotel_no, room_no, reg_type, datetime) room(room_no, room_describe)
registration(reg_type, days_stay, payment)

In my data definition how do I make a constraint in such a way that no room_no or hotel_no can have 2 different reg_type at the same time? I tried using Unique but still wrong.

constraint diff_hotel_time check (unique (hotel_no, room_no)  where count(*) datetime from hotel>1));

I know the above is wrong, i am unable to come out with a solution on how to match all the dates together so that they can be used for checking on the hotel_no and room_no.

Any help is greatly appreciated. Received on Sun Dec 15 2002 - 03:32:05 CST

Original text of this message

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