Answer the question
In order to leave comments, you need to log in
How to create clothing size charts?
help plz. can't figure out the logic for the size chart. I have a brand in the brand has (women's, men's and children's) now they have two types of trousers jeans and trousers. how do i write down their dimensions
Answer the question
In order to leave comments, you need to log in
Google on the topic Entity-attribute-value (EAV) Model
https://community.intersystems.com/post/entity-att...
Or you can make a flat table like
id|name|qty|price
1|Jeans Brand for men 50r |3|1000
2|Jeans Brand for men 32r|3|1000
2|Jeans Brand for women 25r|3|1000
In this case, I see 3 tables:
create table brands (
id int auto_increment primary key,
name varchar(64)
);
create table products (
code varchar(8) primary key,
brand_id int,
name varchar(64)
);
create table product_sizes (
product_code varchar(8),
size varchar(64),
quantity int,
price decimal(7,2)
);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question