Thread: XML and database ??

  1. #1
    Registered User
    Join Date
    Apr 2002
    Posts
    37

    XML and database ??

    My goodness I have a debate soon about how " XML database should and will replace traditional database " !

    And we 're on the positive side ... but personally I don 't even agree with that ! That 's like saying, plane and car will replace train !!

    But the main problem is I 'm clueless about XML and database, like Native XML database and all that !. Trying really hard to research but too much new infọ is being thrown at mẹ.. m totally lost people !

    So if anyone 's familiar with XML being used as a database and the advantages of it , please help out , probably just to point me in the right direction of where to start putting this debate together, thanx

  2. #2
    PC Fixer-Upper Waldo2k2's Avatar
    Join Date
    May 2002
    Posts
    2,001
    I see only one advantage of XML db over any other database, and that's the ease in which it can be translated into a web page. There is a time saving factor when using XSL stylesheets with some sort of server side language to dish out info in the form of web pages. If we're talking just storage, or transmission of data across networks not to a client, then xml is bad. The reason for that is that it's bloated data, sure it describes itself but for what purpose? XML is a pipe dream, the original purposes for it's development will never come to light because of it's bloatedness. I recommend an SQL db, it can even rival the server to client speed that an xml db has when used with php, which can parse SQL db's quickly and format the output to a web page easily. It's also much much less bloated, making it better for server to server transmission.

    Anything else?
    PHP and XML
    Let's talk about SAX

  3. #3
    Registered User
    Join Date
    Apr 2002
    Posts
    37

    huhuhu

    We're gonna get our asses kicked on this debate ! =)

  4. #4
    5|-|1+|-|34|) ober's Avatar
    Join Date
    Aug 2001
    Posts
    4,429
    Umm... maybe I'm way off on this one, but XML is a markup language, it cannot and to my knowledge never has been used as a DB... it is simply a vehicle for retrieving and displaying information, it cannot store it.

  5. #5
    PC Fixer-Upper Waldo2k2's Avatar
    Join Date
    May 2002
    Posts
    2,001
    Well it can be used as a DB. See, XML files can be as big as you want, holding as much information as you want, but the rule is they have to be very very structured, and describe all their data. Basically, you could make:
    Code:
    <customers>
         <customer name="Bob Roberts">
              <phone number="5554567" />
         </customer>
    </customers>
    essentially you could put all your customers (or whatever data you need) in that XML file. Then you can use a simple C or Java app to parse everything out (ie: Xerces).

    So yes and no Ober on whether it can be used as a DB. It can be used to work like a DB, but not in the traditional sense.

    and BTW XSL and other sister languages do the retrieving and displaying, XML just describes.
    PHP and XML
    Let's talk about SAX

  6. #6
    5|-|1+|-|34|) ober's Avatar
    Join Date
    Aug 2001
    Posts
    4,429
    yeah, but how f-ing inefficient would it be to hold all your information in an XML file? Talk about slow search times...

  7. #7
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    >>So yes and no Ober on whether it can be used as a DB. It can be used to work like a DB, but not in the traditional sense.


    Not even in a productive sense.

  8. #8
    Registered User
    Join Date
    Apr 2002
    Posts
    37

    Talk about a biased topic !

    Waldo2k2 - so are you saying if we want to store 30 customers, we have to manually type 30 of these into a XML file ?

    Code:
    <customers>
         <customer name="Bob Roberts">
              <phone number="5554567" />
         </customer>
    </customers>
    omg, I'm definitely on the wrong team but we were assigned that topic anyway, no choice !!

    Displaying, searching and all that is all good but the question is .... user definitely CANT write to a XML database right ?

  9. #9
    PC Fixer-Upper Waldo2k2's Avatar
    Join Date
    May 2002
    Posts
    2,001
    no no no mellissa, you're thinking too much like a user and not a programmer.
    See, you wouldn't have to manually type all that in. The user enters their information in some sort of form (either in a web page or through a program) and the program or web script writes to the file. Simply done, i've done it, it's no different than writing to any other text file. It can be done, but i don't see the point of using xml database, im assuming you wanted to pick it up simply because it's one of the new buzzwords, am I right?
    PHP and XML
    Let's talk about SAX

  10. #10
    Registered User TravisS's Avatar
    Join Date
    Jun 2002
    Posts
    536

    Re: Talk about a biased topic !

    Originally posted by mellisa
    Waldo2k2 - so are you saying if we want to store 30 customers, we have to manually type 30 of these into a XML file ?

    Code:
    <customers>
         <customer name="Bob Roberts">
              <phone number="5554567" />
         </customer>
    </customers>
    omg, I'm definitely on the wrong team but we were assigned that topic anyway, no choice !!

    Displaying, searching and all that is all good but the question is .... user definitely CANT write to a XML database right ?
    Waldo already explained the way it would work in the real world, but if you were doing "backend" type work on this "database" there would be a little less work. And by a little, I mean very little.

    Code:
    <customers>
         <customer name="Bob Roberts">
              <phone number="5554567" />
         </customer>
         <customer name="Jack Black">
              <phone number="5559427" />
         </customer>
         <customer name="Nora Gree">
              <phone number="5551234" />
         </customer>
    </customers>
    Would be an example of the way the database would go. It's kinds ugly, but really it makes sense. I wouldn't find this be be an efficient or practical database though. Though I haven't started yet, I'm probably going to make a web-centric database. Basically, nearly every function of a standard database function will be implemented. You can add a table, add referential integreties, delete stuff, so on and so forth all over the internet on a webpage.

    Now, while this isn't going to be restrictive over the type of database, I just can't imaging using XML for a database. I mean, sure it would work, I think, but there is just SO many abilities that standard databases and SQL already have by default that I just can't imagine XML having without a lot of extra work.

    Good luck, but I don't think there's any good strong reason that XML would be the better choice. Argue the fact that it's self descriptive and very easily web based as much as you can

  11. #11
    Registered User
    Join Date
    Apr 2002
    Posts
    37

    hmmm...

    .....
    Last edited by mellisa; 03-30-2003 at 02:25 AM.

  12. #12
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    >>> was meant to be in my other post

    And now it is!
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  13. #13
    Registered User
    Join Date
    Apr 2002
    Posts
    37

    hmmm...

    Waldo2k2

    I didn't pick it , it's one the debate topics I HAVE TO DO ! I guess I'm very new to XML ... so please correct me if I'm wrong (something you've done quite well )


    XML database provides:

    - Storage (xml document)
    - Schemas (DTDs)
    - Query languages (XQuery, XPath - this includes: write to, display, sort, update? )


    TravisS

    I've done a web-based database already and I definitely agree that traditional database makes heaps more sense and we're going crazy over this stupid debate because first of all ... I don't even AGREE with it and the worst is ... I am so new to XML ... urghh.

    I am TRYING to dig out as many XML's database ADVANTAGES as possible so we have some sortta chance of staying alive through this debate !

    BUT so far, all I can see you guys doing is listing its DISADVANTAGES !

  14. #14
    Registered User TravisS's Avatar
    Join Date
    Jun 2002
    Posts
    536

    Re: hmmm...

    Originally posted by mellisa

    I am TRYING to dig out as many XML's database ADVANTAGES as possible so we have some sortta chance of staying alive through this debate !

    BUT so far, all I can see you guys doing is listing its DISADVANTAGES !
    LOL, sorry The big things about XML is of course the self-descriptive datatypes and seperation of data and interface.

    I suppose those would both be a little bit of an advantage in a database, but wouldn't you say a standard Access database already has these features? I would.

    http://www.fawcette.com/xmlmag/2002_...on/default.asp
    http://www.rpbourret.com/xml/XMLData...mlanddatabases

    Those are just two links that have pretty good information. You probably already have them, but if you don't, they're pretty descriptive

  15. #15
    Registered User
    Join Date
    Apr 2002
    Posts
    37

    aww thanx

    that's more like it hehe, people should follow your example and start contributing more resources

    Seriously thanx alot, the 2nd one I've already got but the first one is REALLY useful, thanx again.... (though we'll still lose )

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Bulk XML Insert
    By echorev in forum C# Programming
    Replies: 0
    Last Post: 11-23-2006, 06:03 AM
  2. Replies: 1
    Last Post: 03-21-2006, 07:52 AM
  3. Replies: 2
    Last Post: 03-03-2004, 07:25 PM
  4. A new project..
    By vasanth in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 08-12-2003, 08:16 AM