Oracle中的用户和模式有什么区别?


当前回答

从WikiAnswers:

A schema is collection of database objects, including logical structures such as tables, views, sequences, stored procedures, synonyms, indexes, clusters, and database links. A user owns a schema. A user and a schema have the same name. The CREATE USER command creates a user. It also automatically creates a schema for that user. The CREATE SCHEMA command does not create a "schema" as it implies, it just allows you to create multiple tables and views and perform multiple grants in your own schema in a single transaction. For all intents and purposes you can consider a user to be a schema and a schema to be a user.

此外,用户可以访问除自己的模式之外的模式中的对象,如果他们有权限这样做的话。

其他回答

我在某处读到,如果您的数据库用户拥有DDL特权,那么它就是一个模式,否则它就是一个用户。

将用户视为您通常所做的(用户名/密码,具有登录和访问系统中某些对象的权限),将模式视为用户主目录的数据库版本。用户“foo”通常在“foo”模式下创建东西,例如,如果用户“foo”创建或引用表“bar”,那么Oracle将假设用户指的是“foo.bar”。

模式是对象的容器。 它由用户拥有。

这很简单。

If USER has OBJECTS
then call it SCHEMA
else
     call it USER
end if;

用户可以访问不同用户拥有的模式对象。

用户:对数据库资源的访问。就像一把进入房子的钥匙。

架构:关于数据库对象的信息集合。就像你书中的索引,它包含了关于该章节的简短信息。

详情请看这里