Query projections and indexes
Documentation status: tutorial — see Maturity and evidence.
Do not introduce indexes only because a relation exists. Start from concrete access patterns.
Representative queries include movements by warehouse/time/kind, stock positions by product/warehouse/time, all positions in one warehouse at one time, reorder alerts by warehouse/time, and invalid positions by warehouse/time.
Native hypergraph indexes should be used when they already satisfy the query. Add an indexed projection when an attribute must become a relation slot or when a frequently used access order needs a different leading role.
Examples of useful access-oriented projections are:
StockPositionByWarehouseTimeProduct(warehouse, time, product, position);ReorderRequiredByWarehouseTimeProduct(warehouse, time, product).
The business fact and the indexed projection have different responsibilities. ReorderRequired carries meaning. The indexed projection provides an efficient access order and must not invent new business semantics.