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 -> Re: delete from a view

Re: delete from a view

From: Frederic Houbie <fh_at_ionicsoft.comNOSPAAAAM>
Date: Thu, 29 Apr 2004 12:08:00 +0200
Message-Id: <pan.2004.04.29.10.07.57.682488@ionicsoft.comNOSPAAAAM>


On Thu, 29 Apr 2004 19:18:24 +1000, Howard J. Rogers wrote:

> Frederic Houbie wrote:
> 

>> On Wed, 28 Apr 2004 21:06:43 +0000, Brian Peasland wrote:
>>
>>
>>>>In fact, I have a Oracle Type T1 and several type that inherit T1. For
>>>>each child type, I have an oracle table of that type.
>>>>My view is a view that return T1 object and is the union of all the table
>>>>that are childs of t1, so, I'm sure that I have no duplicate row and key
>>>>(which are uuid so unique in the world) are unique. That's
>>>>the reason why I thought I could delete a row from that view.
>>>
>>>But you can't guarantee uniqueness between the base tables involved in
>>>the UNION ALL. What mechanism does the database have to guarantee that a
>>>record in TABLE1 is not also present in TABLE2? There isn't one
>>>(natively). But all of this makes no difference since you can't delete
>>>from a UNION ALL view.
>>>
>>>Cheers,
>>>Brian

>>
>> ID primary key are generated by my java application. It uses Global id
>> generation like urn:uuid:6ef7f826-2837-457a-bbf1-b963a9c85cd5 which use
>> MAC address of network card to generate the key. So, i'm sure that I do
>> not have two similar key in the database.
>>
>> Fred
>>
> 
> You've missed Brian's point. *You* know the things are unique, but how 
> is the *database* supposed to know that? In the general case, it cannot 
> possibly. Hence the rule: no deleting from a union all view.
> 
> Regards
> HJR


Of course, that's why I wanted to know if there is a way to tell the database that column X in the view is a primary key

Regards

Fred Received on Thu Apr 29 2004 - 05:08:00 CDT

Original text of this message

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