Forgive me for my dumb question but I am new to Ruby on Rails and data design. We all have to start somewhere right? Well my question is that I want to build a database for a Truck driving company. It consist of Drivers, Brokers, Invoices, Destinations, and type of produce delivered. I have attached a screenshot so you can see the relationships on the table.
My question is that in the invoice table "Start_Destination" and "End_Destination" each has a one relationship to the "Destination_Company_Name" in the Destination table. Is this okay? Like two fields on one table tied to one field on another? The same goes for the "Produce_type", you will see that it is 3 times in the invoice side but only one joint on the Produce table. Is this okay?