Tablespaces, Schemas and Users

database this cabinet

  The best way to explain databases, tablespaces, datafiles, tables, data is to imagine a cabinet full of things.

  Physically speaking: the database is a cabinet, the drawer in the cabinet is the table space, the folders in the drawer are data files, the paper in the folder is the table, and the information written on the paper is the data.

  In terms of objects: the database is a cabinet, the drawers in the cabinet are Schema, and the drawers are directly all kinds of paper, these papers are the tables, and the information written on the paper is the data.

  If we talk about the concept of being a layer between a database instance and a table, schema and table space are a hierarchical concept, and they both have a very important feature, that is, the exclusiveness of the table. Schema is a logical collection of tables, and it is an object that must be specified by all applications to access tables (although everyone generally omits it, but in fact it must be the access mode of db.schema.table). It is impossible for the same table to belong to this schema. It belongs to another Schema. A table space is a physical collection of tables, and it is a file that must be accessed by all disk read and write (generally, you don’t need to worry too much, mainly Oracle, and DBA for personalized needs). It is impossible for the same table to be placed in this table space. , and placed in that table space.

  • About users

  
  The user is the user, and the user is the person who opens the drawer and takes out the paper to use. Under normal circumstances, users will have a little more dealing with the Schema drawer, because each user has a Schema tailored for him by Oracle, and in the actual use process, the Schema is used to access the table, add, delete and modify. check operation. Of course, with the owner's permission, guests can also open their own drawers to check documents. The DBA is the one who has the key.

  The tablespace drawer also has the user's name on it. Everyone can set their own default drawer to put things. If not set, Oracle will also give you a common drawer to put things. The drawer of the table space is a physical drawer and actually exists. If the drawer is gone, the files will also be gone. The Schema drawer seems to be born with the user, and it is a mysterious drawer.

  • tablespace

  The ORACLE database is divided into logical areas called tablespaces - forming the logical structure of the ORACLE database. An ORACLE database can have one or more table spaces, and a table space corresponds to one or more physical database files. Table space is the smallest unit of ORACLE database recovery, which holds many database entities, such as tables, views, indexes, clusters, rollback segments and temporary segments.

  • Schema 

  Schema is a collection of database objects. In order to distinguish each collection, we need to give this collection a name. These names are the many username-like nodes we see under the schema of the Enterprise Manager. These usernames are similar to usernames. A node is actually a schema, which contains various objects such as tables, views, sequences, stored procedures, synonyms, indexes, clusters, and database links. A user generally corresponds to a schema, the user's schema name is equal to the user name, and is used as the user's default schema. This is why we see that the schema names are all database usernames under the Enterprise Manager scheme.


  

  

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326093209&siteId=291194637