我需要存儲的信息具有以下格式如何在postgres表中表示以下信息?
category, command, options, description
選項取決於命令,可以有許多不同的值。 例如
'SetBack', 'set_fan', [ (0,ON), (1, OFF), (2, AUTO) ], 'Sets the fan value'
'SetTime', 'set_time', [0-99 Minutes], 'Sets the time value'
'SetHour', 'set_hour', [0-12 Hours], 'Sets the hour value'
'SetFanOptions', 'set_fan_opt', [ (0,'Constant','constant value'), (1, 'Air Mixture', 'Sets Fan Air Mixture'), (2, OFF, 'sets off fan') ... ], 'Sets the Fan Ait Mixture value'
'選項'字段具有多種類型的值。
在postgres中表示這些信息的最佳方式是什麼?另外,我應該使用一個表還是多個表?
您有任何具體問題嗎?你對設計有什麼初步想法? – 2011-05-10 15:39:37