BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
Report of database of list of Pakistan international cricket stadiums
1. Assignment Top Sheet
Department of Computer Science
Student Registration Number
GROUP 3
Class Section Semester
BSIT
A 5th
Course Name Course Code
Advance Database Systems CS-208
Student’s Full Name
Group No. 3
Assign Date: Submission Deadline:
After Mid Term 29-02-2018
Course Leader Name Course Coordinator Name
Muhammad Nouman Farooq Mam. Maryam
Assignment No.: Assignment Details:
Semester Project Pakistan International Cricket Stdiums
Instructions to Student:
Please Note: Work presented in an assessment must be your own. Plagiarism is where a
student copies work from another source, published or unpublished (including the work of
another student) and fails to acknowledge the influence of another’s work or to attribute
quotes to the author. Plagiarism is an academic offence and the penalty can be serious. To
detect possible plagiarism we may submit your work to the national plagiarism detection
facility. This searches the Internet and an extensive database of reference material including
other students’ work to identify.
I have read the above information and I confirm that this work is my own and
that it may be processed and stored in the manner described.
Group No. 3 29-02-2018
Signature:.................................................................... Date: .................................................................
Please leave sufficient time to meet the given deadline and do not leave the handing-in of assignments to the last
minute. You are being allowed meaningfull time for any system problems or other issues.
2. PROJECT
Pakistan International Cricket Stadiums
Group MEMBERS:
Name Roll no
1- Sarmad Ali 01-BSIT5A
2- Muhammad Abdullah 02- BSIT5A
3- Hashaam Altaf 38- BSIT5A
4-Syed Muhammad Hanif 45- BSIT5A
5- Noman Rasool 25- BSIT5A
6- Usama Yousaf 48- BSIT5A
7- Hamza Hanif 06- BSIT5A
8- Imran Khan 46- BSIT5A
4. Chapter One
Preliminary study:
We are going to discuss about the cricket stadiums that are internationally
declared for cricket matches in Pakistan. We collected the data from the
internet that how many cricket stadiums are in Pakistan that are declared
internationally for cricket matches.
We came to know that there are 11 Cricket Stadiums for international
matches. These cricket stadiums are located in many different cities of
Pakistan but there is only one international cricket stadium in one city and a
city can have only and only one cricket stadium in it.
• National cricket stadium of Karachi that was built in 1995 and has the crowd
capacity of 34,228.
• Gaddafi cricket Stadium of Lahore that was built in 1959 and has the crowd
capacity of 27,000.
• Iqbal Stadium of Faisalabad that was built in 1978 and has the crowd capacity
of 18,000.
• Jinnah Stadium of Sialkot that was built in 1920 and has a crowd capacity of
20,000.
• Niaz Stadium of Hyderabad that was built in 1959 and has a crowd capacity of
15,000.
• Jinnah Stadium of Gujranwala that was built in 1989 and has the crowd
capacity of 20,000.
• Arbab Stadium of Peshawar that was built in 1995 and has the crowd capacity
of 20,000.
• Rawalpindi Cricket Stadium of Rawalpindi that was built in 1993 and has a
crowd capacity of 25,000.
• Sheikhupura Cricket Stadium of Sheikhupura that was built in 1996 and has
the crowd capacity of 27,000.
• Ayyub Cricket Stadium of Peshawar that was built in 1978 and has the crowd
capacity of 32,000.
5. • Multan Cricket Stadium of Multan that was built in 2001 and has the crowd
capacity of 30,000.
• So, After getting this we completed our Requirements about our Project
Related Data.
Modules of Pakistan International Cricket Stadiums:
1. CITY:
It consists of cityId, cityName and cityProvince.
2. INT_STADIUMS:
It consist of stadiumName, stadiumCapacity, stadiumYearbuilt and CityId.
6. INTRODUCTION
INTIAL TASKS
This Pakistan International Cricket Stadiums project report gives a brief description
on the tasks worked out, development of ERD from the given scenario whereby we
had two entities City and Int_Stadiums with their attributes. Afterward we were able
to build the database using MySQL whereby we two four tables that we developed
from the ERD which had two entities thus by breaking many to many relationships
we were able to come up with two tables. Thus the other task was to write and apply
the SQL queries that could answer the provided questions.
Purpose
The purpose for this project is to design a database system for Pakistan International
Cricket Stadiums and to show the list of all the International Cricket Stadiums of
Pakistan.
Objectives and Outcomes
To come with the database-driven front end applications, queries or requests on the
front end application.
7. CHAPTER TWO
INTRODUCTION
This chapter gives a dramatically presentation of the scenario provided through the
use of the Entity relationship diagram.
ENTITY RELATIONSHIP DIAGRAM CONCEPTUAL DESIG
Degree of Relationship:
Binary because Two Entities.
Type of Relationship:
On to One.
Cardinality:
Both with Mandatory
.
8. Sql Coding:
The coding we are using are truly compiled well and tested well. Our system runs
well and performs queries well and with meaningful output. We are truly sure that
this database system will give the desired needed and wanted by the system
administrator wants. Coding is as follows:
-- Create Database
DROP DATABASE IF EXISTS `pakistan international cricket stadiums`;
CREATE DATABASE IF NOT EXISTS `pakistan international cricket stadiums`;
USE `pakistan international cricket stadiums`;
CREATE TABLE if not exists `pakistan international cricket stadiums`.`CITY`
(
city_Id int (10) primary key,
city_name varchar (20) not null,
city_province varchar (16) not null
);
CREATE TABLE if not exists `pakistan international cricket
stadiums`.`INT_STADIUM`
(
stadium_name varchar (20) PRIMARY KEY,
stadium_capacity varchar (15) not null,
stadium_yearbuilt varchar (15) not null,
city_Id Int (10) not null,
constraint fk_city_Id foreign key (city_Id) references `pakistan international
cricket stadiums`.`city` (city_Id) ON UPDATE cascade ON DELETE cascade
);
10. -- Left Join
select city_name, stadium_name, stadium_capacity from `pakistan international
cricket stadiums`.`city` left join `pakistan international cricket
stadiums`.`INT_stadium` on `city`.`city_Id` = `INT_stadium`.`city_id`
-- Right Join
select city_name, stadium_name, stadium_capacity from `pakistan international
cricket stadiums`.`city` right join `pakistan international cricket
stadiums`.`INT_stadium` on `city`.`city_Id` = `INT_stadium`.`city_id`
-- inner join
select city_name, stadium_name, stadium_capacity from `pakistan international
cricket stadiums`.`city` inner join `pakistan international cricket
stadiums`.`INT_stadium` on `int_stadium`.`stadium_capacity`=
`INT_stadium`.`stadium_capacity`
-- left outer join
select city_province, stadium_name, stadium_capacity, stadium_yearbuilt from
`pakistan international cricket stadiums`.`city` left outer join `pakistan international
cricket stadiums`.`INT_stadium` on `int_stadium`.`stadium_capacity`=
`INT_stadium`.`stadium_capacity`
-- right outer join
select city_province, stadium_name, stadium_capacity, stadium_yearbuilt from
`pakistan international cricket stadiums`.`city` left outer join `pakistan international
cricket stadiums`.`INT_stadium` on `int_stadium`.`stadium_name`=
`INT_stadium`.`stadium_name`
11. -- ALGEBRA
-- Selection or Restriction Operation
/*SELECT * FROM `pakistan international cricket stadiums`.`city`
WHERE city_id > 50;*/
-- Projection operation
/*SELECT stadium_name, stadium_yearbuilt FROM `pakistan international cricket
stadiums`.`int_stadium`;*/
-- A U B (city)
/*
SELECT city_name from `pakistan international cricket stadiums`.`city`
UNION
SELECT city_id FROM `pakistan international cricket stadiums`.`int_stadium`;
*/
-- A - B (city)
/*
SELECT distinct stadium_name FROM `pakistan international cricket
stadiums`.`int_stadium`
WHERE city_id NOT IN (select distinct stadium_name from `pakistan international
cricket stadiums`.`int_stadium`);
*/
-- set Difference Operation
/*
12. SELECT DISTINCT city_id FROM `pakistan international cricket stadiums`.`city`
WHERE city_id NOT IN(
SELECT distinct city_id FROM `pakistan international cricket
stadiums`.`int_stadium`)
*/
-- Intersection Operation
/*
SELECT distinct city_id from `pakistan international cricket stadiums`.`city`
WHERE city_id not IN(select distinct city_id from `pakistan international cricket
stadiums`.`int_stadium`);
SELECT city_id from `pakistan international cricket stadiums`.`city`
UNION
SELECT city_id from `pakistan international cricket stadiums`.`int_stadium`;
SELECT distinct city_id FROM `pakistan international cricket stadiums`.`city`
WHERE city_id NOT IN (select distinct city_id from `pakistan international cricket
stadiums`.`int_stadium`);
*/
-- cartesian product
/*
SELECT * from `pakistan international cricket stadiums`.`int_stadium` CROS JOIN
`pakistan international cricket stadiums`.`city`;
*/
13. CITY
ATTRIBUTE DATA TYPE LENGTH KEY
CityId Varchar 10 Primary key
CityName varchar 20
CityProvince Varchar 16
INT_STADIUM
ATTTRIBUTE DATA TYPE LENGTH KEY
stadiumName Varchar 20 Primary key
StadiumCapacity int 15
StadiumYearbuilt int 15
CityId varchar 10 Foreign Key