How to allow for 'unlimited' fields in an attribute.
Hi I have the following table;
CREATE TABLE `PIZZA` (`pizza_name` VARCHAR(45) NULL,
`pizza_price` DECIMAL(5,2) NULL,
`pizza_kj` INT NULL,
`pizza_slice_kj` INT NULL,
`pizza_ingred1` VARCHAR(45) NULL,
`pizza_ingred2` VARCHAR(45) NULL,
`pizza_ingred3` VARCHAR(45) NULL,
`pizza_ingred4` VARCHAR(45) NULL,
`pizza_ingred5` VARCHAR(45) NULL,
`pizza_ingred6` VARCHAR(45) NULL,
`pizza_ingred7` VARCHAR(45) NULL,
`pizza_ingred8` VARCHAR(45) NULL,
`pizza_ingred9` VARCHAR(45) NULL);
The data in this table, for example, is;
insert into `pizza` values('Super Supreme',8.5,6816,852,'beef','ham','pepperoni','italian sausage','onion','mushroom','pineapple','capsicum','olives');
or
insert into `pizza` values('Hawaiian',8.5,6022,753,'Ham','pineapple','mozzarella','tomato sauce','','','','','');
This table was given to us in a lab. I need to work out how to split this into two tables, pizza and pizza_ingredients and insert the data (this part i know how to do). But in the new pizza_ingredient table I also have to allow for more ingredients than 9. They do not say how many specifically, so I assume we need to make it unlimited. Is there a way to do this? Thank you for any help.