It might also help to read first my explanation of why the nested data is important and how it differs from the Object Relations Managers at http://babkin-cep.blogspot.com/2014/12/nested-record-and-orm.html.
Relational Operations on the Nested Data
Nested data is multi-dimensional
Nested data is the result of a Join
Optimization of other joins with the nested data
Optimization of the aggregations with the nested records
The importance of nested records for the conventional RDBMS
Adapting a conventional RDMBS for nested records
- Support for the nested record format. It must be supported not only in the input and tables but also in the output, in the query results and in the intermediate values. This includes the creation of the nested record types on the fly.
- Support for the record-local indexes, to be stored along with the records and to be used in the in-record self-joins.
- The full-table indexes should probably locate the data with the precision of a nested record, with the further search done by the in-record index.
- Syntactic support in the query language for the scope-limited self joins (in a nested record, or in its sub-node).
- The scope-limited joins don't have to be self-joins with the same nested record on both sides. In some cases it might be useful to find the second nested record and then perform the cross-product of the fields A from record 1 and fields B from the record 2.
- Each node of a nested record can be seen as one side of join in the formation of the nested-record-as-a-join-result. Being able to refer to all the sub-nodes growing from that node would be highly useful when writing a join. Thus it would be highly useful to generate a pseudo-field similar to rowid for each node, thus making it a unique key of this node.