0% found this document useful (0 votes)
5 views

ICC_Database

The document outlines a database project for the International Cricket Council (ICC) designed to manage information related to matches, tournaments, and players. It includes an ER diagram, normalization details for various tables, and SQL commands for creating tables and inserting data. The database aims to facilitate the smooth conduction of tournaments and maintain player statistics and rankings.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

ICC_Database

The document outlines a database project for the International Cricket Council (ICC) designed to manage information related to matches, tournaments, and players. It includes an ER diagram, normalization details for various tables, and SQL commands for creating tables and inserting data. The database aims to facilitate the smooth conduction of tournaments and maintain player statistics and rankings.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

NATIONAL INSTITUTE OF TECHNOLOGY ,WARANGAL

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

DBMS PROJECT

International Cricket Council Database

Prayanshu Agarwal-197162 CSE-A

Harendra Bangra-197231 CSE-B

Rahul Kumar Mishra-197176 CSE-A


Problem Statement:
The database design of International Cricket Council(ICC)

In this project we have designed a database for international Cricket


Council(ICC) which helps the system to manage the information on
‘matches’ , ‘tournaments’ , ‘players’ etc. This will be managed by ICC.

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.

Member_ID -> (Name, Title, salary)


So, it is assured that the table does not contain any partial or transitive
dependencies, which also implies that the table is obeying both 1NF, 2NF, 3NF and
BCNF.

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.

Team_id -> (team_Name, admitted, board,approved_by)


So, it is assured that the table does not contain any partial or transitive
dependencies, which also implies that the table is obeying both 1NF, 2NF,
3NF and BCNF.

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

FD: Player_id ->(rating, position)

As only primary key is involved in functional dependency. So the criteria


of 1NF,2NF,3NF and BCNF are satisfied.
RElaTiOnal SChEMaS

1. ICC_Admin

2. Country_team

3. Player

4. Tournament
5. Award

6. Match

7. Match_stats

8. Player_stats
9. Ranking

CREaTiOn Of TaBlE anD inSERTiOn Of DaTa

CREATE TABLE icc_admin (


member_id VARCHAR2(30) PRIMARY KEY,
name VARCHAR2(30),
title VARCHAR2(30),
salary INT
)

CREATE TABLE country_team (


team_id VARCHAR2(30) PRIMARY KEY,
team_name VARCHAR2(30),
admitted INT,
board VARCHAR2(30),
approved_by VARCHAR2(30),
FOREIGN KEY ( approved_by ) REFERENCES icc_admin ( member_id )
)

CREATE TABLE player (


player_id VARCHAR2(30) PRIMARY KEY,
player_name VARCHAR2(30),
role VARCHAR2(30),
team_id VARCHAR2(30),
FOREIGN KEY ( team_id ) REFERENCES country_team
)
CREATE TABLE tournament (
Tournament_id NUMBER PRIMARY KEY,
formate VARCHAR2(50),
full_member VARCHAR2(50),
associate_member VARCHAR2(50),
women VARCHAR2(50),
youth VARCHAR2(50)
)

CREATE TABLE award (


type VARCHAR2(70) PRIMARY KEY,
year INT,
member_id VARCHAR2(30),
player_id VARCHAR2(30),
FOREIGN KEY ( member_id )
REFERENCES icc_admin ( member_id ),
FOREIGN KEY ( player_id )
REFERENCES player ( player_id )
)

CREATE TABLE match (


match_id INT PRIMARY KEY,
match_date INT,
location VARCHAR2(30),
team1_id VARCHAR2(30),
team1_score INT,
team2_id VARCHAR2(30),
team2_score INT,
winning_team VARCHAR2(30),
FOREIGN KEY ( team1_id )
REFERENCES country_team ( team_id ),
FOREIGN KEY ( team2_id )
REFERENCES country_team ( team_id )

)
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 )
)

CREATE TABLE player_stats (


player_id VARCHAR2(30),
total_match INT,
total_run INT,
avg NUMERIC(10, 5),
total_wicket INT,
economy NUMERIC(10,5),
FOREIGN KEY ( player_id )
REFERENCES player ( player_id )
)

CREATE TABLE ranking (


player_id VARCHAR2(30),
rating INT,
position INT,
FOREIGN KEY ( player_id )
REFERENCES player ( player_id )
)
insert into icc_admin values('admin1','Manu Sawhney ','Chairman',1000000);

insert into icc_admin values('admin2','Greg Barclay ','EX-Chairman',950000);

insert into icc_admin values('admin3','Clare Connor ','Chair-Woman',590400);

insert into icc_admin values('admin4','Clive Hitchcock ','Secretary',420000);

insert into icc_admin values('admin5','Ranjan Madugalle ','Chief Refree',40000);

insert into icc_admin values('admin6','Kyle Coetzer ','Associate Repr.',490000);

insert into icc_admin values('admin7','David Kendix ','Statistician',140000);

insert into icc_admin values('admin8','Matthew Mott ','Coach Repr.',306000);

insert into icc_admin values('admin9','Nathalie Germanos ','Media Repr.',50000);

insert into icc_admin values('admin10','David White ','Member Repr.',100000);

insert into country_team values('IND','India',1926,'BCCI','admin1');

insert into country_team values('AUS','Australia',1909,'CA','admin3');

insert into country_team values('ENG','England',1909,'ECB','admin4');

insert into country_team values('SA','South Africa',1909,'CSA','admin2');

insert into country_team values('WI','West Indies',1926,'WCB','admin4');

insert into country_team values('PAK','Pakistan',1952,'PCB','admin6');

insert into country_team values('SL','Sri Lanka',1981,'SLC','admin7');

insert into country_team values('BAN','Bangladesh',2000,'BCB','admin3');

insert into country_team values('AFG','Afghanistan',2017,'ACB','admin2');

insert into country_team values('ZIMB','Zimbabwe',1992,'ZC','admin6');


insert into player values('p1','Virat Kohli','Captain','IND');

insert into player values('p2','Tim Paine','Captain','AUS');

insert into player values('p3','Joe Root','Captain','ENG');

insert into player values('p4','Babar Azam','Captain','PAK');

insert into player values('p5','Dimuth Karunaratne','Captain','SL');

insert into player values('p6','Sean Williams','Captain','ZIMB');

insert into player values('p7','Asghar Afghan','Captain','AFG');

insert into player values('p8','Dean Elgar','Captain','SA');

insert into player values('p9','Mominul Haque','Captain','BAN');

insert into player values('p10','Kraigg Brathwaite','Captain','WI');

insert into player values('p11','Rohit Sharma','Vice-Captain','IND');

insert into player values('p12','Pat Cummins','Vice-Captain','AUS');

insert into player values('p13','Ben Stokes','Vice-Captain','ENG');

insert into player values('p14','Shadab Khan','Vice-Captain','PAK');

insert into player values('p15','Dinesh Chandimal','Vice-Captain','SL');

insert into player values('p16','Craig Ervine','Vice-Captain','ZIMB');

insert into player values('p17','Rashid Khan','Vice-Captain','AFG');

insert into player values('p18','Temba Bavuma','Vice-Captain','SA');

insert into player values('p19','Mahmudullah','Vice-Captain','BAN');

insert into player values('p20','Roston Chase','Vice-Captain','WI');


insert into tournament values(1,'Test','ICC World Test
Championship','None','None','None');

insert into tournament values(2,'One-Day','ICC Cricket World Cup','None',' ICC


Women''s Cricket World Cup','ICC Under-19 Cricket World Cup');

insert into tournament values(3,'One-Day','None','ICC Cricket World Cup QualifIer','ICC


Women''s Championship','ICC Under-19 Cricket World Cup');

insert into tournament values(4,'One-Day','ICC Cricket World Cup Super League','ICC


Cricket World Cup League 2','None','ICC Under-19 Cricket World Cup');

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');

insert into award values('ICC Men''s Cricketer of the Year',2018,'admin2','p1');

insert into award values('ICC Men''s Test Player of the Year',2018,'admin3','p1');

insert into award values('ICC Men''s ODI Player of the Year',2018,'admin5','p11');

insert into award values('ICC ODI Team of the Year',2019,'admin7','p4');

insert into award values('Spirit of the Year',2019,'admin2','p1');

insert into award values('ICC Captain of the year',2019,'admin2','p1');

insert into match values(1,1986,'INDIA','IND',256,'AUS',240,'IND');

insert into match values(2,1975,'LONDON','WI',258,'AUS',174,'WI');

insert into match values(3,1945,'SOUTH AFRICA','WI',146,'BAN',155,'BAN');

insert into match values(4,1993,'SRI LANKA','ENG',360,'AUS',325,'ENG');


insert into match values(5,1997,'AUSTRALIA','SL',164,'AUS',136,'SL');

insert into match values(6,1998,'NEW YORK','BANG',192,'ZIMB',197,'ZIMB');

insert into match values(7,1999,'ENGLAND','IND',256,'PAK',165,'IND');

insert into match values(8,2005,'INDIA','IND',325,'ENG',340,'ENG');

insert into match values(9,2013,'WEST IDNIES','PAK',148,'AUS',256,'AUS');

insert into match values(10,2015,'ENGLAND','SA',196,'IND',356,'IND');

insert into match_stats values(1,'p1',56,2);

insert into match_stats values(2,'p10',89,1);

insert into match_stats values(3,'p9',46,0);

insert into match_stats values(4,'p3',35,3);

insert into match_stats values(5,'p2',96,0);

insert into match_stats values(1,'p11',78,1);

insert into match_stats values(4,'p12',36,1);

insert into match_stats values(7,'p4',45,1);

insert into match_stats values(8,'p13',93,0);

insert into match_stats values(3,'p8',16,2);

insert into player_stats values('p1',243,3535,43.5,27,34.9);

insert into player_stats values('p6',324,3331,23.5,9,46,35.3);

insert into player_stats values('p7',543,5435,56.7,17,25.8);


insert into player_stats values('p8',353,5633,63.2,27,45.9);

insert into player_stats values('p5',145,2553,64.1,27,63.7);

insert into player_stats values('p9',635,5678,45.9,28,65.9);

insert into player_stats values('p6',134,2456,23.7,37,66.4);

insert into player_stats values('p4',254,6435,24.6,19,56.7);

insert into player_stats values('p3',453,6743,58.1,26,66.5);

insert into player_stats values('p10',145,3543,26.1,29,69.3);

insert into ranking values('p1',343,1);

insert into ranking values('p3',543,6);

insert into ranking values('p4',643,7);

insert into ranking values('p17',637,25);

insert into ranking values('p5',367,8);

insert into ranking values('p9',274,56);

insert into ranking values('p8',398,23);

insert into ranking values('p12',578,14);

insert into ranking values('p15',389,24);

insert into ranking values('p7',789,34);

You might also like