diff --git a/DBMS/Day-2/Exercise-5.txt b/DBMS/Day-2/Exercise-5.txt index a14490c..8f7fb70 100644 --- a/DBMS/Day-2/Exercise-5.txt +++ b/DBMS/Day-2/Exercise-5.txt @@ -1,10 +1,11 @@ CREATE TABLE Match( - MId INTEGER PRIMARY KEY, + MId INTEGER, TId INTEGER REFERENCES Tournament(TournamentId), Player1 INTEGER REFERENCES Player(PlayerId), Player2 INTEGER REFERENCES Player(PlayerId), MatchDt DATE NOT NULL, Winner INTEGER REFERENCES Player(PlayerId), Score VARCHAR2(30) NOT NULL, + CONSTRAINT match_pk PRIMARY KEY(MId,TId), CONSTRAINT playler_id_ck CHECK(Player1 <> Player2) -) \ No newline at end of file +)