I have the following lookup grid
x A B C D A 0 2 1 1 B 2 0 1 1 C 1 1 0 1 D 1 1 1 0Think of this similar to the travelling salesman with point to point, although the algorithm isn't relevant to this problem. It is More like a lookup from A->B What would be the best way to store in a database, since the time is the same both directions. A to B is 2, and B to A is 2
Start End Time A B 2 A C 1 B A 2 etc
Doing this seems like it will be duplicating all the data which wouldn't be a good design.
Any thoughts which would be the best way implement this?