90 likes | 158 Views
HD assignment 2007. FIFAWC2006. HO TING CHENG. Real Domain. This database is created base on the information obtained from http://www.fifa.com/worldcup/archive/germany2006/index.html
E N D
HD assignment 2007 FIFAWC2006 HO TING CHENG
Real Domain • This database is created base on the information obtained from http://www.fifa.com/worldcup/archive/germany2006/index.html • This database record the detail about the teams, players, results, awards and statistic information about FIFA world cup 2006
FIFAWC2006_Statatic StatisticType StatTeam* StatPlayer* GF GFA GG PG SG YC RC FC FS FIFAWC2006_WCTeam WCTeam Abbreviate Region FIFAWC2006_Result MatchNumber HomeTeam* AwayTeam* Stage Date Results FIFAWC2006_Award Award Team PlayerID FIFAWC2006_Player PlayerID Name Age WCTeam* Position PlayerClub PlayerID* ClubID* Duration Club ClubID ClubName ERD
Simple Query of table FIFAWC2006_result Sample of natural join Cross product join method
Group by example Sub queries example
Use of 'CHECK' and 'ON DELETE CASCADE' CONSTRAINT FIFAWC2006_ResultPK PRIMARY KEY (MatchNumber), CONSTRAINT FIFAWC2006_ResultFK_Invalid_HomeTeam FOREIGN KEY (HomeTeam) REFERENCES FIFAWC2006_WCTeam (WCTeam) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT FIFAWC2006_ResultFK_Invalid_AwayTeam FOREIGN KEY (AwayTeam) REFERENCES FIFAWC2006_WCTeam (WCTeam) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT FIFAWC2006_Result_Same_Team CHECK (HomeTeam <> AwayTeam) );