database 数据库模式的目的是什么?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2674222/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 07:41:38  来源:igfitidea点击:

What is purpose of database schema?

databasedatabase-designschema

提问by Gandalf StormCrow

What is the purpose of database schema? Where can I find more information about this? It's not table, it's not database, what is it?

数据库模式的目的是什么?我在哪里可以找到更多关于这方面的信息?它不是表,也不是数据库,它是什么?

采纳答案by Pranay Rana

From the quackit.comtutorial – SQL Server - Database Schemas:

来自quackit.com教程 - SQL Server - 数据库架构

A database schema is a way to logically group objects such as tables, views, stored procedures etc. Think of a schema as a container of objects.

You can assign a user login permissions to a single schema so that the user can only access the objects they are authorized to access.

Schemas can be created and altered in a database, and users can be granted access to a schema. A schema can be owned by any user, and schema ownership is transferable.

数据库模式是一种对表、视图、存储过程等对象进行逻辑分组的方法。将模式视为对象的容器。

您可以将用户登录权限分配给单个架构,以便用户只能访问他们有权访问的对象。

可以在数据库中创建和更改模式,并且可以授予用户访问模式的权限。模式可以由任何用户拥有,并且模式所有权是可转让的。

回答by Pavel Nikolov

A SQL schema is container of objects. For example you may have a large enterprise application and then it's a good practice to use different schemas for different purposes (e.g. put HR related tables into HR schema, accounting related tables into Accounting schema and so on). A schema can be owned by any user, and the ownership is transferable.

SQL 模式是对象的容器。例如,您可能有一个大型企业应用程序,然后将不同的模式用于不同的目的是一个很好的做法(例如,将 HR 相关表放入 HR 模式,将会计相关表放入会计模式等)。架构可以由任何用户拥有,并且所有权是可转让的。

回答by Robin Day

Your best answer is probably all over the interwebs, such as:

您的最佳答案可能遍布整个互联网,例如:

Database schemaarticle in Wikipedia.

维基百科中的数据库模式文章。

However, put simply, the database schema is the definition that describes the entire configuration of the database, including all of its tables, relations, index, etc.

然而,简单地说,数据库模式是描述数据库整个配置的定义,包括它的所有表、关系、索引等。

回答by Oded

The logical schema is the structure of the tables and relationships in the database.

逻辑模式是数据库中表和关系的结构。

The physical one is how this structure and the data it holds are stored.

物理上是如何存储这种结构及其保存的数据。

回答by da-soft

A database schema is a name space. It is like the C++ namespace, Java namespace, Delphi unit, etc. Depending on the DBMS, it may allow:

数据库模式是一个名称空间。它就像 C++ 命名空间、Java 命名空间、Delphi 单元等。根据 DBMS,它可能允许:

  • to grant / revoke access to namespace;
  • to use fully qualified / short object name (.);
  • to admin the schema as a unit;
  • etc.
  • 授予/撤销对命名空间的访问;
  • 使用完全限定/短对象名称 (.);
  • 将架构作为一个单元进行管理;
  • 等等。

You have to go to the your DBMS vendor site and check the documentation for the Schema term. In most cases, that will be a topic in Concepts.

您必须访问您的 DBMS 供应商站点并检查架构术语的文档。在大多数情况下,这将是概念中的一个主题。

回答by Data-Base

It's like a folder where you can have tables and other objects inside

它就像一个文件夹,您可以在其中放置表格和其他对象

Here is some more on wikipedia

这是维基百科上的更多内容