Um... interesting question.
Not really sure at the moment - would depend what the data to compare against was like.
If it's just standalone data, I'd probably go ahead with one table:
code:
CREATE TABLE wood_costs
( species VARCHAR(30) NOT NULL
, thickness TINYINT NOT NULL
, cost SMALLINT DEFAULT NULL
);
INSERT INTO wood_costs ('Red Oak',3,85);
INSERT INTO wood_costs ('Red Oak',4,85);
...
INSERT INTO wood_costs ('Hard Maple',7,135);
...
INSERT INTO wood_costs ('Other Hardwood',16,285);
Then extract distinct species and loop through ordered by thickness for outputting cost.
Though some might argue for three tables (with IDs for species and thickness to avoid duplicating data), but not sure that makes practical sense here.
I'm now a bit paranoid that I'm missing the point entirely in what you're asking, and you actually meant something else? :S |