database - Design a table around matrix table. -


so have database selling products. orders tables hold's customer's order info shipping province , shipping method:

+--------------------+----+ |       order        |    | +--------------------+----+ | someotherinfo      |    | | shippingmethodid   | fk | | shippingprovinceid | fk |  | baseprice          |    | +--------------------+----+ 

basically what's happen have base price shipping that's based on province , shipping method. need add base price shipping orders table , fact base price shipping matrix table or 2d array col(shipping method) + row(province) = basecost throwing me off on how implement it. never had deal don't know up.

example of matrix looks like:

+--------+----+----+----+-----+ |        | bc | ab | sk | etc | +--------+----+----+----+-----+ | ground |  9 |  9 |  9 |     |   | air    | 15 | 21 | 21 |     |   | etc    |    |    |    |     |   +--------+----+----+----+-----+ 


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -