I guess I have a simple mind too. The VERY first thought that popped into my head was a linked list. With a doubly linked list you could traverse it either direction and insert/delete for stops is easy.


-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Vernon Hamberg
Sent: Tuesday, June 07, 2016 2:42 PM
To: Midrange Systems Technical Discussion
Subject: Re: Layout of "Itinerary" Record - A Database Design Question

Hi Nathan

A quick thought, with this assumption - you cannot break out of the itinerary - that is, if it is A->B->C->D, you can't go back from C to A or from D to B.

I think the 2nd option works for flexibility - basically implement a a linked list. This would let you easily present the itinerary in either mode you described, #1 showing both "outbound" and "inbound", #2 showing only "outbound"

I realize this is VERRRRRY simple-minded - maybe it'll help organize or stir thoughts.

Cheers
Vern

On 6/7/2016 4:23 PM, Nathan Andelin wrote:
We've come up with 2 alternatives for trip itinerary records and would
like to settle on one or the other:

Option 1: delineate one row for each "stop" in the route:

Surrogate_Key.
Location_ID (refers to a row in "location file").
Arrival_Date.
Arrival_Time.
Number_Of_Minutes_At_This_Stop.

Three (3) rows would be required to delineate the "steps" to a single
destination and back. Some users prefer this type of listing on screens.

Option 2: delineate one row for each "from" and "to" location in the route:

Surrogate_Key_Value.
From_Location_ID (refers to a row in "location file").
From_Location_Departure_Date.
From_Location_Departure_Time.
To_Location_ID (refers to a row in "location file").
To_Location_Arrival_Date.
To_Location_Arrival_Time.

Two (2) rows would be required to delineate the "steps" to a single
destination and back. Some users prefer this type of listing on screens.

How should we settle this debate?

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.