While reading Database Systems, I have encountered through a query as shown below:
CREATE TABLE works ( eid INTEGER NOT NULL, did INTEGER NOT NULL, pcttime INTEGER, PRIMARY KEY ( eid, did ), UNIQUE ( eid ), FOREIGN KEY ( did ) REFERENCES dept ); Since primary key on eid,did is already defined, why would we require unique on eid? Because each eid,did pair is already unique.