473,388 Members | 1,400 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,388 software developers and data experts.

What is the best way to store XML file in MySQL?

Hi,

I would like to store XML files in MySQL. What is the best solution:

1. Convert it to string and store it as CLOB/text
2. Serialize it and store as byte array
3. Flatten it out and create one column per element, each column is VARCHAR

Does MySQL has anything special for XML data?
Is there any software which helps to store XML data in MySQL
more efficiently?

Thank you,

Jacob Nikom
Jul 19 '05 #1
12 7678
On 15 Feb 2004 07:34:00 -0800, in mailing.database.mysql
ja*********@ieee.org (jacob nikom) wrote:
| Hi,
|
| I would like to store XML files in MySQL. What is the best solution:
|
| 1. Convert it to string and store it as CLOB/text
| 2. Serialize it and store as byte array
| 3. Flatten it out and create one column per element, each column is VARCHAR
|
| Does MySQL has anything special for XML data?
| Is there any software which helps to store XML data in MySQL
| more efficiently?


You could do any of the above. It depends upon what you plan to do
with the XML data once it is in the database.
---------------------------------------------------------------
jn****@yourpantsbigpond.net.au : Remove your pants to reply
---------------------------------------------------------------
Jul 19 '05 #2
On 15 Feb 2004 07:34:00 -0800, in mailing.database.mysql
ja*********@ieee.org (jacob nikom) wrote:
| Hi,
|
| I would like to store XML files in MySQL. What is the best solution:
|
| 1. Convert it to string and store it as CLOB/text
| 2. Serialize it and store as byte array
| 3. Flatten it out and create one column per element, each column is VARCHAR
|
| Does MySQL has anything special for XML data?
| Is there any software which helps to store XML data in MySQL
| more efficiently?


You could do any of the above. It depends upon what you plan to do
with the XML data once it is in the database.
---------------------------------------------------------------
jn****@yourpantsbigpond.net.au : Remove your pants to reply
---------------------------------------------------------------
Jul 19 '05 #3
On 15 Feb 2004 07:34:00 -0800, in mailing.database.mysql
ja*********@ieee.org (jacob nikom) wrote:
| Hi,
|
| I would like to store XML files in MySQL. What is the best solution:
|
| 1. Convert it to string and store it as CLOB/text
| 2. Serialize it and store as byte array
| 3. Flatten it out and create one column per element, each column is VARCHAR
|
| Does MySQL has anything special for XML data?
| Is there any software which helps to store XML data in MySQL
| more efficiently?


You could do any of the above. It depends upon what you plan to do
with the XML data once it is in the database.
---------------------------------------------------------------
jn****@yourpantsbigpond.net.au : Remove your pants to reply
---------------------------------------------------------------
Jul 19 '05 #4
Heya Jacob -
If the file is less than 10 megabytes - I usually will store an xml file in
varchar without any conversion.
We are talking ascii text here [with a few exceptions] but mostly you should
be ok.
I take an entire xml file and store it in mysql utilizing remote views with
vfp, mapping a memo field in vfp to varchar in mysql, all slung via odbc and
connection strings.
No Hiccups, so far.
mondo regards [Bill]
--
William Sanders / Electronic Filing Group Remove the DOT BOB to reply via
email.
Mondo Cool TeleCom -> http://www.efgroup.net/efgcog.html
Mondo Cool WebHosting -> http://www.efgroup.net/efglunar.html
Mondo Cool Satellites -> http://www.efgroup.net/sat
mySql / VFP / MS-SQL

"jacob nikom" <ja*********@ieee.org> wrote in message
news:6e**************************@posting.google.c om...
Hi,

I would like to store XML files in MySQL. What is the best solution:

1. Convert it to string and store it as CLOB/text
2. Serialize it and store as byte array
3. Flatten it out and create one column per element, each column is VARCHAR
Does MySQL has anything special for XML data?
Is there any software which helps to store XML data in MySQL
more efficiently?

Thank you,

Jacob Nikom

Jul 19 '05 #5
Heya Jacob -
If the file is less than 10 megabytes - I usually will store an xml file in
varchar without any conversion.
We are talking ascii text here [with a few exceptions] but mostly you should
be ok.
I take an entire xml file and store it in mysql utilizing remote views with
vfp, mapping a memo field in vfp to varchar in mysql, all slung via odbc and
connection strings.
No Hiccups, so far.
mondo regards [Bill]
--
William Sanders / Electronic Filing Group Remove the DOT BOB to reply via
email.
Mondo Cool TeleCom -> http://www.efgroup.net/efgcog.html
Mondo Cool WebHosting -> http://www.efgroup.net/efglunar.html
Mondo Cool Satellites -> http://www.efgroup.net/sat
mySql / VFP / MS-SQL

"jacob nikom" <ja*********@ieee.org> wrote in message
news:6e**************************@posting.google.c om...
Hi,

I would like to store XML files in MySQL. What is the best solution:

1. Convert it to string and store it as CLOB/text
2. Serialize it and store as byte array
3. Flatten it out and create one column per element, each column is VARCHAR
Does MySQL has anything special for XML data?
Is there any software which helps to store XML data in MySQL
more efficiently?

Thank you,

Jacob Nikom

Jul 19 '05 #6
Heya Jacob -
If the file is less than 10 megabytes - I usually will store an xml file in
varchar without any conversion.
We are talking ascii text here [with a few exceptions] but mostly you should
be ok.
I take an entire xml file and store it in mysql utilizing remote views with
vfp, mapping a memo field in vfp to varchar in mysql, all slung via odbc and
connection strings.
No Hiccups, so far.
mondo regards [Bill]
--
William Sanders / Electronic Filing Group Remove the DOT BOB to reply via
email.
Mondo Cool TeleCom -> http://www.efgroup.net/efgcog.html
Mondo Cool WebHosting -> http://www.efgroup.net/efglunar.html
Mondo Cool Satellites -> http://www.efgroup.net/sat
mySql / VFP / MS-SQL

"jacob nikom" <ja*********@ieee.org> wrote in message
news:6e**************************@posting.google.c om...
Hi,

I would like to store XML files in MySQL. What is the best solution:

1. Convert it to string and store it as CLOB/text
2. Serialize it and store as byte array
3. Flatten it out and create one column per element, each column is VARCHAR
Does MySQL has anything special for XML data?
Is there any software which helps to store XML data in MySQL
more efficiently?

Thank you,

Jacob Nikom

Jul 19 '05 #7
Do you only store it or you do something with it. like searching,
viewing, etc?

Jacob Nikom

"swdev1" <ws**********@advmed.com> wrote in message news:<K3****************@newssvr23.news.prodigy.co m>...
Heya Jacob -
If the file is less than 10 megabytes - I usually will store an xml file in
varchar without any conversion.
We are talking ascii text here [with a few exceptions] but mostly you should
be ok.
I take an entire xml file and store it in mysql utilizing remote views with
vfp, mapping a memo field in vfp to varchar in mysql, all slung via odbc and
connection strings.
No Hiccups, so far.
mondo regards [Bill]
--
William Sanders / Electronic Filing Group Remove the DOT BOB to reply via
email.
Mondo Cool TeleCom -> http://www.efgroup.net/efgcog.html
Mondo Cool WebHosting -> http://www.efgroup.net/efglunar.html
Mondo Cool Satellites -> http://www.efgroup.net/sat
mySql / VFP / MS-SQL

"jacob nikom" <ja*********@ieee.org> wrote in message
news:6e**************************@posting.google.c om...
Hi,

I would like to store XML files in MySQL. What is the best solution:

1. Convert it to string and store it as CLOB/text
2. Serialize it and store as byte array
3. Flatten it out and create one column per element, each column is

VARCHAR

Does MySQL has anything special for XML data?
Is there any software which helps to store XML data in MySQL
more efficiently?

Thank you,

Jacob Nikom

Jul 19 '05 #8
Do you only store it or you do something with it. like searching,
viewing, etc?

Jacob Nikom

"swdev1" <ws**********@advmed.com> wrote in message news:<K3****************@newssvr23.news.prodigy.co m>...
Heya Jacob -
If the file is less than 10 megabytes - I usually will store an xml file in
varchar without any conversion.
We are talking ascii text here [with a few exceptions] but mostly you should
be ok.
I take an entire xml file and store it in mysql utilizing remote views with
vfp, mapping a memo field in vfp to varchar in mysql, all slung via odbc and
connection strings.
No Hiccups, so far.
mondo regards [Bill]
--
William Sanders / Electronic Filing Group Remove the DOT BOB to reply via
email.
Mondo Cool TeleCom -> http://www.efgroup.net/efgcog.html
Mondo Cool WebHosting -> http://www.efgroup.net/efglunar.html
Mondo Cool Satellites -> http://www.efgroup.net/sat
mySql / VFP / MS-SQL

"jacob nikom" <ja*********@ieee.org> wrote in message
news:6e**************************@posting.google.c om...
Hi,

I would like to store XML files in MySQL. What is the best solution:

1. Convert it to string and store it as CLOB/text
2. Serialize it and store as byte array
3. Flatten it out and create one column per element, each column is

VARCHAR

Does MySQL has anything special for XML data?
Is there any software which helps to store XML data in MySQL
more efficiently?

Thank you,

Jacob Nikom

Jul 19 '05 #9
Do you only store it or you do something with it. like searching,
viewing, etc?

Jacob Nikom

"swdev1" <ws**********@advmed.com> wrote in message news:<K3****************@newssvr23.news.prodigy.co m>...
Heya Jacob -
If the file is less than 10 megabytes - I usually will store an xml file in
varchar without any conversion.
We are talking ascii text here [with a few exceptions] but mostly you should
be ok.
I take an entire xml file and store it in mysql utilizing remote views with
vfp, mapping a memo field in vfp to varchar in mysql, all slung via odbc and
connection strings.
No Hiccups, so far.
mondo regards [Bill]
--
William Sanders / Electronic Filing Group Remove the DOT BOB to reply via
email.
Mondo Cool TeleCom -> http://www.efgroup.net/efgcog.html
Mondo Cool WebHosting -> http://www.efgroup.net/efglunar.html
Mondo Cool Satellites -> http://www.efgroup.net/sat
mySql / VFP / MS-SQL

"jacob nikom" <ja*********@ieee.org> wrote in message
news:6e**************************@posting.google.c om...
Hi,

I would like to store XML files in MySQL. What is the best solution:

1. Convert it to string and store it as CLOB/text
2. Serialize it and store as byte array
3. Flatten it out and create one column per element, each column is

VARCHAR

Does MySQL has anything special for XML data?
Is there any software which helps to store XML data in MySQL
more efficiently?

Thank you,

Jacob Nikom

Jul 19 '05 #10
Hullo Jakob ..
I store it there because I want to parse it later .

When I parse it ? I use VFP to parse it ...

I assume at some point you will want to parse it, get the table and column
names and associated column values, and somehow recreate a table based on
the original xml file.

For that kinda work ? I only use mySql to STORE the xml file - not to parse
it and not to re-create the original table sets and data sets from the xml
file.

I understand [in passing] that there are php libraries to parse the xml
file - but I am a VFP geek and I prefer string parsing with VFP.

Usually when I have to parse its a file to be read for orders or catalog
entries , and has to feed different database systems [mySql, Oracle, ms-sql,
VFP] and I also prefer the feeding methods available to me in VFP. But I
digress - at this point ? Is purely my own personal choice based on
automation and coding time for same.

You can check it out as well - got the Visual Studio 6 Enterprise Edition CD
SET ? Pop in CD 1, and install VFP on your wintel boxen .

hth - mondo regards [Bill]

--
William Sanders / Electronic Filing Group Remove the DOT BOB to reply via
email.
Mondo Cool TeleCom -> http://www.efgroup.net/efgcog.html
Mondo Cool WebHosting -> http://www.efgroup.net/efglunar.html
Mondo Cool Satellites -> http://www.efgroup.net/sat
mySql / VFP / MS-SQL

"jacob nikom" <ja*********@ieee.org> wrote in message
news:6e**************************@posting.google.c om...
Do you only store it or you do something with it. like searching,
viewing, etc?

Jacob Nikom

"swdev1" <ws**********@advmed.com> wrote in message

news:<K3****************@newssvr23.news.prodigy.co m>...
Heya Jacob -
If the file is less than 10 megabytes - I usually will store an xml file in varchar without any conversion.
We are talking ascii text here [with a few exceptions] but mostly you should be ok.
I take an entire xml file and store it in mysql utilizing remote views with vfp, mapping a memo field in vfp to varchar in mysql, all slung via odbc and connection strings.
No Hiccups, so far.
mondo regards [Bill]
--
William Sanders / Electronic Filing Group Remove the DOT BOB to reply via email.
Mondo Cool TeleCom -> http://www.efgroup.net/efgcog.html
Mondo Cool WebHosting -> http://www.efgroup.net/efglunar.html
Mondo Cool Satellites -> http://www.efgroup.net/sat
mySql / VFP / MS-SQL

"jacob nikom" <ja*********@ieee.org> wrote in message
news:6e**************************@posting.google.c om...
Hi,

I would like to store XML files in MySQL. What is the best solution:

1. Convert it to string and store it as CLOB/text
2. Serialize it and store as byte array
3. Flatten it out and create one column per element, each column is

VARCHAR

Does MySQL has anything special for XML data?
Is there any software which helps to store XML data in MySQL
more efficiently?

Thank you,

Jacob Nikom

Jul 19 '05 #11
Hullo Jakob ..
I store it there because I want to parse it later .

When I parse it ? I use VFP to parse it ...

I assume at some point you will want to parse it, get the table and column
names and associated column values, and somehow recreate a table based on
the original xml file.

For that kinda work ? I only use mySql to STORE the xml file - not to parse
it and not to re-create the original table sets and data sets from the xml
file.

I understand [in passing] that there are php libraries to parse the xml
file - but I am a VFP geek and I prefer string parsing with VFP.

Usually when I have to parse its a file to be read for orders or catalog
entries , and has to feed different database systems [mySql, Oracle, ms-sql,
VFP] and I also prefer the feeding methods available to me in VFP. But I
digress - at this point ? Is purely my own personal choice based on
automation and coding time for same.

You can check it out as well - got the Visual Studio 6 Enterprise Edition CD
SET ? Pop in CD 1, and install VFP on your wintel boxen .

hth - mondo regards [Bill]

--
William Sanders / Electronic Filing Group Remove the DOT BOB to reply via
email.
Mondo Cool TeleCom -> http://www.efgroup.net/efgcog.html
Mondo Cool WebHosting -> http://www.efgroup.net/efglunar.html
Mondo Cool Satellites -> http://www.efgroup.net/sat
mySql / VFP / MS-SQL

"jacob nikom" <ja*********@ieee.org> wrote in message
news:6e**************************@posting.google.c om...
Do you only store it or you do something with it. like searching,
viewing, etc?

Jacob Nikom

"swdev1" <ws**********@advmed.com> wrote in message

news:<K3****************@newssvr23.news.prodigy.co m>...
Heya Jacob -
If the file is less than 10 megabytes - I usually will store an xml file in varchar without any conversion.
We are talking ascii text here [with a few exceptions] but mostly you should be ok.
I take an entire xml file and store it in mysql utilizing remote views with vfp, mapping a memo field in vfp to varchar in mysql, all slung via odbc and connection strings.
No Hiccups, so far.
mondo regards [Bill]
--
William Sanders / Electronic Filing Group Remove the DOT BOB to reply via email.
Mondo Cool TeleCom -> http://www.efgroup.net/efgcog.html
Mondo Cool WebHosting -> http://www.efgroup.net/efglunar.html
Mondo Cool Satellites -> http://www.efgroup.net/sat
mySql / VFP / MS-SQL

"jacob nikom" <ja*********@ieee.org> wrote in message
news:6e**************************@posting.google.c om...
Hi,

I would like to store XML files in MySQL. What is the best solution:

1. Convert it to string and store it as CLOB/text
2. Serialize it and store as byte array
3. Flatten it out and create one column per element, each column is

VARCHAR

Does MySQL has anything special for XML data?
Is there any software which helps to store XML data in MySQL
more efficiently?

Thank you,

Jacob Nikom

Jul 19 '05 #12
Hullo Jakob ..
I store it there because I want to parse it later .

When I parse it ? I use VFP to parse it ...

I assume at some point you will want to parse it, get the table and column
names and associated column values, and somehow recreate a table based on
the original xml file.

For that kinda work ? I only use mySql to STORE the xml file - not to parse
it and not to re-create the original table sets and data sets from the xml
file.

I understand [in passing] that there are php libraries to parse the xml
file - but I am a VFP geek and I prefer string parsing with VFP.

Usually when I have to parse its a file to be read for orders or catalog
entries , and has to feed different database systems [mySql, Oracle, ms-sql,
VFP] and I also prefer the feeding methods available to me in VFP. But I
digress - at this point ? Is purely my own personal choice based on
automation and coding time for same.

You can check it out as well - got the Visual Studio 6 Enterprise Edition CD
SET ? Pop in CD 1, and install VFP on your wintel boxen .

hth - mondo regards [Bill]

--
William Sanders / Electronic Filing Group Remove the DOT BOB to reply via
email.
Mondo Cool TeleCom -> http://www.efgroup.net/efgcog.html
Mondo Cool WebHosting -> http://www.efgroup.net/efglunar.html
Mondo Cool Satellites -> http://www.efgroup.net/sat
mySql / VFP / MS-SQL

"jacob nikom" <ja*********@ieee.org> wrote in message
news:6e**************************@posting.google.c om...
Do you only store it or you do something with it. like searching,
viewing, etc?

Jacob Nikom

"swdev1" <ws**********@advmed.com> wrote in message

news:<K3****************@newssvr23.news.prodigy.co m>...
Heya Jacob -
If the file is less than 10 megabytes - I usually will store an xml file in varchar without any conversion.
We are talking ascii text here [with a few exceptions] but mostly you should be ok.
I take an entire xml file and store it in mysql utilizing remote views with vfp, mapping a memo field in vfp to varchar in mysql, all slung via odbc and connection strings.
No Hiccups, so far.
mondo regards [Bill]
--
William Sanders / Electronic Filing Group Remove the DOT BOB to reply via email.
Mondo Cool TeleCom -> http://www.efgroup.net/efgcog.html
Mondo Cool WebHosting -> http://www.efgroup.net/efglunar.html
Mondo Cool Satellites -> http://www.efgroup.net/sat
mySql / VFP / MS-SQL

"jacob nikom" <ja*********@ieee.org> wrote in message
news:6e**************************@posting.google.c om...
Hi,

I would like to store XML files in MySQL. What is the best solution:

1. Convert it to string and store it as CLOB/text
2. Serialize it and store as byte array
3. Flatten it out and create one column per element, each column is

VARCHAR

Does MySQL has anything special for XML data?
Is there any software which helps to store XML data in MySQL
more efficiently?

Thank you,

Jacob Nikom

Jul 19 '05 #13

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

Similar topics

92
by: Reed L. O'Brien | last post by:
I see rotor was removed for 2.4 and the docs say use an AES module provided separately... Is there a standard module that works alike or an AES module that works alike but with better encryption?...
125
by: Sarah Tanembaum | last post by:
Beside its an opensource and supported by community, what's the fundamental differences between PostgreSQL and those high-price commercial database (and some are bloated such as Oracle) from...
4
by: Sean | last post by:
I'm a self taught PHP, MySQL developer with a little knowledge of javascript... Looking to add some more knowledge to my resume. What is XML, and what can it do for me? What are it's main...
1
by: siliconmike | last post by:
I'm starting to learn Visual Basic. My aim is to develop a small downloadable application that can store and display contacts. It has to be small (say 2 mb footprint?). Q - First, will Visual...
39
by: windandwaves | last post by:
Hi Folk I have to store up to eight boolean bits of information about an item in my database. e.g. with restaurant drive-through facility yellow windows
5
by: lawrence k | last post by:
I'm a little weak on my basic I/O. Help me out please. Is it right to say that I can just open any file with file(), get it as a string, and then store in a MySql database, in, say, a MediumText...
5
by: Ryan Liu | last post by:
I have an application need export ane import data of projects. There are about 10 database tables releated to one project. 3 of them each could have up to 100K lines data. I can export all data...
7
by: mukeshpatil | last post by:
How to get data from .CSV file using php & store it into Mysql database I want to read data from two different .CSV files using php & How to store it into Mysql Database tables Please help me...
4
Dormilich
by: Dormilich | last post by:
Hi, short: I want to figure out which construct is best suited to store nested values in a template class. background: For my website, I have a template class, that provides my output class...
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: 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
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.