How to relate table with one of many others?
问题 I am little confused about my db design. I have orders table that may have records from one of many others. So is it OK to relate each tables with 1:1 to orders . Please look at orders domains and hostings table relations. My orders table rows has either a domain or hosting regarding to its orders_type value. 回答1: Are you asking if the orders should have 1:1 relationship with domains and another 1:1 relationship with hostings? If you are, the answer is no. Your hosting table has an orders_id