GT.M uses a Hierarchical tree data model.
The GT.M data model is based on a hierarchical associative memory (a multi-dimensional array) that imposes no restrictions on the data types of the indexes and the content.
The application logic can impose any schema, dictionary or data organization suited to its problem domain.
Data is stored in the branches of a tree.
For example, the following could be the method for storing data for bank transactions in a M hierarchical database.
The organization of data in a hierarchical database presumes that the common searches will follow the paths of branches in a tree. In this case, it will be more common to ask for:
All the Deposit transactions of a given customer
than to ask for:
Get all the witdrawals made in the Entire bank in a range of dates
Both queries are posible, but the first one will be much more efficient in this tree arrangement, that it would be in a Relational Database, where the transactions of a given customer will be in the same table along with the transactions of all other customers.
The second query, will be more efficient in a relational database, since all transaction records would be together. One could argue, however, that if date cumulates is what we want more efficiency on, we could have still use a hierarchical model, and the top branches would have been divided by dates instead of by bank branches as we did here.