SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    <C²: web standards /> cybercodeur's Avatar
    Join Date
    Dec 2001
    Location
    Montréal
    Posts
    729
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question XML compares to databases?

    I have read in an article on alistapart.com that XML would be better compared to Databases than to HTML. Though I've read the article twice, I still can't figure out why (probably because I know next to nothing to both XML and Databases). Can anyone explain me how it is so?

    Please???
    Denis Boudreau <C²/> - Web Standards & Accessibility
    [+] ICQ number: 115649885 || Email: denis@cybercodeur.net
    [+] Daily Weblog on Web standards and accessibility : CYBERcodeur.net

  2. #2
    Wanna-be Apple nut silver trophy M. Johansson's Avatar
    Join Date
    Sep 2000
    Location
    Halmstad, Sweden
    Posts
    7,400
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Eeh... I'm not an expert on XML, but...

    XML is not a storage device - it's a way of defining content. If you use it to store stuff (like databases do) it's practically the same thing as storing it in a text file.
    Mattias Johansson
    Short, Swedish, Web Developer

    Buttons and Dog Tags with your custom design:
    FatStatement.com

  3. #3
    The doctor is in... silver trophy MarcusJT's Avatar
    Join Date
    Jan 2002
    Location
    London
    Posts
    3,509
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    HTML and XML share a common ancestry - they are both subsets of SGML - but they have completely different purposes.

    The point of XML is to provide a self-documenting, human-readable, cross-platform way of storing data (not presentation), and so it probably is best compared with databases. In contrast, the emphasis of modern HTML is on presentation, not data/content - although this is not how Tim Berners-Lee, creator of the WWW originally intended it to be used.

    blah blah blah....I won't go on.....!!!

    Read up here:
    http://www.w3.org/XML/1999/XML-in-10-points
    http://www.xml101.com


    M@rco
    Last edited by M@rco; Jan 21, 2002 at 15:32.

  4. #4
    SitePoint Addict TegSkywalker's Avatar
    Join Date
    Nov 2001
    Location
    USA
    Posts
    214
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I see no use for XML as a database solution, cuz if I need a database I can use PHP and MySQL. Its basically the same as storing your info in a text file or an Access file on your webserver

    I would rather use XML for having a program interact with a webserver. Other than that, I dont see a use for it yet.

  5. #5
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Location
    Lancaster, Ca. USA
    Posts
    12,305
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    SQL is a query language. It allows you to store many similar records and sort through them quickly. This will be how more and more data will be stored in the future.

    XML is a data markup language. When used properly it can be used to transfer data between two computers in a language readable by both computers yet still understandable by humans. This will be how the webserver and other devices access the data in the future.

    HTML is a display markup language. It is designed to take information and make it presentable to humans. However when you make it readable to humans, the computer cannot read it. This under XHTML will continue to be the way it is displayed to people in the future.

    All three serve their part.

    Common uses of XML today include RSS which enables you to get newsfeeds on your site from many companies like Moreover.com. You then transform this XML into a presentable format like HTML so people can read it.

    In the future XML will make it easier to share data among sites and other computer systems where there doesn't have to be human involvement. It will also be able to create meta-databanks for searching. Just like today's meta-search engines, if retail sites settle on a XML schema to describe their products in the future you will be able to search hundreds if not thousands of shoe stores for all "Size 9 Extra Wide Nikes" and sort it by price. You can then choose the one best for you. With XML this is easy, without it is a lot more difficult and requires multiple databases of information.

    Combine these technologies together and with Databinding (in the browser) and you can create comprehensive applications that will actually make it easier to shop online. Just imagine if you ran your own eStore and could offer competitor's prices using their own databases and available XML files?
    Wayne Luke
    ------------


  6. #6
    SitePoint Member
    Join Date
    Jan 2002
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question

    Hi,

    It is slower to seach a XML file? Since it is a text file, has to read line by line?
    (new to xml)

    Thanks.

  7. #7
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Location
    Lancaster, Ca. USA
    Posts
    12,305
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Depends on the searching routine used.

    If you think about it, all a SQL database consists of is a bunch of text files stored in binary format with a separate index that allows you to point to the right data quickly.

    The whole point of XML is not to allow searching but to present data to multiple devices and allow the data to be displayed in a way the device can handle it. This means the same data can be shown in a web browser, on your PDA, your digital car radio, the printer and more without creating special pages for each device.
    Wayne Luke
    ------------



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •