Patrick Marquetecken wrote:
I seems not to figure out how to import a xml file into mysql 4.x
I'm working on, Linux, help would he fine.

XML is an hierarchical format, it does not map directly to a relational database, which has a tabular format. I don't know if there are any general purpose tools for this. I doubt it. Unless you find such a tool you must decide what tables you need, how the XML is to be transposed into the tables, and you must write the program to do the import, i.e. read the XML and INSERT into the database.


There is another option/view on this. You might have a number of small xml-files, and you wish to store each file in a column in a single row? In that case you should probably use the TEXT column type. This depends on what you are going to use the XML for. Searching will be easier/faster if you "normalize", meaning splitting your data in separate columns and in separate tables. You can search in the XML column too, but it is harder/slower: By using the LIKE operator and your knowledge of the XML structure, you could search for a date within an XML column with something like this: ... LIKE "%<date>2005-02-26</date>%".

--
Roger


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to