0

Can anyone explain to me the meaning of schema? Is it the same as the user? How are the two related. Why many times user and schema have the same name?

In the past, I have worked with MySQL. In MySQL, the user is the one that logs in to the database with a password. The database is collections of many things like tables, views, etc., and generally when someone says table schema they mean the way table is structured like columns and datatypes.

How does this translate to the oracle database?

Shadow
  • 33,525
  • 10
  • 51
  • 64

2 Answers2

2

A schema is a collection of database objects. A schema is owned by a database user and has the same name as that user. Schema objects are logical structures created by users. Objects such as tables or indexes hold data, or can consist of a definition only, such as a view or synonym.

You can read more about this Overview of Schema Objects.

Luuk
  • 12,245
  • 5
  • 22
  • 33
0

In layman terms:

Schema is metadata of one user. So schema would be every piece of information about a user(grants, user_obects, etc.)

Adding to it:

Actual data inserted into the table is not part of schema. Schema describes what data, where and how can be stored, accessed, etc. Data itself is stored in tablespace and is not part of user's schema. Quota on that tablespace is data about user and is stored in dictionary, so it is schema object. So schema is not a data container. Schema is rules, properties, definitions, but not rows in the table.

In Oracle Schema has same name as User.

AmanSharma
  • 821
  • 9
  • 15