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


当前回答

这很简单。

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

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

其他回答

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

Schema是DB的封装。对象关于一个想法/感兴趣的领域,并拥有一个用户。然后,它将由具有抑制角色的其他用户/应用程序共享。所以用户不需要拥有一个模式,但是模式需要有一个所有者。

这很简单。

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

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

从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操作,直到模式用户给你适当的特权。