Why not create a table like this:
show create table product\G
*************************** 1. row ***************************
Table: product
Create Table: CREATE TABLE `product` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(10) NOT NULL,
`price` float NOT NULL,
`color` enum('red','blue') NOT NULL,
`size` enum('L','XL') NOT NULL,
`stocklevel` int(11) NOT NULL,
`description` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1
Of course, this has a finite number of attributes, but it is easy to modify the table to add additional attributes as needed.
For example, to add additional types of colors:
ALTER TABLE product MODIFY COLUMN `color` ENUM('red','blue','green') AFTER `price`;
:
ALTER TABLE product ADD COLUMN `condition` ENUM('good','bad','ugly') AFTER `size`;
, , . (red L), (L XL) . . , red, blue, L XL, color size.