Storing route in DB
| From: | Robert Ian Smit | Date: | Sun, 18 Apr 2004 08:02:25 +0000 |
| Subject: | Storing route in DB | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-33946@lists.php.net to get a copy of this message | ||
Hi,
I am not sure if my issue can be partially solved by a good database
design or that all stands or falls with the application.
If I have a bunch of locations in a table and I want to describe a
route between a number of these locations, what's the best way to do
it, considering that it must be possible to change the route
afterwards. For instance (A-B-C-A, becomes A-C-B-A).
Ofcourse it's not a really big problem to solve in PHP. However I
believe it would be best if the database enforced some rules about
how a route may look. For instance no matter what any user or
application does, it should not be possible to store a route
that looks like A-B-B-A or like A-B- -A or lose all route
information when there are still bookings.
Logically the problem is not too difficult, however I am looking for
a way to implement this in MySQL/PHP. Any pointers to help me in my
analysis would be much appreciated.
Bob