Home » SQL & PL/SQL » SQL & PL/SQL » Yes or NO
Yes or NO [message #203625] Wed, 15 November 2006 20:08 Go to next message
gkrishn
Messages: 506
Registered: December 2005
Location: Putty a dark screen
Senior Member
In a RDBMS ,every data,all objects reside in a table ?
Re: Yes or NO [message #203671 is a reply to message #203625] Thu, 16 November 2006 00:26 Go to previous messageGo to next message
a_developer
Messages: 194
Registered: January 2006
Senior Member
All data reside in a table. But not all objects reside in a table. A table itself is an object. Other objects are:
select distinct object_type
 from all_objects;

Re: Yes or NO [message #203690 is a reply to message #203671] Thu, 16 November 2006 01:03 Go to previous messageGo to next message
pritika
Messages: 9
Registered: November 2006
Junior Member
yes this is absolutely true. ALl data resides within a table and not object. Table in itself is an object and all_objects system table defines what other objects are there.
Re: Yes or NO [message #203704 is a reply to message #203625] Thu, 16 November 2006 01:47 Go to previous messageGo to next message
gkrishn
Messages: 506
Registered: December 2005
Location: Putty a dark screen
Senior Member
for eg: VIEW .
View is an object but its definition resides in table i guess.
what u say ?
Re: Yes or NO [message #203705 is a reply to message #203625] Thu, 16 November 2006 01:47 Go to previous messageGo to next message
Littlefoot
Messages: 20897
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
gkrishn
In a RDBMS ,every data,all objects reside in a table ?

Not every - recent Oracle (which is RDBMS) versions support external tables. Although it is created using the CREATE TABLE statement (using SQL*Plus) and easily accessible through the same tool, data is stored in a file on file system (in a directory on a hard disk).

So, table is in a database, but data is not.
Re: Yes or NO [message #203706 is a reply to message #203704] Thu, 16 November 2006 01:53 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
View definitions (or indeed any object definitions) do not reside in tables in Oracle in the same way that data does.
You can inspect the definitions through a series of views, but there is no way to (for example) alter the name of a column in a table by performing an
UPDATE <some table> SET column_name = <new column>


So in summary, all objects do not reside in a table.
icon10.gif  Re: Yes or NO [message #203710 is a reply to message #203625] Thu, 16 November 2006 02:00 Go to previous messageGo to next message
gkrishn
Messages: 506
Registered: December 2005
Location: Putty a dark screen
Senior Member
Still some part is not clear .
dba_objects table can have VIEW
but
dba_segments will never have VIEW (means view does not occupy space)
dba_source has the definition of view .


So can we conclude atleast some objects types reside in tables ,not al objects
Re: Yes or NO [message #203717 is a reply to message #203710] Thu, 16 November 2006 02:16 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Sorry, but you're missing a couple of subtleties.
DBA_OBJECTS, DBA_SOURCE and DBA_SEGMENTS are not tables.
They're views.
They're built on a mixture of actual tables (like OBJ$ and USER$) and other views (v$ views)
These v$ views are in turn built on a set of structures called x$ tables, which, while they look like tables, and can be queried like tables, are actually Oracles internal representation of a series of underlying C structures.

So, in order to say that everything resides in tables, you have to be prepared to define the underlying C structures in the database code as Tables too.

[Updated on: Thu, 16 November 2006 02:22]

Report message to a moderator

icon12.gif  Re: Yes or NO [message #203724 is a reply to message #203625] Thu, 16 November 2006 02:31 Go to previous messageGo to next message
Ferrarist
Messages: 29
Registered: March 2006
Location: Netherlands - Den Haag
Junior Member
And what about a sequence than?? Cool

[Updated on: Thu, 16 November 2006 03:00]

Report message to a moderator

Re: Yes or NO [message #203731 is a reply to message #203724] Thu, 16 November 2006 02:46 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Indexes are a datastructure that is completely different to Tables - while informationabout the index is held in tables, the actual index itself is not a table.
The addition of Index Organised Tables in Oracle 8 thus gives us a way of storing table data outside of normal tables.
Re: Yes or NO [message #203742 is a reply to message #203724] Thu, 16 November 2006 03:24 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Ferrarist wrote on Thu, 16 November 2006 09:31
And what about a sequence than?? Cool


sequences are not considered data, nor do they hold data
Re: Yes or NO [message #203753 is a reply to message #203625] Thu, 16 November 2006 03:49 Go to previous messageGo to next message
gkrishn
Messages: 506
Registered: December 2005
Location: Putty a dark screen
Senior Member
Good explanatins, i understand i hav to do more and more R&Ds .
Thanks JRowbottom

Re: Yes or NO [message #203770 is a reply to message #203742] Thu, 16 November 2006 04:39 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
If you were feeling particularly perverse, you could use ALTER SEQUENCE to change the various values for a sequence and use this as a way of storing data.
I'd kick any developer I saw doing this round the room, but it would work.
Re: Yes or NO [message #203792 is a reply to message #203770] Thu, 16 November 2006 06:00 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
lol.
If you're into perversities: you could create and drop tables on the fly and then use the number of existing tables as data.
Re: Yes or NO [message #203823 is a reply to message #203792] Thu, 16 November 2006 07:47 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
You're a deeply disturbed human being!!!
Cool
Previous Topic: PL/SQL resrved words
Next Topic: Format Time
Goto Forum:
  


Current Time: Wed Dec 07 02:44:04 CST 2016

Total time taken to generate the page: 0.08632 seconds