Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
从这两个表创建一对一关系的最佳方法是什么?
CREATE TABLE hotel( id_Hotel ... ) CREATE TABLE Manager( ID_Manager ... )
非常感谢!
通常的方法是:
create table Hotel(id_Hotel INT, id_Manager INT...)
但更实际的解决方案是:
create table Hotel(id_Hotel INT, ...); create table Manager(id_Manager INT, ...); create table Hotel_Manager(id_HM INT, id_Hotel INT, id_Manager INT, CreateDate Date);