RE: REFERENCEing a system table

  • From: "Mercadante, Thomas F (LABOR)" <Thomas.Mercadante@xxxxxxxxxxxxxxxxx>
  • To: <ldutra@xxxxxxxxxxxxx>, <oracle-l@xxxxxxxxxxxxx>
  • Date: Mon, 8 Aug 2005 11:08:50 -0400

Leandro,

In my opinion, it is a very bad idea to create local objects and relate them to 
sys objects.  A very basic rule of thumb is that Oracle can and will change 
anything in the SYS schema at their own pace and time.  This leaves us with the 
opportunity to constantly update any objects that we create that may reference 
these SYS objects.  

So I would say that your idea is a bad one.

And yes, Oracle does generally not put constraints on their internal tables.  
These things are tuned in their own way.  So Oracle does not feel the need to 
follow the rules that they tell us to follow.

FYI - the TS$ tables *does* have a unique index on the NAME column (at least in 
9.2).

Hope this helps.

Tom

-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On 
Behalf Of Leandro Guimaraes Faria C. Dutra
Sent: Monday, August 08, 2005 10:30 AM
To: oracle-l@xxxxxxxxxxxxx
Subject: REFERENCEing a system table


        I just mentioned it in another message, but I thought it would be
nice to ask if there is a way out -- until now I've been assumed it is
just an arbitrary restriction coupled to an Oracle modelling defect and
have let the issue to rest.

        All of you are familiar with DBA_TABLESPACES, and know that it is
based on SYS.TS$.  I want to store historical data from
DBA_TABLESPACE_USAGE_METRICS, and I would like to avoid letting garbage in
it by a CONSTRAINT REFERENCES on TABLESPACE_NAME.

        The problem is that view constraints can't be enabled, and a
CONSTRAINT REFERENCES needs an enabled constraint to be itself enabled;
and on the other hand TS$ doesn't have a primary key, and I don't really
want to ALTER it, it being internal.

        Should I just forget my CONSTRAINT REFERENCES ENABLE?  It will be
quite harmless to leave it DISABLEd anyway, I guess...

        By the way, it seems quite strange to me that Oracle itself
doesn't declare PRIMARY KEYs on its internal tables.


--
Leandro Guimarães Faria Corcete DUTRA
Administrador de Bases de Dados      +55 (11) 4390 5383
Toyota do Brasil Ltda              ldutra@xxxxxxxxxxxxx
São Bernardo do Campo, SP                        BRASIL


This message (including any attachments) is confidential and may be privileged 
and intended solely for the use of the person/entity to whom it is addressed. 
If you have received it by mistake please notify the sender by returning via 
e-mail as well as delete this message from your system. Any unauthorized use or 
dissemination of this message in whole or in part is prohibited. Please note 
that e-mails are susceptible to change. TOYOTA DO BRASIL LTDA (including its 
group companies) shall not be liable for the improper or incomplete 
transmission of the information contained in this communication, neither for 
personal, nonbusiness related information nor opinion sent through this email 
or even for any delay in its receipt or damage to your system. TOYOTA DO BRASIL 
LTDA (or its group companies) does not guarantee that the integrity of this 
communication has been kept nor that this communication is free of viruses, 
interceptions or interference.
--
//www.freelists.org/webpage/oracle-l
--
//www.freelists.org/webpage/oracle-l

Other related posts: