SQL - Table Relationships
You have these tables:
CREATE TABLE Account (AccountID INT PRIMARY KEY, Balance DECIMAL);
CREATE TABLE AccountDetails (AccountID INT, Branch VARCHAR(50), FOREIGN KEY (AccountID) REFERENCES Account(AccountID));
Why might this design cause problems enforcing a one-to-one relationship?
CREATE TABLE Account (AccountID INT PRIMARY KEY, Balance DECIMAL);
CREATE TABLE AccountDetails (AccountID INT, Branch VARCHAR(50), FOREIGN KEY (AccountID) REFERENCES Account(AccountID));
Why might this design cause problems enforcing a one-to-one relationship?
