Home » RDBMS Server » Server Administration » table_owner vs schema
table_owner vs schema [message #522812] Wed, 14 September 2011 01:23 Go to next message
hanner
Messages: 90
Registered: August 2011
Location: at HOME
Member
hi all,

just want to clearify,

a table can have many schema or just 1 schema which is the table owner?

I read about it and got confuse.
Re: table_owner vs schema [message #522815 is a reply to message #522812] Wed, 14 September 2011 01:27 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
a table can have many schema

This is meaningless, a table has no schema, a table belongs to one schema and only one.

Please read Database Concepts, at least the first chapter.

Regards
Michel

[Updated on: Wed, 14 September 2011 01:28]

Report message to a moderator

Re: table_owner vs schema [message #522841 is a reply to message #522815] Wed, 14 September 2011 02:27 Go to previous messageGo to next message
hanner
Messages: 90
Registered: August 2011
Location: at HOME
Member
got it. Confirm my undestanding then.

Cos i read somewhere people saying a table can have many schema...so got confuse .. .just checking. Hope u be more understanding.. .thanks anyway Mic.
Re: table_owner vs schema [message #522842 is a reply to message #522841] Wed, 14 September 2011 02:32 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Read the chapter I mentioned and you will be no more confused by such assertion. Smile

Regards
Michel
Re: table_owner vs schema [message #522843 is a reply to message #522842] Wed, 14 September 2011 02:47 Go to previous messageGo to next message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
There's a user in your database. All objects he created make his schema (i.e. these objects belong to that user account). User runs CREATE TABLE statement and creates a table named TEST_HANNER. Who does it belong to? This user, or many users? Here's an example:
SQL> show user
USER is "SCOTT"
SQL> create table test_hanner (col number);

Table created.

SQL> connect sys@ora10 as sysdba
Enter password:
Connected.

SQL> select table_name, owner from all_tables
  2  where table_name = 'TEST_HANNER';

TABLE_NAME                     OWNER
------------------------------ ------------------------------
TEST_HANNER                    SCOTT

SQL>
Got the idea?
Re: table_owner vs schema [message #522861 is a reply to message #522843] Wed, 14 September 2011 05:00 Go to previous message
hanner
Messages: 90
Registered: August 2011
Location: at HOME
Member
yes....littlefoot..i was thinking in that line. Thank you so much for taking the time to explain things for me. You know i just got through the ora press book. It is when i got a junior dba role in a company i start to really question all this concept...and user requests to check for them schema size + many more supporting request start to roll in, then i really gets my hands dirty. I just want to have a firm foundation. Thanks. If i don't do, u know u will never question when u so called understand.
Previous Topic: Help: Monitoring open_cursors
Next Topic: dba role
Goto Forum:
  


Current Time: Thu Apr 18 02:07:51 CDT 2024