Senaru

Joined

50 Experience
0 Lessons Completed
0 Questions Solved

Activity

Posted in Help with Modelling the Rails DB/ActiveRecord

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.

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

© 2024 GoRails, LLC. All rights reserved.