Short and sweet:
CREATE TABLE parts ( type CHAR(10) NOT NULL, id MEDIUMINT NOT NULL AUTO_INCREMENT, description CHAR(30) NOT NULL, PRIMARY KEY (type, id) ) ENGINE=MyISAM; INSERT INTO parts (type, description) VALUES ('car part', 'brake'), ('car part', 'steering wheel'), ('furniture', 'table leg'), ('printer', 'toner cartridge'), ('furniture', 'shelf');
What would be returned by executing:
SELECT DISTINCT id FROM parts;