Database schema(From Wikipedia)

2024-01-27 09:48
文章标签 schema database wikipedia

本文主要是介绍Database schema(From Wikipedia),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

Database schema

From Wikipedia, the free encyclopedia

A depiction of  MediaWiki database schema.

A database schema (pronounced skee-ma, /ˈski.mə/) of a database system is its structure described in a formal language

 supported by the database management system (DBMS) and refers to the organization of data to create a blueprint of how

 a database will be constructed (divided into database tables). The formal definition of database schema is a set of formulas

 (sentences) called integrity constraints imposed on a database. These integrity constraints ensure compatibility between

 parts of the schema. All constraints are expressible in the same language. A database can be considered a structure in 

realization of thedatabase language.[1] The states of a created conceptual schema are transformed into an explicit mapping,

 the database schema. This describes how real world entities are modeled in the database.


"A database schema specifies, based on the database administrator's knowledge of possible applications, the facts that

 can enter the database, or those of interest to the possible end-users."[2] The notion of a database schema plays the same

 role as the notion of theory in predicate calculus. A model of this “theory” closely corresponds to a database, which can be

 seen at any instant of time as a mathematical object. Thus a schema can contain formulas representing integrity constraints 

specifically for an application and the constraints specifically for a type of database, all expressed in the same database

 language.[1] In a relational database, the schema defines the tablesfieldsrelationshipsviewsindexes,packages

proceduresfunctionsqueuestriggerstypessequencesmaterialized viewssynonymsdatabase linksdirectories

JavaXML schemas, and other elements.


Schemata are generally stored in a data dictionary. Although a schema is defined in text database language, the term is

 often used to refer to a graphical depiction of the database structure. In other words, schema is the structure of the database

 that defines the objects in the database.


In an Oracle Database system, the term "schema" has a slightly different connotation. For the interpretation used in an Oracle

 Database, seeschema object.


Contents

  • 1 Levels of database schema
  • 2 Ideal requirements for schema integration
    • 2.1 Completeness
    • 2.2 Overlap preservation
    • 2.3 Extended overlap preservation
    • 2.4 Normalization
    • 2.5 Minimality
  • 3 Example of two schema integrations
  • 4 See also
  • 5 References
  • 6 External links


Levels of database schema

  • Conceptual schema, a map of concepts and their relationships.
  • Logical schema, a map of entities and their attributes and relations
  • Physical schema, a particular implementation of a logical schema
  • Schema object, Oracle database object


Ideal requirements for schema integration


Completeness

All information in the source data should be included in the database schema.[3]


Overlap preservation

Each of the overlapping elements specified in the input mapping is also in a database schema relation.[3]


Extended overlap preservation

Source-specific elements that are associated with a source’s overlapping elements are passed through to the database schema.[3]


Normalization

Main article: Database normalization

Independent entities and relationships in the source data should not be grouped together in the same relation in the database schema. 

In particular, source specific schema elements should not be grouped with overlapping schema elements, if the grouping co-locates

 independent entities or relationships.[3]


Minimality

If any elements of the database schema are dropped then the database schema is not ideal.[3]

These requirements influence the detailed structure of schemas that are produced. Certain applications will not require that all

 of these conditions are met, but these five requirements are the most ideal.


Example of two schema integrations

Example: Suppose we want a mediated (database) schema to integrate two travel databases, Go-travel and Ok-travel.

Go-travel has three relations:

Go-flight(f-num, time, meal)
Go-price(f-num, date, price)
Go-airline(airline, phone)

The attribute f-num is the flight number and meal is a boolean. The other attributes are self-explanatory.

Ok-travel has just one relation:

Ok-flight(f-num, date, time, price, nonstop)

'nonstop' is a boolean.

The overlapping information in Ok-travel’s and Go-travel’s schemas could be represented in a mediated schema:

Flight(f-num, date, time, price)[3]


See also

  • Core Architecture Data Model
  • Data Definition Language
  • Data Design
  • Data dictionary
  • Data model
  • Data modeling
  • Data mapping
  • Database
  • Database integrity
  • entity-relationship model
  • Knowledge Representation
  • Object-Role Modeling
  • Relational algebra
  • Schema Matching
  • SQL
  • Three schema approach


References

  1.  Rybinski, H. (1987). On First-Order-Logic Databases. ACM Transactions on Database Systems, 12( 3), 325-349.
  2. Imielinski T., & Lipski W.(1982). A systematic approach to relational database theory. In Proceedings of the 1982 ACM SIGMOD international conference on Management of data (SIGMOD '82). ACM, New York, NY, USA, 8-14. DOI=10.1145/582353.582356
  3.  Pottinger P., & Berstein P.(2008). Schema merging and mapping creation for relational sources. In Proceedings of the 11th international conference on Extending database technology: Advances in database technology (EDBT '08). ACM, New York, NY, USA, 73-84. DOI=10.1145/1353343.1353357


External links

  • http://www.databaseanswers.org/data_models/
  • http://weblogs.asp.net/scottgu/archive/2006/07/12/Tip_2F00_Trick_3A00_-Online-Database-Schema-Samples-Library.aspx
  • http://msdn.microsoft.com/en-us/library/bb187299%28SQL.80%29.aspx
  • http://www.ciobriefings.com/Publications/WhitePapers/DesigningtheStarSchemaDatabase/tabid/101/Default.aspx

这篇关于Database schema(From Wikipedia)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/649869

相关文章

SQL BETWEEN 语句的基本用法详解

《SQLBETWEEN语句的基本用法详解》SQLBETWEEN语句是一个用于在SQL查询中指定查询条件的重要工具,它允许用户指定一个范围,用于筛选符合特定条件的记录,本文将详细介绍BETWEEN语... 目录概述BETWEEN 语句的基本用法BETWEEN 语句的示例示例 1:查询年龄在 20 到 30 岁

MySQL DQL从入门到精通

《MySQLDQL从入门到精通》通过DQL,我们可以从数据库中检索出所需的数据,进行各种复杂的数据分析和处理,本文将深入探讨MySQLDQL的各个方面,帮助你全面掌握这一重要技能,感兴趣的朋友跟随小... 目录一、DQL 基础:SELECT 语句入门二、数据过滤:WHERE 子句的使用三、结果排序:ORDE

MySQL MCP 服务器安装配置最佳实践

《MySQLMCP服务器安装配置最佳实践》本文介绍MySQLMCP服务器的安装配置方法,本文结合实例代码给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友参考下... 目录mysql MCP 服务器安装配置指南简介功能特点安装方法数据库配置使用MCP Inspector进行调试开发指

mysql中insert into的基本用法和一些示例

《mysql中insertinto的基本用法和一些示例》INSERTINTO用于向MySQL表插入新行,支持单行/多行及部分列插入,下面给大家介绍mysql中insertinto的基本用法和一些示例... 目录基本语法插入单行数据插入多行数据插入部分列的数据插入默认值注意事项在mysql中,INSERT I

一文详解MySQL如何设置自动备份任务

《一文详解MySQL如何设置自动备份任务》设置自动备份任务可以确保你的数据库定期备份,防止数据丢失,下面我们就来详细介绍一下如何使用Bash脚本和Cron任务在Linux系统上设置MySQL数据库的自... 目录1. 编写备份脚本1.1 创建并编辑备份脚本1.2 给予脚本执行权限2. 设置 Cron 任务2

SQL Server修改数据库名及物理数据文件名操作步骤

《SQLServer修改数据库名及物理数据文件名操作步骤》在SQLServer中重命名数据库是一个常见的操作,但需要确保用户具有足够的权限来执行此操作,:本文主要介绍SQLServer修改数据... 目录一、背景介绍二、操作步骤2.1 设置为单用户模式(断开连接)2.2 修改数据库名称2.3 查找逻辑文件名

SQL Server数据库死锁处理超详细攻略

《SQLServer数据库死锁处理超详细攻略》SQLServer作为主流数据库管理系统,在高并发场景下可能面临死锁问题,影响系统性能和稳定性,这篇文章主要给大家介绍了关于SQLServer数据库死... 目录一、引言二、查询 Sqlserver 中造成死锁的 SPID三、用内置函数查询执行信息1. sp_w

canal实现mysql数据同步的详细过程

《canal实现mysql数据同步的详细过程》:本文主要介绍canal实现mysql数据同步的详细过程,本文通过实例图文相结合给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的... 目录1、canal下载2、mysql同步用户创建和授权3、canal admin安装和启动4、canal

SQL中JOIN操作的条件使用总结与实践

《SQL中JOIN操作的条件使用总结与实践》在SQL查询中,JOIN操作是多表关联的核心工具,本文将从原理,场景和最佳实践三个方面总结JOIN条件的使用规则,希望可以帮助开发者精准控制查询逻辑... 目录一、ON与WHERE的本质区别二、场景化条件使用规则三、最佳实践建议1.优先使用ON条件2.WHERE用

MySQL存储过程之循环遍历查询的结果集详解

《MySQL存储过程之循环遍历查询的结果集详解》:本文主要介绍MySQL存储过程之循环遍历查询的结果集,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录前言1. 表结构2. 存储过程3. 关于存储过程的SQL补充总结前言近来碰到这样一个问题:在生产上导入的数据发现