Comparison of advantages and disadvantages of XML and databases

Source: Internet
Author: User

For large-scale data retrieval, we recommend that you use databases such

Because the XML file is a text file, I will not talk about the efficiency of reading text files, but the XML

It is also advantageous. For example, we can use its features to distribute the pressure on the database, just like the most typical

It's csdn. Why does csdn need to use XML? It requires partial pressure, and the database is no longer needed to read the data.

So if you want to do this, you need to clearly identify the advantages and disadvantages of XML, and try to avoid the disadvantages and take advantage of the advantages.

Let's take csdn as an example.

For traditional websites, go to the page Name> XXX. asp? Id = 123

Read ID information, select * from table where id = xxx

Show the content, and finally generate the page, right?

While not Rs. EOF
Wend uses a data structure similar to the VB language. I think everyone can understand it.

If it's XML, it's okay to directly display it.

I want to see that you have doubts. What is the difference with htm ??

Obviously, XML is structured. You only need to add the appendchild information to it.

But what about htm? There is no such save, and there is no such good structure.

To sum up, XML makes up for the lack of text files and databases (the lack of databases refers to the massive reading and reading of databases)

Of course, the XML deficiency is also mentioned above. If you only use XML without a database, the efficiency will certainly be devastating * ^_^ *

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.