SitePoint Sponsor |
|
User Tag List
Results 1 to 5 of 5
-
Dec 22, 2008, 15:06 #1
- Join Date
- Dec 2006
- Posts
- 134
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
'n' number of possible itinerary items
If I need to build a list of itineraries within a database, but I am unsure as to the amount of actual itinerary items within the list, how do I go amonst building a table?
i.e., lets say for one itinerary there is seven stops, but another itinerary has eleven stops. They're all in the same table.
What would a database achitecture look like for a dynamic amount of stops per each itinerary?
-
Dec 22, 2008, 15:11 #2
- Join Date
- Jul 2002
- Location
- Toronto, Canada
- Posts
- 39,347
- Mentioned
- 63 Post(s)
- Tagged
- 3 Thread(s)
-
Dec 22, 2008, 15:17 #3
- Join Date
- Dec 2006
- Posts
- 134
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hi r937, thanks for the quick response!
What would happen if I needed to relate one itinerary (which has a group of stops) to a specific trip code, which is in a trip_details table?
-
Dec 22, 2008, 20:48 #4
- Join Date
- Sep 2008
- Posts
- 977
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Is the trip code unqiue to each itinerary? if so, you code add it as a column in the itinerary table.
if the trip code relates to more than one itinerary, I would consider treating it in the saem way as r937 suggested you treat 'stops'.
I am getting a hint that your db may not be fully normalised yet. it might help if you were to post your table structure in case we can help further.
bazz
-
Dec 28, 2008, 12:59 #5
- Join Date
- Dec 2006
- Posts
- 134
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Bookmarks