Sign In/My Account | View Cart  
advertisement

Article:
 Storing XML in Relational Databases
Subject: Importing a Data Array from XML to DB
Date: 2005-11-10 18:25:41
From: bdrudolph

I have a data collection box that outputs the data gathered in an XML format similar to the following:


<data>
<temp meas_id="Inlet" timestamp="11/10/05 19:00">100 150 200 250 300 350 400 450 500
</temp>


<temp meas_id="Outlet" timestamp="11/10/05 19:00">1000 1500 2000 2500 3000 3500 4000 4500 5000
</temp
</data>


As you can see the data resides at the element level but the attributes define the data. I am fairly new to XML and tranformations and can not figure out how import the data. I am using MS Access which I realize isn't a particulary powerful DB but it is the only DB at my disposal. My manager will not provide funding for software development thus a lowly Process Engineer is trying to do the development. Any input, comments, or help is greatly appreciated in advance.


Brad


Previous Message Previous Message   Next Message Next Message


Titles Only Titles Only Newest First
  • Importing a Data Array from XML to DB
    2005-11-10 18:28:03 bdrudolph

    I am going to reply to myself as I thought of additional information to provide. I have been able to import either the element data or the attribute data but not both together. Do I need to take a multi step approach to tearing the XML apart and then restructuring it? Again thanks in advance for any advice.


    Brad

    • Importing a Data Array from XML to DB
      2005-12-04 11:14:16 Igor Dayen

      One thing you may consider is to use XSLT to transform attributes into relevant element-based representation.

      • Storing .xml files into database
        2007-08-21 04:01:35 santoshlocuz

        hello dear,
        i created tree by using dom and 3xml files, i didnt used database interaction for retriving the data. i just simply uses my xml files .but i need to store these xml files in MY SQl database.? how?

      • Importing a Data Array from XML to DB
        2007-08-21 04:00:59 santoshlocuz

        hello dear,
        i created tree by using dom and 3xml files, i didnt used database interaction for retriving the data. i just simply uses my xml files .but i need to store these xml files in MY SQl database.? how?

        • Importing a Data Array from XML to DB
          2007-08-21 19:26:35 Igor Dayen

          You may consider:


          (a) using CLOBS if processing XML within a database is not significant; database is used as a storage and XML processing is delegated to application code;
          (b) using stored procedures as it suggested in http://rpbouman.blogspot.com/2006/03/importing-xml-data-into-mysql-using.html.



          MySQL team is considering to add XMLType support in future, see:
          http://forums.mysql.com/read.php?44,155525,157883#msg-157883


          Thank you.





Sponsored By: