• I simply use XML.

    Using XML whole complex structures can be passed to SQL and treated as Tables.

    You can use Functions with the XML to render these into virtual tables and treat these as regular tables!