1 / 9

HD assignment 2007

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

Download Presentation

HD assignment 2007

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. HD assignment 2007 FIFAWC2006 HO TING CHENG

  2. 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

  3. 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

  4. One to many relationship

  5. Many to Many Relationship

  6. Simple Query of table FIFAWC2006_result Sample of natural join Cross product join method

  7. Group by example Sub queries example

  8. 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) );

  9. Example of View

More Related