1

Is the schema for a table and the owner for a table the same in oracle? If not what is the difference?

Abi
  • 1,335
  • 2
  • 15
  • 28

2 Answers2

1

In Oracle, schema and owner of a table are technically identical.

If you talk about a schema you usually refer to all objects owned by a user, but when you say user it often means only someone who can connect to the database. But this is just language use - again, technically user is the same as schema.

People coming from other databases will often equate schema with database, since often all the tables are in one schema. This can make matters a bit muddled when talking about Oracle with SQL-Server people, for example.

Chris
  • 4,133
  • 30
  • 38
1

As Tom says:

You should consider a schema to be the user account and collection of all objects therein as a schema for all intents and purposes.

A table created by a user - and therefore owned by that user, as the owner in all_tables for example - forms part of that user's schema. So yes, the owner and schema are the same.

Also see this earlier question, which references the same AskTom post, and also highlights this line from it:

for all intents and purposes just consider user = schema = user = schema = the same thing

Community
  • 1
  • 1
Alex Poole
  • 183,384
  • 11
  • 179
  • 318