Ok, give me a minute or two to add sample data and FK's
create table food
(
id int auto_increment primary key,
name varchar(100) not null
);
create table category
(
id int auto_increment primary key,
name varchar(100) not null
);
create table fc_junction
( -- Food/Category junction table
-- if a row exists here, then the food and category intersect
id int auto_increment primary key,
foodId int not null,
catId int not null,
-- the below unique key makes certain no duplicates for the combo
-- duplicates = trash
unique key uk_blahblah (foodId,catId),
-- Below are the foreign key (FK) constraints. A part of Referential Integrity (RI).
-- So a row cannot exist with faulty foodId or catId. That would mean insert/update here.
-- It also means the parents (food and category) row(s) cannot be deleted and thus
-- orphaning the children (the children are these rows in fc_junction)
CONSTRAINT fc_food FOREIGN KEY (foodId) REFERENCES food(id),
CONSTRAINT fc_cat FOREIGN KEY (catId) REFERENCES category(id)
);
So you are free to add food and categories and hook them up later via the junction table. You can create chipotle, burritos, hotdogs, lemonade, etc. And in this model (the generally accepted way = "don't do it any other way), you do not need to know what categories the foods are in until whenever you feel like it.
In the original comma-separated way (a.k.a. the wrong way), you have zero RI and you can bet there will be no use of fast indexes. Plus getting to your data, modifying, deleting a category, adding one, all of that is a kludge and there is much snarling and gnashing of teeth.