4 Replies Latest reply on Nov 19, 2008 7:15 PM by smokyout

    tour availability

    smokyout

      Title

      tour availability

      Post

      We do rafting trips. I created a customer management database to take customer reservations. I need to find a way to set availability for each trip. For example, if there are 50 spaces available on the 10:00 trip and someone reserves 2 space the availability goes to 48. I hope this make sense.

      Thanks in advance 

       

        • 1. Re: tour availability
          davidhead
            

          Hi Smoky

          What tables do you have at the moment?

          I would see that you need a field in the TRIP record for maximum capacity (e.g. 50).

          You would have a CUSTOMER table and a RESERVATION table. These would be joined thus:

           

          CUSTOMER ---< RESERVATION >--- TRIP

           

          Remaining places on each trip would be calculated with a field in the trip table:

           

            = MaximumCapacity - Count ( RESERVATION::ID )

           

          So what you are doing is to subtract the number of related reservation records from the maximum capacity for the trip.

           

          Does that help? 

          • 2. Re: tour availability
            smokyout
              

            Thanks David,

            It gives me a place to start. I currently only have one table that has customer info and fields for customer totals. I`m still real sketchy on how relationships work. If I can pick your brain just a bit more...

            On any given day we have 25 different trip times. So, if will the max field relate to any day or will I need to set something up to define individual dates?

            Thanks again,

             

            Dan 

            • 3. Re: tour availability
              davidhead
                

              Each 'trip' would be a different record with a date and time.

               

              If you wanted an overview of what was going on on any day, you could have another table for DATES:

               

              CUSTOMER ---< RESERVATION >--- TRIP >--- DATE

               

              The relationship between TRIP and DATE is via the date field in each. 

              • 4. Re: tour availability
                smokyout
                  

                Thanks David,

                I think I need to watch some more tutorials on relationships. I feel a little out of my "pay grade" as it were. You give me hope that what I need to do is possible.

                 

                Danny