ICC_Database
ICC_Database
DBMS PROJECT
All the approvals and the activities are being headed by the admin of
the ICC named as ICCadmin. This will help them to maintain the each
players records, information about the tournament,
Stats of each and every match which is very well required for the
Smooth conduction of the tournaments.
The database also contains the stats of each and every players by
which we can keep track of their rankings and the awards can be
distributed accordingly, which must be done by a good database.
The database rather working on each player works for the each
match also so that we can keep track of each match stats and can
improve the ranking of country team by it. It gives us facility to
manage tournaments and awards accordingly.
The database also contain the information about the board members,
Their names, id and other information so as to ease the functioning
of the database for the users.
ER diagram:
The ER diagram for the database which depicts all the information about how the database
is managed by the admin.
NORMALISATION
1. ICC_Admin
Member_id
Name
Title
Salary
All the attributes are atomic which implies that the table is in 1NF.
The only functional dependency in this table is also only of the primary key.
2. Country_team
Team_id
Team_name
Admitted
Board
Approved_by
All the attributes are atomic which implies that the table is in 1NF. The
only functional dependency in this table is also only of the primary key.
3. Player
Player_id
Player_name
Role
Team_id
Player table is similar to the Icc_admin. So, the table Player also obeys
1NF, 2NF, 3NF and BCNF.
4. Tournament
Tournament_id
Format
Full_member
Associate_member
Women
Youth
Tournament table is similar to the Player. So, the table Touranment also
obeys 1NF, 2NF, 3NF and BCNF.
All the identifying relationships in the ER diagram have been
merged into the tables of their respective weak-entities since they
are redundant.
5. Award
Type
Year
Member_id
Player_id
This table has the only functional dependency as that of the primary key.
(Type,Member_id,Player_id)->Year
So, it is in BCNF which implies it also obeys 1NF, 2NF, 3NF.
6. Match
Match_id
Match_date
Location
Team1_id
Team2_id
Team1_score
Team2_score
Winning_team
Match table is similar to the Player. So, the table Match also obeys
1NF, 2NF, 3NF and BCNF.
7. Match_stats
Match_id
Player_id
Runs
Wickets
Here also, FDs are
Match_id -> (Player_id,Runs,wickets)
So ,it is in BCNF.
8. Player_stats
Player_id
Total_match
Total_run
Avg
Total_wicket
Economy
It is weak entity set so here ,there will be no primary key.
Table is already in BCNF.
9. Ranking
Player_id
Rating
Postion
1. ICC_Admin
2. Country_team
3. Player
4. Tournament
5. Award
6. Match
7. Match_stats
8. Player_stats
9. Ranking
)
CREATE TABLE match_stats (
match_id INT,
player_id VARCHAR2(30),
run INT,
wicket INT,
FOREIGN KEY ( player_id )
REFERENCES player ( player_id ),
FOREIGN KEY ( match_id )
REFERENCES match ( match_id )
)
insert into tournament values(5,'Twenty20','ICC Men''s T20 World Cup','ICC Men''s T20
World Cup Qualifier','ICC Women''s T20 World Cup','None');