SlideShare a Scribd company logo
1 of 13
Group No.5
Name
Sarmad Ali
Muhammad Abdullah
Noman Rasool
Hashaam Altaaf
Syed Muhammad Hanif Shah
Imran Ahmed
M.Hamza Hanif
M.Usama Yosuf
Roll No.
01
02
25
38
45
46
6
48
Department of Information Technology
Solution of Laboratory Manual
Submitted By: Group No.5
Registration No.: BSIT-ISP-MLT-grp #5
Session: 2018
Class: BSIT-5th A
Submitted To: Sir Muhammad Nouman Farooq
Course: Advance Database Systems (CS-214)
Project Contents
 Perliminary Study
 Database Structure
 Data-Types
 ERD (Entity Relationship Diagram)
 Schema Diagram
 Database & Table Coding
 Views
 Joins
 Stored Procedures
 Triggers
Indexes
Simulator Used: XAMPP Integrated Development Environment using CONSOLE and Navicat
Graphical User Interface (GUI)
Perliminary study
 We discuss about he Pakistan international stadiums of crickets…..
 In this each INT_STADIUMS contain only one CITY ecah city must belong to one and only one
INT_STADIUM…..
 INSERT INTO `pakistan international stadiums`.`CITY` VALUES (`karachi,sindh`),(`lahore,punjab`)
,(`sialkot,pujab`),
 (`hyderabad,sindh`),(`gujranwala,punjab`),(`peshawar,kpk`),(`rawalpindi,punjab`),(`shiekhupura,punjab`)
,
 (`queeta,balochistan`),(`multan,punjab`);
 INSERT INTO `pakistan international stadiums`.`STADIUM` VALUES
(`stadium_name,stadium_capacity,stadium_yearbuilt`),
 (`natonal cricket stadium karachi,34228,1995`) , (`gadaffi stadium lahore,27000,1959`) , (`iqbal stadium
fsd,18000,1978`) ,
 (`jinnah stadium sialkot,20000,1920`) , (`niaz stadium hyderabad,15000,1959`) , (`jinnah stadium
gujranwala,20000,1989`) ,
 (`arbab stadium peshawar,20000,1995`) , (`rawalpindi stadium,25000,1993`) , (`shiekhupura
stadium,27000,1996`) ,
 (`ayyub stadium queeta,32000,1978`) , (`multan stadium,30000,2001`);
Solution of Database Structure
In this Database
 two Tables
 two Primary Keys
 No Foreign Keys
Solution of Database Types
 text( )
 Varchar( )
Solution of ERD (Entity Relationship Diagram)
Scenario=>in this scenario we study about pakistan cricket international stadiums.in this scenario
Each CITY must contain only one INT-STADIUM and each INT-STADIUM must belong to only and only one CITY.
Each CITY must contain only one INT-STADIUM and
each INT-STADIUM must belong to only and only one
CITY.
Relationships as per Business Rule
•Cordinality> CITY to INT_STADIUM (mandatory)
•Type of relationship> All relationships are one to one type of relationship.
•Degree> binary because of two entities
Database & Table Coding
DROP DATABASE IF EXISTS `pakistan cricket international stadiums`;
CREATE DATABASE IF NOT EXISTS `pakistan cricket international stadiums`;
USE `pakistan cricket international stadiums`;
CREATE TABLE `pakistan cricket international stadiums`.`CITY`
(
city_name varchar (15) NOT NULL,
PRIMARY KEY (city_name),
city_province text (16)
);
CREATE TABLE `pakistan cricket international stadiums`.`INT-STADIUM`
(
stadium_name varchar (14) NOT NULL,
PRIMARY KEY (stadium_name),
stadium_capacity int (5),
stadium_yearbuilt int (4),
city_name varchar (15)
);
Views & Indexes
• In SQL, a view is a virtual table based on the result set of
an SQL statement
• A view contains rows and columns, just like a real table
 create view view_name AS SELECT column_name from
database_name.table_name
Stored-Procedure
• A stored procedure is a set of SQL statements that can be stored in the server
• It is a method to encapsulate repetitive tasks
• They allow for variable declarations, flow control and other useful programming techniques
Syntax
 DELIMITER //
Create procedure show_continent()
Begin
Select *from `pakistan cricket international stadiums`,`CITY`;
END //
Triggers
• Kind of stored procedures
• Use only for DML (is a family of syntax elements similar to a computer programming language used for
selecting, inserting, deleting and updating data in a database) commands
• It fires automatically when these actions are attempted
Syntax
 DELIMITER //
CREATE trigger insertlocation after insert on location for each row
BEGIN
insert into `Pakistan cricket international stadiums`.location VALUES
('@Loc_ID','@Loc_e','@Loc_Country','@Loc_State','@Loc_City');
END //
Indexes
 Use for sorting record
 Create a sorted virtual copy
 Faster for efficient searching
 CREATE INDEX index_name ON database_name.table_name(column_name);

More Related Content

Similar to Group No.5's Solution for Advance Database Systems Project

Interactive SQL POC on Hadoop (Hive, Presto and Hive-on-Tez)
Interactive SQL POC on Hadoop (Hive, Presto and Hive-on-Tez)Interactive SQL POC on Hadoop (Hive, Presto and Hive-on-Tez)
Interactive SQL POC on Hadoop (Hive, Presto and Hive-on-Tez)Sudhir Mallem
 
Best Practices for Building and Deploying Data Pipelines in Apache Spark
Best Practices for Building and Deploying Data Pipelines in Apache SparkBest Practices for Building and Deploying Data Pipelines in Apache Spark
Best Practices for Building and Deploying Data Pipelines in Apache SparkDatabricks
 
Postgres в основе вашего дата-центра, Bruce Momjian (EnterpriseDB)
Postgres в основе вашего дата-центра, Bruce Momjian (EnterpriseDB)Postgres в основе вашего дата-центра, Bruce Momjian (EnterpriseDB)
Postgres в основе вашего дата-центра, Bruce Momjian (EnterpriseDB)Ontico
 
Structuring Spark: DataFrames, Datasets, and Streaming by Michael Armbrust
Structuring Spark: DataFrames, Datasets, and Streaming by Michael ArmbrustStructuring Spark: DataFrames, Datasets, and Streaming by Michael Armbrust
Structuring Spark: DataFrames, Datasets, and Streaming by Michael ArmbrustSpark Summit
 
Real time analytics at uber @ strata data 2019
Real time analytics at uber @ strata data 2019Real time analytics at uber @ strata data 2019
Real time analytics at uber @ strata data 2019Zhenxiao Luo
 
2009 - Basta!: Url rewriting mit iis, asp.net und routing engine
2009 - Basta!: Url rewriting mit iis, asp.net und routing engine2009 - Basta!: Url rewriting mit iis, asp.net und routing engine
2009 - Basta!: Url rewriting mit iis, asp.net und routing engineDaniel Fisher
 
Building highly scalable data pipelines with Apache Spark
Building highly scalable data pipelines with Apache SparkBuilding highly scalable data pipelines with Apache Spark
Building highly scalable data pipelines with Apache SparkMartin Toshev
 
ScalaTo July 2019 - No more struggles with Apache Spark workloads in production
ScalaTo July 2019 - No more struggles with Apache Spark workloads in productionScalaTo July 2019 - No more struggles with Apache Spark workloads in production
ScalaTo July 2019 - No more struggles with Apache Spark workloads in productionChetan Khatri
 
Structuring Spark: DataFrames, Datasets, and Streaming
Structuring Spark: DataFrames, Datasets, and StreamingStructuring Spark: DataFrames, Datasets, and Streaming
Structuring Spark: DataFrames, Datasets, and StreamingDatabricks
 
Spark SQL Catalyst Code Optimization using Function Outlining with Kavana Bha...
Spark SQL Catalyst Code Optimization using Function Outlining with Kavana Bha...Spark SQL Catalyst Code Optimization using Function Outlining with Kavana Bha...
Spark SQL Catalyst Code Optimization using Function Outlining with Kavana Bha...Databricks
 
Jump Start into Apache® Spark™ and Databricks
Jump Start into Apache® Spark™ and DatabricksJump Start into Apache® Spark™ and Databricks
Jump Start into Apache® Spark™ and DatabricksDatabricks
 
JCConf 2022 - New Features in Java 18 & 19
JCConf 2022 - New Features in Java 18 & 19JCConf 2022 - New Features in Java 18 & 19
JCConf 2022 - New Features in Java 18 & 19Joseph Kuo
 
Putting Apache Drill into Production
Putting Apache Drill into ProductionPutting Apache Drill into Production
Putting Apache Drill into ProductionMapR Technologies
 
Spark Machine Learning: Adding Your Own Algorithms and Tools with Holden Kara...
Spark Machine Learning: Adding Your Own Algorithms and Tools with Holden Kara...Spark Machine Learning: Adding Your Own Algorithms and Tools with Holden Kara...
Spark Machine Learning: Adding Your Own Algorithms and Tools with Holden Kara...Databricks
 
MySQL 8.0 Optimizer Guide
MySQL 8.0 Optimizer GuideMySQL 8.0 Optimizer Guide
MySQL 8.0 Optimizer GuideMorgan Tocker
 
An Introduction to Spark with Scala
An Introduction to Spark with ScalaAn Introduction to Spark with Scala
An Introduction to Spark with ScalaChetan Khatri
 
Spark ETL Techniques - Creating An Optimal Fantasy Baseball Roster
Spark ETL Techniques - Creating An Optimal Fantasy Baseball RosterSpark ETL Techniques - Creating An Optimal Fantasy Baseball Roster
Spark ETL Techniques - Creating An Optimal Fantasy Baseball RosterDon Drake
 
关系数据库存储树形结构数据的理想实践 20100222
关系数据库存储树形结构数据的理想实践 20100222关系数据库存储树形结构数据的理想实践 20100222
关系数据库存储树形结构数据的理想实践 20100222Cabin WJ
 

Similar to Group No.5's Solution for Advance Database Systems Project (20)

Interactive SQL POC on Hadoop (Hive, Presto and Hive-on-Tez)
Interactive SQL POC on Hadoop (Hive, Presto and Hive-on-Tez)Interactive SQL POC on Hadoop (Hive, Presto and Hive-on-Tez)
Interactive SQL POC on Hadoop (Hive, Presto and Hive-on-Tez)
 
Best Practices for Building and Deploying Data Pipelines in Apache Spark
Best Practices for Building and Deploying Data Pipelines in Apache SparkBest Practices for Building and Deploying Data Pipelines in Apache Spark
Best Practices for Building and Deploying Data Pipelines in Apache Spark
 
Postgres в основе вашего дата-центра, Bruce Momjian (EnterpriseDB)
Postgres в основе вашего дата-центра, Bruce Momjian (EnterpriseDB)Postgres в основе вашего дата-центра, Bruce Momjian (EnterpriseDB)
Postgres в основе вашего дата-центра, Bruce Momjian (EnterpriseDB)
 
Structuring Spark: DataFrames, Datasets, and Streaming by Michael Armbrust
Structuring Spark: DataFrames, Datasets, and Streaming by Michael ArmbrustStructuring Spark: DataFrames, Datasets, and Streaming by Michael Armbrust
Structuring Spark: DataFrames, Datasets, and Streaming by Michael Armbrust
 
Real time analytics at uber @ strata data 2019
Real time analytics at uber @ strata data 2019Real time analytics at uber @ strata data 2019
Real time analytics at uber @ strata data 2019
 
2009 - Basta!: Url rewriting mit iis, asp.net und routing engine
2009 - Basta!: Url rewriting mit iis, asp.net und routing engine2009 - Basta!: Url rewriting mit iis, asp.net und routing engine
2009 - Basta!: Url rewriting mit iis, asp.net und routing engine
 
Building highly scalable data pipelines with Apache Spark
Building highly scalable data pipelines with Apache SparkBuilding highly scalable data pipelines with Apache Spark
Building highly scalable data pipelines with Apache Spark
 
ScalaTo July 2019 - No more struggles with Apache Spark workloads in production
ScalaTo July 2019 - No more struggles with Apache Spark workloads in productionScalaTo July 2019 - No more struggles with Apache Spark workloads in production
ScalaTo July 2019 - No more struggles with Apache Spark workloads in production
 
sypf1(1)2022.docx
sypf1(1)2022.docxsypf1(1)2022.docx
sypf1(1)2022.docx
 
Cdi implementation
Cdi implementationCdi implementation
Cdi implementation
 
Structuring Spark: DataFrames, Datasets, and Streaming
Structuring Spark: DataFrames, Datasets, and StreamingStructuring Spark: DataFrames, Datasets, and Streaming
Structuring Spark: DataFrames, Datasets, and Streaming
 
Spark SQL Catalyst Code Optimization using Function Outlining with Kavana Bha...
Spark SQL Catalyst Code Optimization using Function Outlining with Kavana Bha...Spark SQL Catalyst Code Optimization using Function Outlining with Kavana Bha...
Spark SQL Catalyst Code Optimization using Function Outlining with Kavana Bha...
 
Jump Start into Apache® Spark™ and Databricks
Jump Start into Apache® Spark™ and DatabricksJump Start into Apache® Spark™ and Databricks
Jump Start into Apache® Spark™ and Databricks
 
JCConf 2022 - New Features in Java 18 & 19
JCConf 2022 - New Features in Java 18 & 19JCConf 2022 - New Features in Java 18 & 19
JCConf 2022 - New Features in Java 18 & 19
 
Putting Apache Drill into Production
Putting Apache Drill into ProductionPutting Apache Drill into Production
Putting Apache Drill into Production
 
Spark Machine Learning: Adding Your Own Algorithms and Tools with Holden Kara...
Spark Machine Learning: Adding Your Own Algorithms and Tools with Holden Kara...Spark Machine Learning: Adding Your Own Algorithms and Tools with Holden Kara...
Spark Machine Learning: Adding Your Own Algorithms and Tools with Holden Kara...
 
MySQL 8.0 Optimizer Guide
MySQL 8.0 Optimizer GuideMySQL 8.0 Optimizer Guide
MySQL 8.0 Optimizer Guide
 
An Introduction to Spark with Scala
An Introduction to Spark with ScalaAn Introduction to Spark with Scala
An Introduction to Spark with Scala
 
Spark ETL Techniques - Creating An Optimal Fantasy Baseball Roster
Spark ETL Techniques - Creating An Optimal Fantasy Baseball RosterSpark ETL Techniques - Creating An Optimal Fantasy Baseball Roster
Spark ETL Techniques - Creating An Optimal Fantasy Baseball Roster
 
关系数据库存储树形结构数据的理想实践 20100222
关系数据库存储树形结构数据的理想实践 20100222关系数据库存储树形结构数据的理想实践 20100222
关系数据库存储树形结构数据的理想实践 20100222
 

More from Sarmad Baloch

Positive matrix by sarmad baloch
Positive matrix by sarmad balochPositive matrix by sarmad baloch
Positive matrix by sarmad balochSarmad Baloch
 
Conversion of in fix pre fix,infix by sarmad baloch
Conversion of in fix pre fix,infix by sarmad balochConversion of in fix pre fix,infix by sarmad baloch
Conversion of in fix pre fix,infix by sarmad balochSarmad Baloch
 
Bnak reconciliation statement by sarmad baloch
Bnak reconciliation statement by sarmad balochBnak reconciliation statement by sarmad baloch
Bnak reconciliation statement by sarmad balochSarmad Baloch
 
Introduction of object oriented analysis & design by sarmad baloch
Introduction of object oriented analysis & design by sarmad balochIntroduction of object oriented analysis & design by sarmad baloch
Introduction of object oriented analysis & design by sarmad balochSarmad Baloch
 
Security_saftety_privacy of computer by sarmad baloch
Security_saftety_privacy of computer by sarmad balochSecurity_saftety_privacy of computer by sarmad baloch
Security_saftety_privacy of computer by sarmad balochSarmad Baloch
 
E commerce (introduction to computer) by sarmad baloch
E commerce (introduction to computer) by sarmad balochE commerce (introduction to computer) by sarmad baloch
E commerce (introduction to computer) by sarmad balochSarmad Baloch
 
Programming languages and programme development of computer by sarmad baloch
Programming languages and programme development of computer by sarmad balochProgramming languages and programme development of computer by sarmad baloch
Programming languages and programme development of computer by sarmad balochSarmad Baloch
 
Introduction to computer & its applications by sarmad baloch
Introduction to computer & its applications by sarmad balochIntroduction to computer & its applications by sarmad baloch
Introduction to computer & its applications by sarmad balochSarmad Baloch
 
Accounting principle & concept by sarmad baloch
Accounting principle & concept by sarmad balochAccounting principle & concept by sarmad baloch
Accounting principle & concept by sarmad balochSarmad Baloch
 
Implement of c & its coding programming by sarmad baloch
Implement of c & its coding  programming by sarmad balochImplement of c & its coding  programming by sarmad baloch
Implement of c & its coding programming by sarmad balochSarmad Baloch
 
The functions of modal auxiliary verbs by sarmad baloch
The functions of modal auxiliary verbs by sarmad balochThe functions of modal auxiliary verbs by sarmad baloch
The functions of modal auxiliary verbs by sarmad balochSarmad Baloch
 
Integrator & diferentiator amplifier presentation by sarmad baloch
Integrator & diferentiator amplifier presentation by sarmad balochIntegrator & diferentiator amplifier presentation by sarmad baloch
Integrator & diferentiator amplifier presentation by sarmad balochSarmad Baloch
 
Ms powerpoint 2007 presentation by sarmad baloch
Ms powerpoint 2007 presentation by sarmad balochMs powerpoint 2007 presentation by sarmad baloch
Ms powerpoint 2007 presentation by sarmad balochSarmad Baloch
 
Semiconductor materials and pn junction by sarmad baloch
Semiconductor materials and pn junction by sarmad balochSemiconductor materials and pn junction by sarmad baloch
Semiconductor materials and pn junction by sarmad balochSarmad Baloch
 
Introduction of BJT,types of Diodes by sarmad baloch
Introduction of BJT,types of Diodes by sarmad balochIntroduction of BJT,types of Diodes by sarmad baloch
Introduction of BJT,types of Diodes by sarmad balochSarmad Baloch
 
Pn junction diode by sarmad baloch
Pn junction diode by sarmad balochPn junction diode by sarmad baloch
Pn junction diode by sarmad balochSarmad Baloch
 
Difference b/w BRITISH vs AMERICAN Language by sarmad khosa
Difference b/w BRITISH vs AMERICAN Language by sarmad khosaDifference b/w BRITISH vs AMERICAN Language by sarmad khosa
Difference b/w BRITISH vs AMERICAN Language by sarmad khosaSarmad Baloch
 
ACTIVE & PASSIVE ELECTRONICS by sarmad khosa
ACTIVE & PASSIVE ELECTRONICS by sarmad khosaACTIVE & PASSIVE ELECTRONICS by sarmad khosa
ACTIVE & PASSIVE ELECTRONICS by sarmad khosaSarmad Baloch
 
MICROSOFT WORD 2007 FULL PRESENTATION BY sarmad khosa
MICROSOFT WORD 2007 FULL PRESENTATION BY sarmad khosaMICROSOFT WORD 2007 FULL PRESENTATION BY sarmad khosa
MICROSOFT WORD 2007 FULL PRESENTATION BY sarmad khosaSarmad Baloch
 
Types of DIODES Basic electronics by sarmad khosa
Types of DIODES Basic electronics by sarmad khosaTypes of DIODES Basic electronics by sarmad khosa
Types of DIODES Basic electronics by sarmad khosaSarmad Baloch
 

More from Sarmad Baloch (20)

Positive matrix by sarmad baloch
Positive matrix by sarmad balochPositive matrix by sarmad baloch
Positive matrix by sarmad baloch
 
Conversion of in fix pre fix,infix by sarmad baloch
Conversion of in fix pre fix,infix by sarmad balochConversion of in fix pre fix,infix by sarmad baloch
Conversion of in fix pre fix,infix by sarmad baloch
 
Bnak reconciliation statement by sarmad baloch
Bnak reconciliation statement by sarmad balochBnak reconciliation statement by sarmad baloch
Bnak reconciliation statement by sarmad baloch
 
Introduction of object oriented analysis & design by sarmad baloch
Introduction of object oriented analysis & design by sarmad balochIntroduction of object oriented analysis & design by sarmad baloch
Introduction of object oriented analysis & design by sarmad baloch
 
Security_saftety_privacy of computer by sarmad baloch
Security_saftety_privacy of computer by sarmad balochSecurity_saftety_privacy of computer by sarmad baloch
Security_saftety_privacy of computer by sarmad baloch
 
E commerce (introduction to computer) by sarmad baloch
E commerce (introduction to computer) by sarmad balochE commerce (introduction to computer) by sarmad baloch
E commerce (introduction to computer) by sarmad baloch
 
Programming languages and programme development of computer by sarmad baloch
Programming languages and programme development of computer by sarmad balochProgramming languages and programme development of computer by sarmad baloch
Programming languages and programme development of computer by sarmad baloch
 
Introduction to computer & its applications by sarmad baloch
Introduction to computer & its applications by sarmad balochIntroduction to computer & its applications by sarmad baloch
Introduction to computer & its applications by sarmad baloch
 
Accounting principle & concept by sarmad baloch
Accounting principle & concept by sarmad balochAccounting principle & concept by sarmad baloch
Accounting principle & concept by sarmad baloch
 
Implement of c & its coding programming by sarmad baloch
Implement of c & its coding  programming by sarmad balochImplement of c & its coding  programming by sarmad baloch
Implement of c & its coding programming by sarmad baloch
 
The functions of modal auxiliary verbs by sarmad baloch
The functions of modal auxiliary verbs by sarmad balochThe functions of modal auxiliary verbs by sarmad baloch
The functions of modal auxiliary verbs by sarmad baloch
 
Integrator & diferentiator amplifier presentation by sarmad baloch
Integrator & diferentiator amplifier presentation by sarmad balochIntegrator & diferentiator amplifier presentation by sarmad baloch
Integrator & diferentiator amplifier presentation by sarmad baloch
 
Ms powerpoint 2007 presentation by sarmad baloch
Ms powerpoint 2007 presentation by sarmad balochMs powerpoint 2007 presentation by sarmad baloch
Ms powerpoint 2007 presentation by sarmad baloch
 
Semiconductor materials and pn junction by sarmad baloch
Semiconductor materials and pn junction by sarmad balochSemiconductor materials and pn junction by sarmad baloch
Semiconductor materials and pn junction by sarmad baloch
 
Introduction of BJT,types of Diodes by sarmad baloch
Introduction of BJT,types of Diodes by sarmad balochIntroduction of BJT,types of Diodes by sarmad baloch
Introduction of BJT,types of Diodes by sarmad baloch
 
Pn junction diode by sarmad baloch
Pn junction diode by sarmad balochPn junction diode by sarmad baloch
Pn junction diode by sarmad baloch
 
Difference b/w BRITISH vs AMERICAN Language by sarmad khosa
Difference b/w BRITISH vs AMERICAN Language by sarmad khosaDifference b/w BRITISH vs AMERICAN Language by sarmad khosa
Difference b/w BRITISH vs AMERICAN Language by sarmad khosa
 
ACTIVE & PASSIVE ELECTRONICS by sarmad khosa
ACTIVE & PASSIVE ELECTRONICS by sarmad khosaACTIVE & PASSIVE ELECTRONICS by sarmad khosa
ACTIVE & PASSIVE ELECTRONICS by sarmad khosa
 
MICROSOFT WORD 2007 FULL PRESENTATION BY sarmad khosa
MICROSOFT WORD 2007 FULL PRESENTATION BY sarmad khosaMICROSOFT WORD 2007 FULL PRESENTATION BY sarmad khosa
MICROSOFT WORD 2007 FULL PRESENTATION BY sarmad khosa
 
Types of DIODES Basic electronics by sarmad khosa
Types of DIODES Basic electronics by sarmad khosaTypes of DIODES Basic electronics by sarmad khosa
Types of DIODES Basic electronics by sarmad khosa
 

Recently uploaded

Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...RKavithamani
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 

Recently uploaded (20)

Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 

Group No.5's Solution for Advance Database Systems Project

  • 1. Group No.5 Name Sarmad Ali Muhammad Abdullah Noman Rasool Hashaam Altaaf Syed Muhammad Hanif Shah Imran Ahmed M.Hamza Hanif M.Usama Yosuf Roll No. 01 02 25 38 45 46 6 48
  • 2. Department of Information Technology Solution of Laboratory Manual Submitted By: Group No.5 Registration No.: BSIT-ISP-MLT-grp #5 Session: 2018 Class: BSIT-5th A Submitted To: Sir Muhammad Nouman Farooq
  • 3. Course: Advance Database Systems (CS-214) Project Contents  Perliminary Study  Database Structure  Data-Types  ERD (Entity Relationship Diagram)  Schema Diagram  Database & Table Coding  Views  Joins  Stored Procedures  Triggers Indexes Simulator Used: XAMPP Integrated Development Environment using CONSOLE and Navicat Graphical User Interface (GUI)
  • 4. Perliminary study  We discuss about he Pakistan international stadiums of crickets…..  In this each INT_STADIUMS contain only one CITY ecah city must belong to one and only one INT_STADIUM…..  INSERT INTO `pakistan international stadiums`.`CITY` VALUES (`karachi,sindh`),(`lahore,punjab`) ,(`sialkot,pujab`),  (`hyderabad,sindh`),(`gujranwala,punjab`),(`peshawar,kpk`),(`rawalpindi,punjab`),(`shiekhupura,punjab`) ,  (`queeta,balochistan`),(`multan,punjab`);  INSERT INTO `pakistan international stadiums`.`STADIUM` VALUES (`stadium_name,stadium_capacity,stadium_yearbuilt`),  (`natonal cricket stadium karachi,34228,1995`) , (`gadaffi stadium lahore,27000,1959`) , (`iqbal stadium fsd,18000,1978`) ,  (`jinnah stadium sialkot,20000,1920`) , (`niaz stadium hyderabad,15000,1959`) , (`jinnah stadium gujranwala,20000,1989`) ,  (`arbab stadium peshawar,20000,1995`) , (`rawalpindi stadium,25000,1993`) , (`shiekhupura stadium,27000,1996`) ,  (`ayyub stadium queeta,32000,1978`) , (`multan stadium,30000,2001`);
  • 5. Solution of Database Structure In this Database  two Tables  two Primary Keys  No Foreign Keys Solution of Database Types  text( )  Varchar( ) Solution of ERD (Entity Relationship Diagram) Scenario=>in this scenario we study about pakistan cricket international stadiums.in this scenario Each CITY must contain only one INT-STADIUM and each INT-STADIUM must belong to only and only one CITY.
  • 6. Each CITY must contain only one INT-STADIUM and each INT-STADIUM must belong to only and only one CITY. Relationships as per Business Rule
  • 7. •Cordinality> CITY to INT_STADIUM (mandatory) •Type of relationship> All relationships are one to one type of relationship. •Degree> binary because of two entities
  • 8. Database & Table Coding DROP DATABASE IF EXISTS `pakistan cricket international stadiums`; CREATE DATABASE IF NOT EXISTS `pakistan cricket international stadiums`;
  • 9. USE `pakistan cricket international stadiums`; CREATE TABLE `pakistan cricket international stadiums`.`CITY` ( city_name varchar (15) NOT NULL, PRIMARY KEY (city_name), city_province text (16) ); CREATE TABLE `pakistan cricket international stadiums`.`INT-STADIUM` ( stadium_name varchar (14) NOT NULL, PRIMARY KEY (stadium_name), stadium_capacity int (5), stadium_yearbuilt int (4), city_name varchar (15) );
  • 10. Views & Indexes • In SQL, a view is a virtual table based on the result set of an SQL statement • A view contains rows and columns, just like a real table  create view view_name AS SELECT column_name from database_name.table_name
  • 11.
  • 12. Stored-Procedure • A stored procedure is a set of SQL statements that can be stored in the server • It is a method to encapsulate repetitive tasks • They allow for variable declarations, flow control and other useful programming techniques Syntax  DELIMITER // Create procedure show_continent() Begin Select *from `pakistan cricket international stadiums`,`CITY`; END //
  • 13. Triggers • Kind of stored procedures • Use only for DML (is a family of syntax elements similar to a computer programming language used for selecting, inserting, deleting and updating data in a database) commands • It fires automatically when these actions are attempted Syntax  DELIMITER // CREATE trigger insertlocation after insert on location for each row BEGIN insert into `Pakistan cricket international stadiums`.location VALUES ('@Loc_ID','@Loc_e','@Loc_Country','@Loc_State','@Loc_City'); END // Indexes  Use for sorting record  Create a sorted virtual copy  Faster for efficient searching  CREATE INDEX index_name ON database_name.table_name(column_name);