这可能是一个非常糟糕的问题。但我一直将模式视为数据库中的表定义。这是错误的或不完全正确的。我不太记得我的数据库课程了。


当前回答

模式是数据库对象的集合,其中也包括逻辑结构。 它具有拥有它的用户的名称。 一个数据库可以有任意数量的Schema。 数据库中的一个表可以出现在两个同名的不同模式中。 用户可以查看已为其分配选择特权的任何模式。

其他回答

A schema is not a plan for the entire database. It is a plan/container for a subset of objects (ex.tables) inside a a database. This goes to say that you can have multiple objects(ex. tables) inside one database which don't neccessarily fall under the same functional category. So you can group them under various schemas and give them different user access permissions. That said, I am unsure whether you can have one table under multiple schemas. The Management Studio UI gives a dropdown to assign a schema to a table, and hence making it possible to choose only one schema. I guess if you do it with TSQL, it might create 2 (or multiple) different objects with different object Ids.

架构->平面图

数据库->房子

桌子->房间

模式是数据库对象的集合,其中也包括逻辑结构。 它具有拥有它的用户的名称。 一个数据库可以有任意数量的Schema。 数据库中的一个表可以出现在两个同名的不同模式中。 用户可以查看已为其分配选择特权的任何模式。

As https://www.informit.com/articles/article.aspx?p=30669

所有对象的名称在一定范围内必须是唯一的。每一个 数据库必须有唯一的名称;模式名称不能重复 在单个数据库的范围内,表的名称必须为 在单个模式的作用域中是唯一的,列名必须是 在表中是唯一的。类中索引的名称必须唯一 数据库。

就像MusiGenesis说的那样,在大多数数据库中:

架构:数据库:表::平面图:房子:房间

但是,在Oracle中,它可能更容易想到:

架构:数据库:表::所有者:房子:房间