> ## Documentation Index
> Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Database model

> The shared database tables defined by the common layer for trades, counterparties, books, instruments, and supporting hierarchy structures.

The common layer defines a set of shared database tables that represent standard financial entities such as trades, counterparties, books, and instruments. Solutions build on these tables by adding their own domain-specific tables and joining them to the common ones.

Understanding the common data model is a prerequisite before reading the database model documentation for any specific solution.

## What tables are shared across solutions?

The following tables are defined by the common layer and may be used by any solution.

| Table | Key fields | Description |
| - | - | - |
| [`TradeAttributes`](../../reference/tables#tradeattributes) | `AsOfDate`, `TradeId` | Descriptive attributes for each trade, such as trader, sales, and organizational references. |
| [`CounterpartyAttributes`](../../reference/tables#counterpartyattributes) | `AsOfDate`, `CounterpartyId` | Counterparty classification data including name, rating, and geography. Optional; availability depends on the solution. |
| [`OrganizationAttributes`](../../reference/tables#organizationattributes) | `AsOfDate`, `OrganizationUnitId` | Organizational hierarchy entries. Optional; availability depends on the solution. |
| [`BookAttributes`](../../reference/tables#bookattributes) | `AsOfDate`, `BookId` | Book hierarchy entries. Optional; availability depends on the solution. |
| [`BookStructure`](../../reference/tables#bookstructure) | `AsOfDate`, `StructureLeafId` | Parent-child structure supporting the Books dimension hierarchy. |
| [`CounterpartyStructure`](../../reference/tables#counterpartystructure) | `AsOfDate`, `StructureLeafId` | Parent-child structure supporting the Counterparties dimension hierarchy. |
| [`OrganizationStructure`](../../reference/tables#organizationstructure) | `AsOfDate`, `StructureLeafId` | Parent-child structure supporting the Organization dimension hierarchy. |
| [`InstrumentAttributes`](../../reference/tables#instrumentattributes) | `AsOfDate`, `InstrumentId` | Instrument reference data including identifiers, asset class, and option fields. |
| [`Bucketing`](../../reference/tables#bucketing) | `AsOfDate`, `Underlying`, `BucketingMatrix`, `Tenor`, `TargetTenor` | Bucketing definitions mapping tenors to target tenors with an associated factor. |
| [`VectorExpansion`](../../reference/tables#vectorexpansion) | none (no key) | Vector expansion support used for scenario-based calculations. |
| [`FxRateMarketData`](../../reference/tables#fxratemarketdata) | `AsOfDate`, `MarketDataSet`, `BaseCcy`, `CounterCcy` | FX rates for currency conversion. Provided by the market-data library. |

For the complete field-level reference of every table, see [Tables](../../reference/tables).

## Related pages

* [Customizing the data model](./customizing-data-model)
* [Architecture](../../introduction/architecture)
