📦 Magento_Catalog · engine innodb
catalog_compare_item
Catalog Compare Table
Neighbourhood (1-hop foreign-key graph — showing 4 of 4)
flowchart LR c["catalog_compare_item"]:::center n0["customer_entity"] click n0 "/schema/table/customer_entity" n0 -- customer_id --> c n1["catalog_product_entity"] click n1 "/schema/table/catalog_product_entity" n1 -- product_id --> c n2["store"] click n2 "/schema/table/store" n2 -- store_id --> c n3["catalog_compare_list"] click n3 "/schema/table/catalog_compare_list" n3 -- list_id --> c click c "/schema/table/catalog_compare_item" classDef center fill:#eef2ff,stroke:#6366f1,color:#3730a3,stroke-width:1.5px
Click a node to jump to that table.
Related tables (4)
Columns (6)
| Name | Type | Null | Default | Comment |
|---|---|---|---|---|
| catalog_compare_item_id PK | int unsigned | no | Compare Item ID | |
| visitor_id | int unsigned | no | 0 | Visitor ID |
| customer_id | int unsigned | yes | Customer ID | |
| product_id | int unsigned | no | 0 | Product ID |
| store_id | smallint unsigned | yes | Store ID | |
| list_id | int unsigned | yes | List ID |
Keys & indexes
Primary key: catalog_compare_item_id
Indexes
- CATALOG_COMPARE_ITEM_PRODUCT_ID (product_id) btree
- CATALOG_COMPARE_ITEM_VISITOR_ID_PRODUCT_ID (visitor_id, product_id) btree
- CATALOG_COMPARE_ITEM_CUSTOMER_ID_PRODUCT_ID (customer_id, product_id) btree
- CATALOG_COMPARE_ITEM_STORE_ID (store_id) btree
References (4)
- customer_id → customer_entity .entity_id (on delete CASCADE)
- product_id → catalog_product_entity .entity_id (on delete CASCADE)
- store_id → store .store_id (on delete SET NULL)
- list_id → catalog_compare_list .list_id (on delete CASCADE)