📦 Magento_Catalog · engine innodb
catalog_product_link
Catalog Product To Product Linkage Table
Neighbourhood (1-hop foreign-key graph — showing 5 of 6)
flowchart LR c["catalog_product_link"]:::center n0["catalog_product_entity"] click n0 "/schema/table/catalog_product_entity" n0 -- linked_product_id --> c n1["catalog_product_link_type"] click n1 "/schema/table/catalog_product_link_type" n1 -- link_type_id --> c n2["catalog_product_link_attribute_decimal"] click n2 "/schema/table/catalog_product_link_attribute_decimal" c -- link_id --> n2 n3["catalog_product_link_attribute_int"] click n3 "/schema/table/catalog_product_link_attribute_int" c -- link_id --> n3 n4["catalog_product_link_attribute_varchar"] click n4 "/schema/table/catalog_product_link_attribute_varchar" c -- link_id --> n4 click c "/schema/table/catalog_product_link" classDef center fill:#eef2ff,stroke:#6366f1,color:#3730a3,stroke-width:1.5px
Click a node to jump to that table.
Related tables (6)
Columns (4)
| Name | Type | Null | Default | Comment |
|---|---|---|---|---|
| link_id PK | int unsigned | no | Link ID | |
| product_id | int unsigned | no | 0 | Product ID |
| linked_product_id | int unsigned | no | 0 | Linked Product ID |
| link_type_id | smallint unsigned | no | 0 | Link Type ID |
Keys & indexes
Primary key: link_id
Unique
- CATALOG_PRODUCT_LINK_LINK_TYPE_ID_PRODUCT_ID_LINKED_PRODUCT_ID (link_type_id, product_id, linked_product_id)
Indexes
- CATALOG_PRODUCT_LINK_PRODUCT_ID (product_id) btree
- CATALOG_PRODUCT_LINK_LINKED_PRODUCT_ID (linked_product_id) btree
References (3)
- linked_product_id → catalog_product_entity .entity_id (on delete CASCADE)
- product_id → catalog_product_entity .entity_id (on delete CASCADE)
- link_type_id → catalog_product_link_type .link_type_id (on delete CASCADE)
Referenced by (3)
- catalog_product_link_attribute_decimal .link_id → .link_id (on delete CASCADE)
- catalog_product_link_attribute_int .link_id → .link_id (on delete CASCADE)
- catalog_product_link_attribute_varchar .link_id → .link_id (on delete CASCADE)