加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > MsSql教程 > 正文

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

发布时间:2020-12-12 06:42:03 所属栏目:MsSql教程 来源:网络整理
导读:在几乎任何正式结构化的信息集中,您可以从开始到结束开始阅读,或偶尔从结尾开始阅读(例如,街道地址).但在SQL中,尤其是SELECT查询,以便正确理解它的含义你必须从中间开始,在FROM子句.这可能使长查询很难读取,特别是如果它包含嵌套的SELECT查询. 通常在编程中,
在几乎任何正式结构化的信息集中,您可以从开始到结束开始阅读,或偶尔从结尾开始阅读(例如,街道地址).但在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.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读