Forum Moderators: coopster
I'm designing a database of supplier. Each supplier may be active in a number of regions. There are ten regions in total.
I first thought I would create a database column for each region - so 10 columns - and set a flag in each, as appropriate to the supplier. This strikes me as inefficient and I'm sure there must be a clever (but simple) way of achieving the same thing.
Any thoughts please - but PLEASE keep it simple and foolproof.
Thanks in anticipation.
table one
2 fields [ID(unique, auto-incrementing),region]
so it would have 10 entires
Table two
2 fields [ID(unique, auto-incrementing),supplier]
Table three
3 fields [ID(unique, auto-incrementing), supplier ID(gotten from table 2), Region ID(goten from table 1)]
The first field in table 3 would be optional but I think it would be safer (And I belive good DB practices) to have an unique ID in each table.
to query these, look in to Joins and aliase
it will make things simpler(sort of), more logical, and cleaner.