Need a MySQL query for selecting from a table storing key value pairs
问题 I need to store few items and its properties in form of a key value pairs in the database (mySQL). I am planning to do it as following. I'll use two tables items and item_properties . items itemId | itemName ------------------- 1923 | AC 1235 | Fridge 8273 | Heater item_properties itemId | property | value -------------------------------- 1923 | effect | cooling 1923 | consumption | efficient 1923 | type | split 1235 | effect | cooling 1235 | volume | 20 liters 8273 | effect | heating 8273 |