| 175 | * Item ↔ Item Category ↔ Category\\ |
| 176 | **Junction: ** Item Category solves M:N relation of Item and Category, by storing the composite key (category_id, item_id)\\ |
| 177 | |
| 178 | **''belongs''** – relation between Item and Item Category where an item can belong to multiple categories.\\ |
| 179 | |
| 180 | **''has''** – relation between Category and Item Category, where a category can have multiple items.\\ |
| 181 | \\ |
| 182 | * Restaurant ↔ Restaurant Category ↔ Category\\ |
| 183 | **Junction: ** Restaurant Category solves M:N relation of Restaurant and Category, by storing the composite key (category_id, restaurant_id)\\ |
| 184 | |
| 185 | **''belongs''** – relation between Restaurant and Restaurant Category where a restaurant can belong to multiple categories.\\ |
| 186 | |
| 187 | **''has''** – relation between Category and Restaurant Category, where a category can have multiple restaurants.\\ |
| 188 | \\ |