SQL 是如何成为主导数据库语言的?
对于大多数编程任务,您有多种语言可供选择,并且其中许多语言背后都有强大的社区。但是,当您需要使用数据库时,现在实际上只有一种可行的选择:SQL。当然,不同的公司有不同的实现和方言,但你仍然在查找东西,
SELECT columns
FROM table
JOIN other_table ON criteria
WHERE other_criteria
但情况并不总是这样。直到 90 年代初,还没有一种明显的方式与数据库交互。但今天,有。由于计算机语言倾向于扩散而不是融合,我觉得这有点奇怪。哪些历史和技术因素导致 SQL 在数据库访问领域几乎完全占据主导地位?
For most programming tasks, you've got quite the selection of languages to choose from, and good strong communities behind plenty of them. But when you need to work with a database, there's really only one viable choice these days: SQL. Sure, there are different companies with different implementations and dialects, but you're still looking things up with
SELECT columns
FROM table
JOIN other_table ON criteria
WHERE other_criteria
It wasn't always this way, though. As late as the early 90s, there was no single obvious way to interact with a database. But today, there is. And with the way computer languages tend to proliferate rather than converge, I find that a bit odd. What historical and technical factors led to SQL's almost complete dominance of the database access domain?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
就像温斯顿·丘吉尔的名言:
在 1970 年关系模型首次提出之前,已有替代数据库技术。从那时起一直有替代方案,并且今天有新的替代方案 。
但在所有替代方案中,除了 SQL 之外,没有任何解决方案可以提供如此好的平衡:
It's like this Winston Churchill quote:
There were alternative database technologies before 1970 when the relational model was first proposed. There have been alternatives the whole time since then, and there are new alternatives today.
But of all the alternatives, no solution besides SQL provides as good a balance for:
以下是 Codd Wikipedia 文章中的参考内容 - 有关 SQL 如何“获胜”的一些详细信息。
计算和通信创新委员会:历史教训:关系数据库的兴起。
Here's a reference from the Codd Wikipedia article - some detail on how SQL 'won out'.
Committee on Innovations in Computing and Communications: Lessons from History: The Rise of Relational Databases.
埃德加·F·科德开始了疯狂。
享受吧!
Edgar F Codd started the madness.
Enjoy!
除了 Codd 和 Churchill 之外,对于定义和查询基于表的数据集来说,SQL 并不是一种非常糟糕的语言。正如另一位将军所说,“它是最先到达那里、人数最多的”。
Codd and Churchill aside, SQL isn't a horribly bad language for defining and querying table-based datasets. As another general said, "It got there the firstest with the mostest."
因素之一是数据持续存在。替换/迁移公司的数据比替换/迁移应用程序要困难得多。应用程序可以来来去去,用最新的“本月风格”语言编码,但数据库平台会继续存在。这有点像 QWERTY 效果。虽然众所周知,QWERTY 键盘布局效率低下,但它仍然存在,因为改用其他键盘布局会产生巨大成本。
其次,甲骨文和IBM(以及最近的微软)占据了巨大的市场主导地位。虽然他们可能不会在每个细节上达成一致,但他们都没有看到数据库的非 SQL 接口有什么好处。我在 90 年代初就使用过 Ingres,当时它的 QUEL 被 SQL 淘汰了。
第三,拥有一个标准的平台对应用程序开发人员(尤其是 SAP 和 Oracle 等公司)来说是有好处的。
我想这个问题的另一面是为什么我们需要/想要这么多不同的编程语言。
One factor is that data persists. It is a lot harder to replace/migrate a company's data than its applications. Applications can come and go, coded in the latest 'flavor of the month' language, but the database platform lives on. This is a bit like a QWERTY effect. While the QWERTY keyboard layout is known to be inefficient, it persists because there would a massive cost in switching to anything else.
Secondly, there is massive market domination by Oracle and IBM (and more recently Microsoft). While they might not agree on every detail, neither has seen a benefit to a non-SQL interface to their databases. I used Ingres back in the early 90s when its QUEL was being pushed out by SQL.
Thirdly, there's a benefit to the application developers (especially the likes of SAP and Oracle) to have a standard(ish) platform to sit on.
I suppose the flip side to this question is why do we need/want so many different programming languages.