使用XML和MySQL数据库的区别在哪里?我应该使用哪个? [英] Where are the differences using XML and MySQL database? Which should I use?

查看:490
本文介绍了使用XML和MySQL数据库的区别在哪里?我应该使用哪个?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗯,我知道它有点蠢。如果我想存储大量的数据。我应该使用xml还是数据库(mysql)?



为什么选择一个?



是使用xml的利弊?



使用mysql的优点和缺点是什么?



Clubpenguin,habbo MySQL(或SQL Server,Oracle,DB2等)的虚拟世界正在使用xml或mysql?

解决方案

是数据库引擎:它们是为数据存储和处理而构建的特定应用程序,并且非常擅长这样做;



XML文件只是存储在您的机器或其他机器上的文本文件;他们需要被读取,解析和写入,只有你的程序可以做到这一点。他们也真的,真的低效,因为他们的文本性质:阅读和解析一个文本文件是非常缓慢,修改它更糟。



XML文件适用于存储配置设置和在不同系统之间传递数据,但数据存储和处理肯定应在合适的DBMS中。



此外,强制性Joel Spolsky参考资料


Well, I know its a bit stupid. If I want to store a large amount of data. Should I use xml or database(mysql)?

Why do you choose (that) one?

What are the pros and cons using xml?

What are the pros and cons using mysql?

Clubpenguin, habbo hotel, those virtual worlds are using xml or mysql??

解决方案

MySQL (or SQL Server, Oracle, DB2, etc.) are database engines: they're specific applications that were built for data storage and processing, and are very good at doing that; they also can run on a different server than the one where your main program is, allowing for load sharing.

XML files are just text files stored on your machine or another one; they need to be read, parsed and written to, and only your program can do that. They'are also really, really inefficient, because of their text nature: reading and parsing a text file is very slow, and modifying it is even worse.

XML files are good for storing configuration settings and passing data between different systems, but data storage and processing should definitely live in a proper DBMS.

Also, obligatory Joel Spolsky reference.

这篇关于使用XML和MySQL数据库的区别在哪里?我应该使用哪个?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆