这可能是一个非常糟糕的问题。但我一直将模式视为数据库中的表定义。这是错误的或不完全正确的。我不太记得我的数据库课程了。
当前回答
在oracle中,Schema是一个数据库下的一个用户,例如scott是orcl数据库中的一个模式。 在一个数据库中,我们可能有很多像scott这样的模式
其他回答
这篇文章只涉及到Oracle, Schema的定义在另一个DB上下文中会发生变化。
可能是那种让人受不了的事情,但供你参考的术语似乎在定义上有所不同,这是最烦人的事情:)
在Oracle中,数据库就是数据库。你可以把它想象成数据文件和重做日志,以及数据库本身在磁盘上的实际物理存在(即不是实例)。
Schema实际上就是一个用户。更具体地说,它是用户拥有的一组表/ pros /索引等。另一个用户有不同的模式(他/她拥有的表),但是用户也可以看到他们有选择特权的任何模式。因此,一个数据库可以由数百个模式组成,每个模式由数百个表组成。您可以在同一数据库中的不同模式中拥有具有相同名称的表。
表是一个表,一组包含数据的行和列,并且包含在模式中。
例如,SQL Server中的定义可能不同。我不知道这件事。
在oracle中,Schema是一个数据库下的一个用户,例如scott是orcl数据库中的一个模式。 在一个数据库中,我们可能有很多像scott这样的模式
关系模式是表的逻辑定义——它定义了表的名称,以及每一列的名称和类型。就像一个计划或蓝图。数据库模式是整个数据库的关系模式的集合。
表是由一组行(又名“元组”)组成的结构,每一行都有由模式定义的属性。表上还可能有索引,以帮助查找某些列上的值。
从形式上讲,数据库是任何数据的集合。在这个上下文中,数据库将是表的集合。DBMS(数据库管理系统)是管理和运行数据库的软件(如MySQL, SQL Server, Oracle等)。
schema包含数据库。
数据库是Schema的一部分。
schema >数据库。
模式包含视图、存储过程、数据库、触发器等。
来自PostgreSQL文档:
A database contains one or more named schemas, which in turn contain tables. Schemas also contain other kinds of named objects, including data types, functions, and operators. The same object name can be used in different schemas without conflict; for example, both schema1 and myschema can contain tables named mytable. Unlike databases, schemas are not rigidly separated: a user can access objects in any of the schemas in the database he is connected to, if he has privileges to do so. There are several reasons why one might want to use schemas: To allow many users to use one database without interfering with each other. To organize database objects into logical groups to make them more manageable. Third-party applications can be put into separate schemas so they do not collide with the names of other objects. Schemas are analogous to directories at the operating system level, except that schemas cannot be nested.
推荐文章
- 获得PostgreSQL数据库中当前连接数的正确查询
- MySQL数据库表中的最大记录数
- 从现有模式生成表关系图(SQL Server)
- HyperLogLog算法是如何工作的?
- 数据库和模式的区别
- 如何从命令行在windows中找到mysql数据目录
- 如何找到MySQL的根密码
- 将表从一个数据库复制到另一个数据库的最简单方法?
- 截断Postgres数据库中的所有表
- 什么是分片,为什么它很重要?
- 数据库触发器是必要的吗?
- 为什么我应该使用基于文档的数据库而不是关系数据库?
- 哪个更快/最好?SELECT *或SELECT columnn1, colum2, column3等
- 将值从同一表中的一列复制到另一列
- 什么是数据库池?