File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes XML data to Oracle database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XML data to Oracle database" Watch "XML data to Oracle database" New topic

XML data to Oracle database

Vibha Verma
Ranch Hand

Joined: Jan 15, 2002
Posts: 107

I am working on the problem which involves using DOM to parse XML file and then using JDBC store the relevant data in the Oracle database. First part of the problem is done - parsing the file. For the second part I am very confused as to how to go about it as XML is a hierarchical data and Oracle is a relational data. How can I do this mapping.

For example, my XML file looks like this
<age>... </age>

What I want to do is to create a table with the name - my_info and then create columns like first_name, last_name, age, address. But how do I handle the issue that the column name should be first_name and last_name and not name. In some other case I might need to have the column name to be name and not first_name and last_name. Is there somegeneral way to work on such type of problems.

Please help.
Balaji Loganathan
author and deputy

Joined: Jul 13, 2001
Posts: 3150
Will this tutorials from IBM Using JDBC to insert data from XML into a database, Using JDBC to extract data into XML help you?
I agree. Here's the link:
subject: XML data to Oracle database
It's not a secret anymore!