473,386 Members | 1,943 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Import XML data into SQL2000 - which method?

Hi all,

I am new to .NET but have a problem and see two possible directions i
could go, but i do not know which one to take.

Let me explain my problem, i have a webservice which recieves several
large(ish) XML data streams. An example of the XML data:

<asset name="test">
<inputDevice>
<mouse>
<caption>ps/2 compatible mouse</caption>
<numberOfButtons>2</numberOfButtons>
</mouse>
</inputDevice>
<drive>
<CDROMDrive>
<Drive>E:</Drive>
<manufacturer>Sony</manufacturer>
</CDROMDrive>
</drive>
...
...

the format of this xml document is not fixed, in that you cannot rely
on the existance of inputDevice\mouse\caption. ie the leaf nodes are
not pre-determined and fixed and all parents are dynamic.

I want to place this information in three tables:
- an Asset table (containing primarily the name attribute)

- a property table which would describe the structure of the xml
document and the node, e.g. "manufacturer" is a child of "CDRomDrive"
so the "manufacturer" would have a reference to the CDRomDrive record
in the table.

- a value table which would contain the text nodes and references to
their relevant property

SO......

I basically see two ways of getting this end result, i could either

A) In the webservice method which recieves the XML stream, i could use
an XMLStreamReader to make multiple parses of the XML stream, pulling
out Asset info, Properties and finally the values.

B) When the webservice method recieves the XML stream, write this into
a temporary table on SQL2000 and then fire a stored procedure using
OPENXML to pull out all the relevant info.

C) Something much better i do not know about.

SO......

Which of the above routes are going to be the most easy or efficient
way of getting this info into the Database without locking up my web
service.

thanks very much in advance

Gav
Nov 12 '05 #1
0 1417

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: DebbieD | last post by:
Greetings, This seems a very complicated task, so I welcome any input. My boss wants a data grid or matrix of the top 6 orders with ordered items, and products, for a particular customer and...
1
by: Jep | last post by:
I have to setup some scheduled tasks to copy 3-4 tables from an SQL2000 database to DB2 v. 8.1. The job must run every night replacing all data. How can this be done - with standard...
2
by: Serdar Yegulalp | last post by:
I'm in the process of migrating a lot of data (millions of rows, 4GB+ of data) from an older SQL Server 7.0 database to a new SQL Server 2000 machine. Time is not of the essence; my main concern...
3
by: Michael Persaud | last post by:
HI, I have a xml file and would like to import its contents into a table in SQl2000 can some one say how? it has to insert multiple records Thanks MP
4
by: Steve Jorgensen | last post by:
I'm restarting this thread with a different focus. The project I'm working on now id coming along and will be made to work, and it's too late to start over with a new strategy. Still, I'm not...
1
by: Byron | last post by:
Hi, I have(had) an old Win2k Server server with about 30 web site databases (SQL 2000) that just went under due to hardware problems. Thankfully, I have backups of all the databases plus the MDF...
0
by: geronimi | last post by:
On http://www.lierse.be/VB6bitmap.zip is a dat file (from an image field in SQL2000), it is a bitmap file, in an old VB6 programma that image is used and visible. So it is valid data. Problem: no...
0
by: Bxitty | last post by:
I have a package that works great when I run it from the SQL2000 environment. This job transfers data from SQl2005 table to a mainframe DB2 table. After I migrated the job to SQL2005 and ran...
2
by: WP | last post by:
Hello, I've just started to work with DB2 (using the express edition version 9.5 under windows vista) and I'm accessing it through a java program (my java's very rusty). The java program loads the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.