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特权,那么它就是一个模式,否则它就是一个用户。
从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.
此外,用户可以访问除自己的模式之外的模式中的对象,如果他们有权限这样做的话。
摘自《问汤姆》
您应该将模式视为用户帐户和其中所有对象的集合 作为所有意图和目的的模式。
SCOTT是一个包含EMP、DEPT和奖金表的模式,以及各种授权 其他的东西。
SYS是一个包含大量表、视图、授权等的模式。
SYSTEM是一个模式.....
从技术上讲——模式是数据库使用的元数据(数据字典)的集合, 通常使用DDL生成。模式定义数据库的属性,例如 表、列和属性。数据库模式是数据库中数据的描述 数据库。
这很简单。
If USER has OBJECTS
then call it SCHEMA
else
call it USER
end if;
用户可以访问不同用户拥有的模式对象。
Schema是DB的封装。对象关于一个想法/感兴趣的领域,并拥有一个用户。然后,它将由具有抑制角色的其他用户/应用程序共享。所以用户不需要拥有一个模式,但是模式需要有一个所有者。
推荐文章
- ORA-12505, TNS:监听器当前不知道连接描述符中给定的SID
- SQL在Oracle中连接多行列值的查询
- GROUP BY with MAX(DATE)
- 如何从Oracle的表中获取列名?
- 数据库性能调优有哪些资源?
- Oracle中表名的最大长度是多少?
- oracle中的RANK()和DENSE_RANK()函数有什么区别?
- 什么时候我需要在Oracle SQL中使用分号vs斜杠?
- 如何在Oracle SQL开发人员中找到引用给定表的表?
- 如何在Oracle SQL开发人员中设置自定义日期时间格式?
- 为什么Oracle 9i将空字符串视为NULL?
- NVL和Coalesce之间的Oracle差异
- 不可重复读和幻影读的区别是什么?
- ORA-00054:资源繁忙,指定NOWAIT或超时获取
- Oracle中的双表是什么?