Do you guys know, how we can convert XML Schema to relational model? What are the steps involved? More precisely, How can we figure out what the table names, columns names and the relationships on those tables, going to be like on relational model by looking only at the XML Schema?
If you have any tutorial links, examples then please share it with me. I hightly appreciate your help on this.
THanks
The two are inherently different. The relational model is set-based; XML is hierarchical.
One way might be to make the tag name the name of the table IF the tag has multiple child with leaf grandchildren. The child tag name would be the column, and the grandchild text the value.
If the children have non-leaf grandchildren, model these as one-to-many relationships between parent and child table.
There are several papers to be had if you Google "XML schema to relational schema", including these:
How complex is the schema? Depending on the structure defined by the schema, you may find there is no convenient translation to relational tables.
You haven't said how you intend to use your data, but some relational databases support xml-typed columns. For example, in Microsoft SQL Server 2005 and later, you could store your xml documents in a column of type xml. Your queries could then use built-in methods defined for the xml data type.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With