MySQL 没有的 XML 实际用途是什么?
我对 XML 感兴趣。 我是从 Google 的 CSE 中知道的。
操作 3000 行的 XML 文件对我来说常常是一件痛苦的事情。 这就提出了一个问题。
为什么 Google 使用 XML,而不是 MySQL,这样我就需要操作大型 XML 文件?
I am interested in XML. I know it from Google's CSE.
It is often a pain for me to manipulate 3000-rows XML files.
This raises a question.
Why does Google use XML, not MySQL, such that I need to manipulate large XML -files?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
在数据交换方面,XML 至少比 SQL 具有以下优势:
也许您对 SQL 能做的最好的事情是以源代码形式传送表,即 CREATE TABLE 语句后跟许多 INSERT 语句。 如果您有兼容的数据库,这很好,但由于 SQL 从未真正具体化为标准,因此此级别的互操作性非常差,Google 必须提供多种方言(甚至可能对于同一 DBMS 的不兼容版本)。
XML has at least these advantages over SQL for data interchange purposes:
Probably the best you can do with SQL is ship tables in source code form, ie, as CREATE TABLE statements followed by a lot of INSERT statements. This is fine if you have a compatible database, but since SQL never really crystallized as a standard, interoperability at this level is very poor, and Google would have to offer multiple dialects (perhaps even for incompatible versions of the same DBMS).
XML 大部分是人类可读的并且是跨平台的。 谷歌如何仅从 MYSql 向您发送数据? 您是否希望他们向您发送一个二进制 blob,并假设您有正确的数据库可以将其插入其中? 如果未安装 MYSql,或者您的计算机上安装了与 google 上不同版本的 MYSql,您将如何使用该 blob?
XML is mostly human readable and cross platform. How would google send you data from just MYSql? Would you expect them to send you a binary blob that assumes you have the proper database to insert it into? How would you use that blob if MYSql wasn't installed, or a different version of MYSql was installed on your machine than on google?
XML 通常用作系统之间的传输格式。 在 CSE 中,我猜测谷歌正在以许多系统可以使用的格式将大量数据从它们传输给您。 如果他们使用MySQL,那对我来说就没用,因为我对此一无所知。 然而,几乎大多数现代软件框架都可以使用 XML。
附加
此外,CSE(定制搜索引擎)可能希望您不需要对 XML 进行大量操作,只需转换以呈现到网页即可。 您可以非常轻松地对 XML 文件执行 XSLT(可扩展样式表语言转换),将其转换为 HTML 片段以在您的网站上使用。
XML is often uses as a transport format between systems. In CSE I would guess that google is transferring a lot of data from them to you in a format that many systems can use. If they used MySQL it would be no use to me as I don't know anything about it. However, pretty much most modern software frameworks can work with XML.
ADDITIONAL
Also, CSE (Customised Search Engine) probably expects that you don't need to do a lot of manipulation to the XML, just transform if for rendering to a web page. You can very easily perform an XSLT (Extensible Stylesheet Language Transformation) to an XML file to transform it in to an HTML fragment to use on your website.
MySQL是一个特定的SQL数据库引擎。 一个不太适合为非常非常大的数据集和像谷歌这样的搜索引擎所具有的特殊需求提供后端。
我相信您可以挖掘有关谷歌基础设施的信息,例如从此处开始
依赖和通过互联网交换数据时,您不想暴露某些特定的内容(例如 MySQL)。
XML 另一方面,当您需要时,作为通用文本标记语言是理想的选择
在系统之间进行接口和交换数据。 因此,它提供了一种连接 Google CSE 等服务的理想方式。 你不需要关心google要提供数据的具体实现,Google也不需要关心你用来操作数据的具体技术
MySQL is a specific SQL database engine. One not very suitable for providing the backend for the very very large dataset and special special needs that a search engine like google have.
I'm sure you can dig up info on how google's infrastructore, e.g. starting here
Relying on and exposing something specific like MySQL is not something you want to do when exchanging data over the internet.
XML on the other hand, being a general and textual markup language is ideal when you need
to interface and exchange data between systems. Thus it provides an ideal way to interface services such as Google CSE. You don't need to care about the specific implementation google have to provide the data, and Google don't need to care about the specific technology you use to manipulate the data
除了@Jared 之外,还有XML 数据库。 如果数据存储在 XML 中,则可以对其进行查询、动态转换为 html 或在应用程序中使用,而无需包装数据。
In addition to @Jared, there are XML databases. If the data is stored in XML, then it can be queried, transformed into html on the fly, or used in applications without the need for wrapping the data.
访问时间,因为在访问/开放端口上的 DOM 级别没有安全检查例程/-:
access time, because there is no security check routine in DOM level on the accesed/open port /-: