#109 转载:“牛”是怎么死的?
美文佳句 2016-03-17牛耕田回来,躺在栏里,疲惫不堪地喘着粗气,狗跑过来看它。
“唉,老朋友,我实在太累了。”牛诉着苦,“明儿个我真想歇一天。”
狗告别后,在墙角遇到了猫。狗说:“伙计,我刚才去看了牛,这位大哥实在太累了,它说它想歇一天。也难怪,主人给它的活儿太多太重了。”
猫转身对羊说:“牛抱怨主人给它的活儿太多太重,它想歇一天,明天不干活儿了。”
#108 华人与华侨
个人 2016-03-16每次春晚都必然问候海外华人华侨,但我从来没有思考过华人和华侨有什么区别,近日看到网络上的一些资料才弄明白。
#107 删除文件属性
Linux 2016-03-15# 时间清零
touch -amt 197001010000.00 <file>
sudo apt install -y xattr
xattr -l <file>
# 删除所有附加属性
xattr -c <file>
#106 SQL 的历史
DB SQL 2016-03-14历史
- 70 年代初,IBM 公司开发了 SEQUEL 语言 (Structured English Query Language,结构化英语查询语言),用于管理 RDB。
- 70 年代末,IBM 和甲骨文分别开始开发基于 SQL 的 RDBMS。
PS: IBM 的产品就包括大名鼎鼎的 DB2,世界上最早的 SQL 数据库。
PS: 甲骨文当时还叫做 Relational Software, Inc - 1980 年,由于商标问题,SEQUEL 改名 SQL。
虽然官方发音是ess-cue-el
, 但至今为止,不少人还是将其读做/ˈsiːkwəl/
。 - 1986 年被美国国家标准学会标准化(ANSI X3.135-1986)
- 1987 年,ISO 采纳 ANSI SQL (ISO 9075:1987),所以这个版本也被称之为 SQL87。
- 后来,SQL 陆续推出 89,92,1999, 2003 .... 多个版本。
应该是 ISO 负责制定和维护吧,也无所谓啦。
版本
SQL-86 (or SQL-87) is the ISO 9075:1987 standard of 1987
SQL-89 is the ISO/IEC 9075:1989 standard of 1989
SQL-92 is the ISO/IEC 9075:1992 standard of 1992
SQL:1999 is the ISO/IEC 9075:1999 standard of 1999
SQL:2003 is the ISO/IEC 9075:2003 standard of 2003
SQL:2006 is the ISO/IEC 9075:2006 standard of 2006
SQL:2008 is the ISO/IEC 9075:2008 standard of 2008
SQL:2011 is the ISO/IEC 9075:2011 standard of 2011
SQL:2016 is the ISO/IEC 9075:2016 standard of 2016
Year | Name | Alias | Comments |
---|---|---|---|
1986 | SQL-86 | SQL-87 | First formalized by ANSI |
1989 | SQL-89 | Minor revision that added integrity constraints | |
1992 | SQL-92 | SQL2 | Major revision (ISO 9075) |
1999 | SQL:1999 | SQL3 | |
2003 | SQL:2003 | ||
2006 | SQL:2006 | ||
2008 | SQL:2008 | ||
2011 | SQL:2011 | ||
2016 | SQL:2016 | ||
2019 | SQL:2019 |
SQL:1999
Added regular expression matching, recursive queries (e.g. transitive closure), triggers, support for procedural and control-of-flow statements, nonscalar types (arrays), and some object-oriented features (e.g. structured types), support for embedding SQL in Java (SQL/OLB) and vice versa (SQL/JRT)
2003
Introduced XML-related features (SQL/XML), window functions, standardized sequences, and columns with autogenerated values (including identity columns)
2006
ISO/IEC 9075-14:2006 defines ways that SQL can be used with XML. It defines ways of importing and storing XML data in an SQL database, manipulating it within the database, and publishing both XML and conventional SQL-data in XML form. In addition, it lets applications integrate queries into their SQL code with XQuery, the XML Query Language published by the World Wide Web Consortium (W3C), to concurrently access ordinary SQL-data and XML documents.
2008
Legalizes ORDER BY outside cursor definitions. Adds INSTEAD OF triggers, TRUNCATE statement,[34] FETCH clause
2011
Adds temporal data (PERIOD FOR)[35] (more information at: Temporal database#History). Enhancements for window functions and FETCH clause.
2016
Adds row pattern matching, polymorphic table functions, JSON
2019
Adds Part 15, multidimensional arrays (MDarray type and operators)
https://en.wikibooks.org/wiki/Structured_Query_Language
https://en.wikibooks.org/wiki/MySQL
https://en.wikibooks.org/wiki/PostgreSQL
https://en.wikibooks.org/wiki/SQLite
https://en.wikipedia.org/wiki/SQL_reserved_words
ISO 9075
最新的 SQL 标准一共分成 9 个部分(Part 5,6,7,8,12 可能是被废弃了):
- Part 1: Framework (SQL/Framework)
基本概念 - Part 2: Foundation (SQL/Foundation)
基础语法 - Part 3: Call-Level Interface (SQL/CLI)
应该是编程语言方面的接口 - Part 4: Persistent stored modules (SQL/PSM)
SQL 面向过程编程 - Part 9: Management of External Data (SQL/MED)
- Part 10: Object language bindings (SQL/OLB)
Java SQLJ 相关内容 - Part 11: Information and definition schemas (SQL/Schemata)
- Part 13: SQL Routines and types using the Java TM programming language (SQL/JRT)
又是 Java 相关 - Part 14: XML-Related Specifications (SQL/XML)
XML 相关
PS: 前缀 ISO/IEC 9075-<n>:2016 – Information technology – Database languages – SQL –
省略。
PS: 还有一个拓展标准:ISO/IEC 13249 SQL Multimedia and Application Packages
变种
多数数据库没有严格按照标准来实现,导致不通平台上的 SQL 语句是不能跨平台的。
以下是两种主要的 SQL 方言:
- T-SQL(Transact-SQL): SQLServer
- PL/SQL: Oracle
#105 看《过年好》的感受
影视 2016-03-07#104 Python tempfile
Python 2016-02-03#103 Linux 文件描述符
Linux 2016-02-01#102 Git: 远程引用不存在
Git 2016-01-31删除远程分支时报错:
git push --delete origin new
error: 无法删除 'new':远程引用不存在
error: 无法推送一些引用到 'gitee.com:catroll/django-admin'
如果是英文环境就是报:
git push --delete origin new
error: unable to delete 'new': remote ref does not exist
error: failed to push some refs to 'gitee.com:catroll/django-admin'
一般是这个分支已经被别人删除了。
Solution
git branch -d -r origin/new
#101 转载:SSL, SSH, OpenSSH, OpenSSL 有什么区别
SSL/TLS SSH OpenSSH OpenSSL 2016-01-30#100 Linux 运行级别和开机启动任务
Linux 2016-01-28先说明一下 Linux 的运行级别,然后使用 runlevel
、init
、chkconfig
等几个命令实现开机启动任务的管理。
#99 HTTP Cookie
HTTP Cookie 2016-01-28Cookie 的相关知识总结
#98 利用 XShell 做 SSH 转发
SSH XShell 开发工具 2016-01-27算是 SSH 端口转发(隧道技术)的一种利用。
#97 转载:武汉住房公积金提取办理指南
武汉 2016-01-23武汉住房公积金的提取办法。
#96 Python 设置系统默认编码
Python 字符编码 2016-01-23关于 sys.setdefaultencoding
的一些问题。