为什么SQL的语法由内而外?

前端之家收集整理的这篇文章主要介绍了为什么SQL的语法由内而外?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
在几乎任何正式结构化的信息集中,您可以从开始到结束开始阅读,或偶尔从结尾开始阅读(例如,街道地址).但在sql中,尤其是SELECT查询,以便正确理解它的含义你必须从中间开始,在FROM子句.这可能使长查询很难读取,特别是如果它包含嵌套的SELECT查询.

通常在编程中,当某些东西看起来没有任何意义时,它背后有一个历史原因.从SELECT而不是FROM开始没有意义.有谁知道这样做的原因?

解决方法

SQL Wikipedia entry简要描述了一些历史:

During the 1970s,a group at IBM San Jose Research Laboratory developed the System R relational database management system,based on the model introduced by Edgar F. Codd in his influential paper,“A Relational Model of Data for Large Shared Data Banks”. Donald D. Chamberlin and Raymond F. Boyce of IBM subsequently created the Structured English Query Language (SEQUEL) to manipulate and manage data stored in System R. The acronym SEQUEL was later changed to sql because “SEQUEL” was a trademark of the UK-based Hawker Siddeley aircraft company.

原始名称明确提到了英语,解释了语法.

深入挖掘,我们找到了FLOW-MATIC编程语言.

FLOW-MATIC,originally known as B-0 (Business Language version 0),is possibly the first English-like data processing language. It was invented and specified by Grace Hopper,and development of the commercial variant started at Remington Rand in 1955 for the UNIVAC I. By 1958,the compiler and its documentation were generally available and being used commercially.

FLOW-MATIC是Common Business Oriented Language背后的灵感,Common Business Oriented Language是目前仍在使用的最古老的编程语言之一. SEQUEL保持这种精神,采用类似英语的语法设计(20世纪70年代是现代的,与20世纪50年代和60年代相比).

从视角来看,“现代”编程系统仍然使用背后的古老思想来访问数据库

MULTIPLY PRICE BY QUANTITY GIVING COST.
原文链接:https://www.f2er.com/mssql/78089.html

猜你在找的MsSQL相关文章