SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Evangelist
    Join Date
    Dec 2003
    Location
    Arizona
    Posts
    411
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Storing XML in a RDBMS: document-centric versus data-centric

    I would like to know if anyone here is storing XML documents (including XSL stylesheets) in a relational database and what the tradeoffs are with storing XML this way versus using the filesystem.

    Thanks,

    JT

  2. #2
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by seratonin
    I would like to know if anyone here is storing XML documents (including XSL stylesheets) in a relational database and what the tradeoffs are with storing XML this way versus using the filesystem.

    Thanks,

    JT
    Storing XML documents is the same as any other form of document. Initially you validate all input before updating/inserting data, however you need to maintain the integrity(valid 'xml') of that document, to ensure that it can be parsed. With regard to that, I simply would not like to update a 100 xsl documents, on the FileSystem.

    Quote Originally Posted by www.sei.cmu.edu


    File sharing architecture (not a client/server architecture). The original PC networks were based on file sharing architectures, where the server downloads files from the shared location to the desktop environment. The requested user job is then run (including logic and data) in the desktop environment. File sharing architectures work if shared usage is low, update contention is low, and the volume of data to be transferred is low. In the 1990s, PC LAN (local area network) computing changed because the capacity of the file sharing was strained as the number of online user grew (it can only satisfy about 12 users simultaneously) and graphical user interfaces (GUIs) became popular (making mainframe and terminal displays appear out of date). PCs are now being used in client/server architectures [Schussel 96, Edelstein 94].

    Client/server architecture. As a result of the limitations of file sharing architectures, the client/server architecture emerged. This approach introduced a database server to replace the file server. Using a relational database management system (DBMS), user queries could be answered directly. The client/server architecture reduced network traffic by providing a query response rather than total file transfer. It improves multi-user updating through a GUI front end to a shared database. In client/server architectures, Remote Procedure Calls (RPCs) or standard query language (SQL) statements are typically used to communicate between the client and server [Schussel 96, Edelstein 94]. The remainder of this write-up provides examples of client/server architectures.
    [Client Server Architecture]
    Currently, www.ajohnstone.com is running from an XSLT stylesheet, but I haven't had the time to port it over to a database. As i've only spent half hour writing it.

  3. #3
    SitePoint Evangelist
    Join Date
    Dec 2003
    Location
    Arizona
    Posts
    411
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Unfortunately unless you use a native XML database, storing XML in an RDBMS makes searching relatively difficult unless you normalize the store across multiple tables. I'm thinking of extracting metadata from teh XML documents and storing that along with a URL to the document in the database to aid in searching. Does anyone else here have experience with this?

    Thanks,

    JT

  4. #4
    SitePoint Addict flyingpylon's Avatar
    Join Date
    Mar 2002
    Location
    Fishers, IN USA
    Posts
    256
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm currently developing a site that stores XML and XSLT in an RDBMS (SQL Server). Depending on the data in question though, some of it gets stored in a more traditional table.

    Basically, things that are requested and delivered whole, like stylesheets, are stored only as XML. If there is specific metadata needed to query for the whole XML document, then I store that metadata in separate fields.

    Then there is other relational data which just doesn't seem to fit with XML that well. That gets stored in regular relational tables, but I write queries that return the data as XML.


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
  •