Hierarchical data

Example 1. Aggregated record as a hierarchy:

  • travel id=t1

    • date: 2019-05-15

    • reason: Customer meeting in Oslo

    • employee name: Ola Nordmann

    • transactions

      • bus ticket - 100 NOK

      • accommodation - 1000 NOK

Example 2. Serialized as XML:

<travel id="t1">
   <reason>Customer meeting in Oslo</reason>
   <employee id="e1">
       <transaction id="c1">
           <item-name>bus ticket</item-name>
           <cost currency="NOK">100</cost>
       <transaction id="c2">
           <cost currency="NOK">1000</cost>

A hierarchical (XML) database can store records like this, and a thin app then should only filter the records relevant to the user and render it.