Sample Header Ad - 728x90

Database Design - I have a question regarding joining tables

-1 votes
2 answers
372 views
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? Any advice would be great!! and again sorry for being such a newbie on this but can't wrap my mind on a different way. enter image description here
Asked by Julio Contreras (11 rep)
Dec 27, 2015, 02:15 AM
Last activity: Jan 3, 2021, 10:01 PM