Creating relational database

若如初见. 提交于 2019-12-11 17:48:03

问题


E diagram which i need to turn into databse. I know my primary keys but do not really understand how to link the different tables together.

So I have operator table with name as primary key. Each operator can operate certain proportion of those trains. e.g operator "a" 30 = 30% of those services and operator b 70% of those services 100 all of them etc... This is the part im stuck with. Do I need another table to link these two tables together ?

for each train i need to store which station it starts from and where its going to terminate (destination) once again do i create new table for this ?

Thank you in advance


回答1:


You can use your Operates box as a representation of your keys table with OperatorID/TrainID to associate operators with trains.

No, for train start and end stationIDs, you don't need another table, just fields in the Train table.

Is this homework? Are these new concepts for you?



来源:https://stackoverflow.com/questions/13500200/creating-relational-database

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!