Connecting Tech Pros Worldwide Help | Site Map

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

jacob nikom
Guest
 
Posts: n/a
#1: Jul 20 '05
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
Jeff North
Guest
 
Posts: n/a
#2: Jul 20 '05

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


On 15 Feb 2004 07:34:00 -0800, in mailing.database.mysql
jacob_nikom@ieee.org (jacob nikom) wrote:
[color=blue]
>| 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?[/color]

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.
---------------------------------------------------------------
jnorth@yourpantsbigpond.net.au : Remove your pants to reply
---------------------------------------------------------------
Jeff North
Guest
 
Posts: n/a
#3: Jul 20 '05

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


On 15 Feb 2004 07:34:00 -0800, in mailing.database.mysql
jacob_nikom@ieee.org (jacob nikom) wrote:
[color=blue]
>| 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?[/color]

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.
---------------------------------------------------------------
jnorth@yourpantsbigpond.net.au : Remove your pants to reply
---------------------------------------------------------------
Jeff North
Guest
 
Posts: n/a
#4: Jul 20 '05

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


On 15 Feb 2004 07:34:00 -0800, in mailing.database.mysql
jacob_nikom@ieee.org (jacob nikom) wrote:
[color=blue]
>| 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?[/color]

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.
---------------------------------------------------------------
jnorth@yourpantsbigpond.net.au : Remove your pants to reply
---------------------------------------------------------------
swdev1
Guest
 
Posts: n/a
#5: Jul 20 '05

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


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" <jacob_nikom@ieee.org> wrote in message
news:6eebd424.0402150734.3fbaf262@posting.google.c om...[color=blue]
> 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[/color]
VARCHAR[color=blue]
>
> 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[/color]


swdev1
Guest
 
Posts: n/a
#6: Jul 20 '05

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


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" <jacob_nikom@ieee.org> wrote in message
news:6eebd424.0402150734.3fbaf262@posting.google.c om...[color=blue]
> 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[/color]
VARCHAR[color=blue]
>
> 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[/color]


swdev1
Guest
 
Posts: n/a
#7: Jul 20 '05

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


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" <jacob_nikom@ieee.org> wrote in message
news:6eebd424.0402150734.3fbaf262@posting.google.c om...[color=blue]
> 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[/color]
VARCHAR[color=blue]
>
> 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[/color]


jacob nikom
Guest
 
Posts: n/a
#8: Jul 20 '05

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


Do you only store it or you do something with it. like searching,
viewing, etc?

Jacob Nikom

"swdev1" <wsanders.bob@advmed.com> wrote in message news:<K3hYb.3890$O84.526@newssvr23.news.prodigy.co m>...[color=blue]
> 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" <jacob_nikom@ieee.org> wrote in message
> news:6eebd424.0402150734.3fbaf262@posting.google.c om...[color=green]
> > 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[/color]
> VARCHAR[color=green]
> >
> > 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[/color][/color]
jacob nikom
Guest
 
Posts: n/a
#9: Jul 20 '05

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


Do you only store it or you do something with it. like searching,
viewing, etc?

Jacob Nikom

"swdev1" <wsanders.bob@advmed.com> wrote in message news:<K3hYb.3890$O84.526@newssvr23.news.prodigy.co m>...[color=blue]
> 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" <jacob_nikom@ieee.org> wrote in message
> news:6eebd424.0402150734.3fbaf262@posting.google.c om...[color=green]
> > 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[/color]
> VARCHAR[color=green]
> >
> > 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[/color][/color]
jacob nikom
Guest
 
Posts: n/a
#10: Jul 20 '05

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


Do you only store it or you do something with it. like searching,
viewing, etc?

Jacob Nikom

"swdev1" <wsanders.bob@advmed.com> wrote in message news:<K3hYb.3890$O84.526@newssvr23.news.prodigy.co m>...[color=blue]
> 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" <jacob_nikom@ieee.org> wrote in message
> news:6eebd424.0402150734.3fbaf262@posting.google.c om...[color=green]
> > 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[/color]
> VARCHAR[color=green]
> >
> > 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[/color][/color]
swdev1
Guest
 
Posts: n/a
#11: Jul 20 '05

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


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" <jacob_nikom@ieee.org> wrote in message
news:6eebd424.0402170942.48a84032@posting.google.c om...[color=blue]
> Do you only store it or you do something with it. like searching,
> viewing, etc?
>
> Jacob Nikom
>
> "swdev1" <wsanders.bob@advmed.com> wrote in message[/color]
news:<K3hYb.3890$O84.526@newssvr23.news.prodigy.co m>...[color=blue][color=green]
> > Heya Jacob -
> > If the file is less than 10 megabytes - I usually will store an xml file[/color][/color]
in[color=blue][color=green]
> > varchar without any conversion.
> > We are talking ascii text here [with a few exceptions] but mostly you[/color][/color]
should[color=blue][color=green]
> > be ok.
> > I take an entire xml file and store it in mysql utilizing remote views[/color][/color]
with[color=blue][color=green]
> > vfp, mapping a memo field in vfp to varchar in mysql, all slung via odbc[/color][/color]
and[color=blue][color=green]
> > connection strings.
> > No Hiccups, so far.
> > mondo regards [Bill]
> > --
> > William Sanders / Electronic Filing Group Remove the DOT BOB to reply[/color][/color]
via[color=blue][color=green]
> > 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" <jacob_nikom@ieee.org> wrote in message
> > news:6eebd424.0402150734.3fbaf262@posting.google.c om...[color=darkred]
> > > 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[/color]
> > VARCHAR[color=darkred]
> > >
> > > 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[/color][/color][/color]


swdev1
Guest
 
Posts: n/a
#12: Jul 20 '05

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


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" <jacob_nikom@ieee.org> wrote in message
news:6eebd424.0402170942.48a84032@posting.google.c om...[color=blue]
> Do you only store it or you do something with it. like searching,
> viewing, etc?
>
> Jacob Nikom
>
> "swdev1" <wsanders.bob@advmed.com> wrote in message[/color]
news:<K3hYb.3890$O84.526@newssvr23.news.prodigy.co m>...[color=blue][color=green]
> > Heya Jacob -
> > If the file is less than 10 megabytes - I usually will store an xml file[/color][/color]
in[color=blue][color=green]
> > varchar without any conversion.
> > We are talking ascii text here [with a few exceptions] but mostly you[/color][/color]
should[color=blue][color=green]
> > be ok.
> > I take an entire xml file and store it in mysql utilizing remote views[/color][/color]
with[color=blue][color=green]
> > vfp, mapping a memo field in vfp to varchar in mysql, all slung via odbc[/color][/color]
and[color=blue][color=green]
> > connection strings.
> > No Hiccups, so far.
> > mondo regards [Bill]
> > --
> > William Sanders / Electronic Filing Group Remove the DOT BOB to reply[/color][/color]
via[color=blue][color=green]
> > 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" <jacob_nikom@ieee.org> wrote in message
> > news:6eebd424.0402150734.3fbaf262@posting.google.c om...[color=darkred]
> > > 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[/color]
> > VARCHAR[color=darkred]
> > >
> > > 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[/color][/color][/color]


swdev1
Guest
 
Posts: n/a
#13: Jul 20 '05

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


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" <jacob_nikom@ieee.org> wrote in message
news:6eebd424.0402170942.48a84032@posting.google.c om...[color=blue]
> Do you only store it or you do something with it. like searching,
> viewing, etc?
>
> Jacob Nikom
>
> "swdev1" <wsanders.bob@advmed.com> wrote in message[/color]
news:<K3hYb.3890$O84.526@newssvr23.news.prodigy.co m>...[color=blue][color=green]
> > Heya Jacob -
> > If the file is less than 10 megabytes - I usually will store an xml file[/color][/color]
in[color=blue][color=green]
> > varchar without any conversion.
> > We are talking ascii text here [with a few exceptions] but mostly you[/color][/color]
should[color=blue][color=green]
> > be ok.
> > I take an entire xml file and store it in mysql utilizing remote views[/color][/color]
with[color=blue][color=green]
> > vfp, mapping a memo field in vfp to varchar in mysql, all slung via odbc[/color][/color]
and[color=blue][color=green]
> > connection strings.
> > No Hiccups, so far.
> > mondo regards [Bill]
> > --
> > William Sanders / Electronic Filing Group Remove the DOT BOB to reply[/color][/color]
via[color=blue][color=green]
> > 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" <jacob_nikom@ieee.org> wrote in message
> > news:6eebd424.0402150734.3fbaf262@posting.google.c om...[color=darkred]
> > > 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[/color]
> > VARCHAR[color=darkred]
> > >
> > > 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[/color][/color][/color]


Closed Thread