Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7029823
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:35:20+00:00 2026-05-28T00:35:20+00:00

I’m designing a Ruby on Rails reservation system for our small tour agency. It

  • 0

I’m designing a Ruby on Rails reservation system for our small tour agency. It needs to accommodate a number of things, and the table structure is becoming quite complex.

Has anyone encountered a similar problem before? What sort of issues might I come up against? And are performance/ validation likely to become issues?

In simple terms, I have a customer table, and a reservations table. When a customer contacts us with an enquiry, a reservation is set up, and related information added (e.g., paid/ invoiced, transport required, hotel required, etc).

So far so good, but this is where is gets complex. Under each reservation, a customer can book different packages (e.g. day trip, long tour, training course). These are sufficiently different, require specific information, and are limited in number, such that I feel they should each have a different model.

Also, a customer may have several people in his party. This would result in links between the customer table and the reservation table, as well as between the customer table and the package tables.

So, if customer A were to make a booking for a long trip for customers A,B and C, and a training course for customer B, it would look something like this.

CUSTOMERS TABLE
CustomerA
CustomerB
CustomerC
CustomerD
CustomerE
etc

RESERVATIONS TABLE
1. CustomerA

LONG TRIP BOOKINGS
CustomerA - Reservation_ID 1
CustomerB - Reservation_ID 1
CustomerC - Reservation_ID 1

TRAINING COURSE BOOKINGS
CustomerB - Reservation_ID 1

This is a very simplified example, and omits some detail. For example, there would be a model containing details of training courses, a model containing details of long trips, a model containing long trip schedules, etc. But this detail shouldn’t affect my question.

What I’d like to know is:

1) are there any issues I should be aware of in linking the customer table to the reservations model, as well as to bookings models nested under reservations.

2) is this the best approach if I need to handle information about the reservation itself (including invoicing), as well as about the specific package bookings.

On the one hand this approach seems to be complex, but on the other, simplifying everything into a single package model does not appear to provide enough flexibility.

Please let me know if I haven’t explained this issue very clearly, I’m happy to provide more information. Grateful for any ideas, suggestions or comments that would help me think through this rather complex database design.

Many thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T00:35:20+00:00Added an answer on May 28, 2026 at 12:35 am

    I have built a large reservation system for travel operators and wholesalers, and I can tell you that it isn’t easy. There seems to be similarity yet still large differences in the kinds of product booked. Also, date-sensitivity is a large difference from other systems.

    1) In respect to ‘customers’ I have typically used different models for representing different concepts. You really have:

    • a. Person / Company paying for the booking
    • b. Contact person for emergencies
    • c. People travelling

    a & b seem like the same, but if you have an agent booking, then you might want to separate them.

    I typically use a => ‘customer’ table, then some simple contact-fields for b, and finally for c use a ‘passengers’ table. These could be setup as different associations to the same model, but I think they are different enough, and I tend to separate them – perhaps use a common address/contact model.

    2) I think this is fine, but depends on your needs. If you are building up itineraries for a traveller, then it makes sense to setup ‘passengers’ on the ‘reservation’, then for individual itinerary items, with links to which passenger is travelling on/using that item.

    This is more complicated, and you must be careful to track dependencies, but the alternative is to not track passenger names, and simply assign quantities to each item (1xAdult, 2xChildren). This later method is great for small bookings, so it seems to depend on if your bookings are simple, or typically built up of longer itineraries.

    other) In addition, in respect to different models for different product types, this can work well. However, there tends to be a lot of cross over, so some kind of common ‘resource’ model might be better — or some other means of capturing common behaviour.

    If I haven’t answered your questions, please do ask more specific database design questions, or I can add more detail about specific examples of what I’ve found works well.

    Good luck with the design!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're building an app, our first using Rails 3, and we're having to build
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.