Schema与User的区别

本文解释了数据库中Schema的概念及其与User的关系。Schema是逻辑结构数据的集合,属于特定的数据库User并与其同名。每个User仅拥有一个Schema,而表则归属于Schema而非直接归属User。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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的权限。

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值