InterviewSolution
Saved Bookmarks
| 1. |
In a hospital, the patients are allocated to wards. A database named 'Hospital' is created. One table in this database is: Ward with WardId, WardName, ' NumOfBeds as columns and WarId' as the primary key. Write another suitable table you could expect to see in the 'Hospital' database, with 3 suitable columns identifying Primary key and Foreign key in the table that you expect. |
|
Answer» CREATE TABLE PATIENT ( PID INT NOT NULL, PNAME VARCHAR(50), WardId INT NOT NULL, PRIMARY KEY(PID), FOREIGN KEY (WardId) REFERENCES Ward(WardId) ); |
|