13.5 JSON and XML in Relational Databases
It is sometimes desirable to store XML or JSON data in a relational or object-relational (OR) database in a manner that allows retrieval and update of the data. The basic issue is how to map the hierarchical structure of XML or JSON documents into a relational or OR model. A simple but not very flexible solution is to let the entire document be represented as a single attribute. A more satisfactory solution is to shred the document into parts that are represented as attributes. However, this requires an intelligent mapping algorithm. We might also wish to be able to transform relational data into XML or JSON form and to publish it in that form. Ultimately, what is needed is the ability to do round-tripping ...
Get Databases Illuminated, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.