Dbms Project Santosh Group
Dbms Project Santosh Group
1. Introduction........................................................................................................................1
1.1 Background.................................................................................................................1
1.2 Objectives....................................................................................................................1
2.1 ER Diagram.................................................................................................................1
3. Database Testing................................................................................................................3
4. T-SQL.................................................................................................................................3
1.2 Objectives
To produce an efficient system in the tournament.
To provide different report for different function
Page 1 of 13
There is one to one relationship between many entities in our er-diagram. They are:
Each team has one coach.
Each team is supported by single sponsor.
Each match is played at particular stadium.
One-to-many
The following shows the one to many relationship in our er-diagram:
Each team has many players.
Each team plays several matches.
Each player has various individual scores.
2.3Schema Design
2.4 Database Development
2.4.1 Entity and Attribute Creation[DDL]
Page 2 of 13
Normalization is a process of organizing the data in database to avoid data
redundancy, insertion anamolyanomaly, update anoamaoly and deletion anoamaoly. It
Referential Integrity
create table team_has
(
Tid integer not null,
Pid integer not null,
constraint fk_team foreign key (Tid) references team,
constraint fk_teamhas foreign key (Pid) references player
);
Page 3 of 13
3. Database Testing
4. T-SQL
4.1 Simple Queries
a. Retrieve all the details of team whose id is 4.
select * from team where tid=04;
e. Retrieve all match detail with matchid between 302 and 304.
Page 4 of 13
select * from match where matchid between 302 and 304;
4.2 Subqueries
a. Retrieve the detail of player who has scored maximum goal.
select*from player,Individual_Score where player.pid=individual_score.pid and
goals= (select max(goals)from individual_score);
b. Retrive the name of player who has scored second heighest goals
4.3 Join
[4.3.1] inner Inner join
select pname, tname from player inner join team_has on
player.pid=team_has.pid inner join team on team_has.tid=team.tid;
Page 5 of 13
left join
select pname, tname from player left join team_has on player.pid=team_has.pid left join
team on team_has.tid=team.tid;
Page 6 of 13
with the help of database design in our management. We got the knowledge about the
importance of integrity and how it can be maintained in our management system with the
help of database management system.
Database design helps us to define, store and retrieve the data for various purpose
while preparing our complete football tournament management system. It also helps in the
process of accessing our data and also for the security of accessed data. As a result, we can
prepare our football tournament management system with the help of database design as it
helps to achieve our objectives i.e. to produce efficient system in our football management
system and to provide report for various functions.
So with the help of these management system we can easily find out the details
of the football tournament.
Page 7 of 13
Page 8 of 13
Page 9 of 13
Page 10 of 13
Page 11 of 13