Answer the question
In order to leave comments, you need to log in
Database for an online store?
If the tables are:
- Manufacturers (manufacturer) - Collections (collection) - Colors (color)
A manufacturer can have many collections, but a collection has only one manufacturer. A collection can have many colors, but a color has only one collection. Do I understand correctly that you need to use a one-to-many relationship?
Main problem:
A collection must have characteristics. Weight, grams, composition, etc. How it is better to implement it?
Answer the question
In order to leave comments, you need to log in
Three tables:
manufacturers
id | name | что-то | еще |
collections
id | manufacture_id | name | Вес | грамм | состав | т.д. |
colors
id | collection_id | name | что-то | еще |
Manufacture->hasMany(Collection); Collectiion->hasMany(Color); ну и в обратную сторону belongsTo()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question