Shishir Malla
Shishir Malla

Reputation: 41

Literal difference between table, schema, tablespace and user

What is the literal difference between table, schema, tablespace and user?

Upvotes: 2

Views: 2659

Answers (1)

Pamuleti Pullagura
Pamuleti Pullagura

Reputation: 204

Database : Collection of data is called database.

Tablespace : An Oracle Database consists of one or more logical storage units called tablespace, which collectively use to store all the database's data. Each tablespace in an Oracle Database consists of one or more datafiles which are used to store data physically.

Schema : A schema is collection of database objects, including logical structures such as tables, views, sequences, stored procedures, synonyms, indexes, clusters, triggers, and links.

User : A user owns a schema. A user and a schema have the same name. In Oracle, users and schemas are essentially the same thing. You can consider that a user is the account you use to connect to a database, and a schema is the set of objects (tables, views, etc.) that belong to that account. The CREATE USER command creates a user. It also automatically creates a schema for that user.

Table : Tables are the basic unit of data storage in an Oracle Database. Data is stored in rows and columns.

For all intents and purposes you can consider a user to be a schema and a schema to be a user. A user can access objects in schemas other than their own, if they have permission to do so.

Upvotes: 5

Related Questions