Ask A Question

Notifications

You’re not receiving notifications from this thread.

Help with Modelling the Rails DB/ActiveRecord

Senaru asked in General

I want to have a data structure as follows;

Items Category contains general information on that category whether it can be taken on a flight.
Items contain more specialized information on the item.
Airlines have different airlines.

What I need to here is, if items and the categories are already existing, and for every different airline, I need to have separate information for items for thar particular airline, what would be the most efficient/best way to model the rails DB?

For example, if the General Limit for batteries in flights are 160Wh, then I would add that to Items, and as it's general i wouldn't need to add that to every airline separately. BUT if there is an Airline which has a battery limit of only 100Wh, I want to add that as well.

Thanks for the help in advance.

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 82,329+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.