`

Schema与User的区别

阅读更多

Schema:

"A schema is a collection of logical structures of data, or schema objects. A schema is owned by a database user and has the same name as that user. Each user owns a single schema. "

这段话来自Oracle

http://download.oracle.com/docs/cd/B10500_01/server.920/a96524/c11schem.htm#22628

Schema是一个逻辑结构数据的集合。一个Schema属于一个数据库User,并且与该User同名。每个User只拥有一个Schema。

 

所以当我们使用scott/tiger登录,执行数据库MyDB下的表TUser查询时:

SELECT * FROM TUser

等价于

SELECT * FROM scott.TUser;

但是此处的scott是Schema而不是User,因为table是属于Schema的而不是User,User有的只是管理操纵Schema的权限。

 

分享到:
评论
1 楼 bureaucrat 2011-05-16  
basically they are two different things.
user is a role granted with some privileges, while schema is a object collection.

相关推荐

Global site tag (gtag.js) - Google Analytics