在MySQL中存储XML文件的最佳方法是什么? [英] What is the best way to store XML file in MySQL?

查看:414
本文介绍了在MySQL中存储XML文件的最佳方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我想在MySQL中存储XML文件。什么是最佳解决方案:


1.将其转换为字符串并将其存储为CLOB / text

2.序列化并存储为字节数组

3.将其展平并为每个元素创建一列,每列为VARCHAR


MySQL对XML数据有什么特殊之处吗?

是否有任何软件有助于在MySQL中存储XML数据

更高效?


谢谢,

Jacob Nikom

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

推荐答案

2004年2月15日07:34:00 -0800,在mailing.database.mysql中
ja ********* @ ieee.org (jacob nikom)写道:
On 15 Feb 2004 07:34:00 -0800, in mailing.database.mysql
ja*********@ieee.org (jacob nikom) wrote:
|
|
|我想在MySQL中存储XML文件。什么是最好的解决方案:
|
| 1.将其转换为字符串并将其存储为CLOB / text
| 2.序列化并存储为字节数组
| 3.将其展平并为每个元素创建一列,每列为VARCHAR
|
| MySQL对XML数据有什么特殊之处吗?
|是否有任何软件有助于在MySQL中存储XML数据
|更有效率?
| 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?




你可以做以上任何一项。这取决于你计划做什么

一旦它在数据库中的XML数据。

--------------- ------------------------------------------------ <无线电通信/> jn****@yourpantsbigpond.net.au :脱掉裤子回复

------------------------------------------------- --------------



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
---------------------------------------------------------------


2004年2月15日07:34:00 -0800,在mailing.database.mysql中> ja*********@ieee.org (jacob nikom)写道:
On 15 Feb 2004 07:34:00 -0800, in mailing.database.mysql
ja*********@ieee.org (jacob nikom) wrote:
|
|
|我想在MySQL中存储XML文件。什么是最好的解决方案:
|
| 1.将其转换为字符串并将其存储为CLOB / text
| 2.序列化并存储为字节数组
| 3.将其展平并为每个元素创建一列,每列为VARCHAR
|
| MySQL对XML数据有什么特殊之处吗?
|是否有任何软件有助于在MySQL中存储XML数据
|更有效率?
| 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?




你可以做以上任何一项。这取决于你计划做什么

一旦它在数据库中的XML数据。

--------------- ------------------------------------------------ <无线电通信/> jn****@yourpantsbigpond.net.au :脱掉裤子回复

------------------------------------------------- --------------



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
---------------------------------------------------------------


2004年2月15日07:34:00 -0800,在mailing.database.mysql中> ja*********@ieee.org (jacob nikom)写道:
On 15 Feb 2004 07:34:00 -0800, in mailing.database.mysql
ja*********@ieee.org (jacob nikom) wrote:
|
|
|我想在MySQL中存储XML文件。什么是最好的解决方案:
|
| 1.将其转换为字符串并将其存储为CLOB / text
| 2.序列化并存储为字节数组
| 3.将其展平并为每个元素创建一列,每列为VARCHAR
|
| MySQL对XML数据有什么特殊之处吗?
|是否有任何软件有助于在MySQL中存储XML数据
|更有效率?
| 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?




你可以做以上任何一项。这取决于你计划做什么

一旦它在数据库中的XML数据。

--------------- ------------------------------------------------ <无线电通信/> jn****@yourpantsbigpond.net.au :脱掉裤子回复

------------------------------------------------- --------------



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
---------------------------------------------------------------


这篇关于在MySQL中存储XML文件的最佳方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆