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

相关文章

MySQL 中的 CAST 函数详解及常见用法

《MySQL中的CAST函数详解及常见用法》CAST函数是MySQL中用于数据类型转换的重要函数,它允许你将一个值从一种数据类型转换为另一种数据类型,本文给大家介绍MySQL中的CAST... 目录mysql 中的 CAST 函数详解一、基本语法二、支持的数据类型三、常见用法示例1. 字符串转数字2. 数字

Mysql实现范围分区表(新增、删除、重组、查看)

《Mysql实现范围分区表(新增、删除、重组、查看)》MySQL分区表的四种类型(范围、哈希、列表、键值),主要介绍了范围分区的创建、查询、添加、删除及重组织操作,具有一定的参考价值,感兴趣的可以了解... 目录一、mysql分区表分类二、范围分区(Range Partitioning1、新建分区表:2、分

MySQL 定时新增分区的实现示例

《MySQL定时新增分区的实现示例》本文主要介绍了通过存储过程和定时任务实现MySQL分区的自动创建,解决大数据量下手动维护的繁琐问题,具有一定的参考价值,感兴趣的可以了解一下... mysql创建好分区之后,有时候会需要自动创建分区。比如,一些表数据量非常大,有些数据是热点数据,按照日期分区MululbU

SQL Server配置管理器无法打开的四种解决方法

《SQLServer配置管理器无法打开的四种解决方法》本文总结了SQLServer配置管理器无法打开的四种解决方法,文中通过图文示例介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的... 目录方法一:桌面图标进入方法二:运行窗口进入检查版本号对照表php方法三:查找文件路径方法四:检查 S

MySQL 删除数据详解(最新整理)

《MySQL删除数据详解(最新整理)》:本文主要介绍MySQL删除数据的相关知识,本文通过实例代码给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友参考下吧... 目录一、前言二、mysql 中的三种删除方式1.DELETE语句✅ 基本语法: 示例:2.TRUNCATE语句✅ 基本语

MySQL中查找重复值的实现

《MySQL中查找重复值的实现》查找重复值是一项常见需求,比如在数据清理、数据分析、数据质量检查等场景下,我们常常需要找出表中某列或多列的重复值,具有一定的参考价值,感兴趣的可以了解一下... 目录技术背景实现步骤方法一:使用GROUP BY和HAVING子句方法二:仅返回重复值方法三:返回完整记录方法四:

从入门到精通MySQL联合查询

《从入门到精通MySQL联合查询》:本文主要介绍从入门到精通MySQL联合查询,本文通过实例代码给大家介绍的非常详细,需要的朋友可以参考下... 目录摘要1. 多表联合查询时mysql内部原理2. 内连接3. 外连接4. 自连接5. 子查询6. 合并查询7. 插入查询结果摘要前面我们学习了数据库设计时要满

MySQL查询JSON数组字段包含特定字符串的方法

《MySQL查询JSON数组字段包含特定字符串的方法》在MySQL数据库中,当某个字段存储的是JSON数组,需要查询数组中包含特定字符串的记录时传统的LIKE语句无法直接使用,下面小编就为大家介绍两种... 目录问题背景解决方案对比1. 精确匹配方案(推荐)2. 模糊匹配方案参数化查询示例使用场景建议性能优

mysql表操作与查询功能详解

《mysql表操作与查询功能详解》本文系统讲解MySQL表操作与查询,涵盖创建、修改、复制表语法,基本查询结构及WHERE、GROUPBY等子句,本文结合实例代码给大家介绍的非常详细,感兴趣的朋友跟随... 目录01.表的操作1.1表操作概览1.2创建表1.3修改表1.4复制表02.基本查询操作2.1 SE

MySQL中的锁机制详解之全局锁,表级锁,行级锁

《MySQL中的锁机制详解之全局锁,表级锁,行级锁》MySQL锁机制通过全局、表级、行级锁控制并发,保障数据一致性与隔离性,全局锁适用于全库备份,表级锁适合读多写少场景,行级锁(InnoDB)实现高并... 目录一、锁机制基础:从并发问题到锁分类1.1 并发访问的三大问题1.2 锁的核心作用1.3 锁粒度分