Skip to content

track_products

M:N junction between tracks and products — which products a track unlocks.

  • ETL strategy: merge with composite PK (id_tenant, id_track, id_product)

Columns

ColumnTypeDescription
id_tenantBIGINTFK → tenants.id. Part of PK.
id_trackBIGINTFK → tracks.id. Part of PK.
id_productBIGINTLogical FK → products.id (resolves to products.id_origin for replicated products). Part of PK.
id_track_originBIGINTResolved tracks.id_origin — useful for deduping tracks replicated across tenants.
id_product_originBIGINTResolved products.id_origin.

No created_at / deleted_at. The table represents the current state of the mapping (rows are removed when the link no longer exists). Deleted products do not appear here.

OpenDB · Cademi LMS Data Warehouse