我正在設計一個銷售房屋和土地網站的數據庫。我有一個問題,即房子可能在一個或多個土地上,並且土地可能包含一個或多個土地取決於它的面積。 我想出了初步設計,土地和房子之間的關係是多對多:數據庫設計的房屋銷售網站在mysql
House: Id - Name – area –landID – noRooms – hasSwimmingPool Land: Id – name – area - location Offer: (contain the offer of either a land or a house) Id – userID – type – paymentMethod Land_House: houseID – landID
我仍然無法與Land_House表的報價表。
有沒有比我做的更好的方法?什麼是最好的方法?
是否與Land_House表類似,然後我應該在商品表中添加Land_House_id? – user1446168