Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
o ‫بسم‬‫الرحمن‬ ‫هللا‬‫الرحيم‬
DATABASE SYSTEM
ZAIN-UL-ABEDIN
Muhammad Shariq
Hamza Yasin
Daniyal Saeed A Shoe Manufacturing Store
Mid-Term
Project
There is a shoe manufacturing store, who deals with different
dealers and customers. So we make a database detailed design...
Employee
Employee Details
Dealer Details
Manufacturing
Stock Details
Customer Invoice Number
Invoice Details
A Shoe Manufa...
Zain 0315-4495944 Male 32street,Lahore Islam Brown_Leather zain.waseem.zw@gmail.com 100,0000 Brown_Leather InProcess 0
Zai...
200 500 200 900 1500 Zahid 042-9782378 Gujarat Zeeshan 99street,Lahore 0324-876224 1500 null Brown_Leather
400 800 300 150...
1st Normalization
In our first normalization form our raw data was going to be clear, we clearly found 4
entities in our f...
Dealers Customers
200 500 200 900 1500 Zahid 042-9782378 Gujrat Zeeshan 99street,Lahore 0324-876224 1500 Null Brown_Leathe...
2nd Normalization
In the 2nd normal form it’s been clear that what are the attributes of the tables that we’ve
been clarif...
Dealers Customers
Sole
Cost
Leather
Cost
Labor
Cost
Cost
Price
Retail
Price Name Phone Locations Name Address Phone Cash B...
3rd Normalization
In the 3rd Normalization form we break our cubic data into colonial type and made easy to
access. As we ...
Sr
#
Product Status Qty
Sole
Cost
Leather
Cost
Labor
Cost
Cost
Price
Retail
Price
1 Brown_Leather InProcess 0 200 500 200 ...
Customer# Name Address Phone Cash Balance Purchased Things
1 Zeeshan 99street,Lahore 0324-876224 1500 null Brown_Leather
1...
4th Normalization
In the 4th Normal form dealer# and serial# was not suiting on the tables so we just assign
dealer code t...
Product
Code
Product Status
Sole
Cost
Leather
Cost
Labor
Cost
Qty
Cost
Price
Retail
Price
BL1 Brown_Leather InProcess 200 ...
Customer# Name Address Phone Invoice# Quantity Cash Balance Purchased Things
1 Zeeshan 99street,Lahore 0324-876224 98765 1...
5th Normalization
Those four entities on which we were working before 4 normalizations were not enough to
fulfill our requ...
Product Code
(P.K)
Product
Sole
Cost
Leather
Cost
Labor
Cost
BL1 Brown_Leather 200 500 200
WL2 White_Leather 400 800 300
B...
Customer#
(P.K)
Name Address Phone
1 Zeeshan 99street,Lahore 0324-876224
2 Amjad 19street,Lahore 0321-412424
3 Ramal 118st...
6th Normalization
Breakdown of tables were still continue even in the 6th normal form. We broke the entity
employee into t...
Staff Code
(P.K)
Phone Appoint Date Address Region E-mail Salary
SM20127 0315-4495944 11-11-2012 32street,Lahore Islam zai...
Product Code
(P.K)
Product
Sole
Cost
Leather
Cost
Labor
Cost
Status
BL1 Brown_Leather 200 500 200 InProcess
WL2 White_Leat...
Dealer
Code (P.K)
Name
G1 Zahid
R2 Maqsood
L3 Tariq
I4 Shameer
F6 Tariq
Dealers
Dealer
Code (F.K)
Phone Locations
G1 042-9...
Invoice#
(F.K)
Quantity Cash Balance Purchased Things
98765 1 1500 Null Brown_Leather
98765 1 3000 Null Parie_Cardin
98766...
7th Normalization
At the start of 7th normal form we were assured that we just need to break many to many
relationships an...
Staff Code
(F.K)
Phone Appoint Date Address Region E-mail Salary
SM20127 0315-4495944 11-11-2012 32street,Lahore Islam zai...
Product Code
(P.K)
Product Status
BL1 Brown_Leather InProcess
WL2 White_Leather Manufactured
BL3 Black_Leather InProcess
P...
Stock_Code
(FK)
Dealer_Code
(F.K)
SC11 G1
SC12 G1
SC13 G1
SC11 R2
SC14 R2
SC15 R2
SC16 R2
SC11 L3
SC17 L3
SC18 L4
SC19 L4
...
Dealer
Code (FK)
Customer#
(FK)
G1 1
G1 2
G1 3
R2 1
R2 4
R2 5
L3 6
L3 5
L3 7
L4 8
L4 9
F6 10
F6 11
Bridge_D_to_C
Customer#...
Invoice#
(FK)
Quantity Cash Balance Purchased Things
98765 1 1500 Null Brown_Leather
98765 1 3000 Null Parie_Cardin
98766 ...
Employee
PK Staff_Code
Name
Sex
Employee_Details
<FK> Staff_Code
Phone
Appoint_Date
Address
Region
E-mail
Manufacturing
PK...
Thank You 
Upcoming SlideShare
Loading in …5
×

Database Shoe Manufacturing Store Project

671 views

Published on

Database Shoe Manufacturing Store Project

Published in: Education
  • Be the first to comment

Database Shoe Manufacturing Store Project

  1. 1. o ‫بسم‬‫الرحمن‬ ‫هللا‬‫الرحيم‬
  2. 2. DATABASE SYSTEM ZAIN-UL-ABEDIN Muhammad Shariq Hamza Yasin Daniyal Saeed A Shoe Manufacturing Store Mid-Term Project
  3. 3. There is a shoe manufacturing store, who deals with different dealers and customers. So we make a database detailed design that involves a process from manufacturing of shoe to the customer hand. Scenario
  4. 4. Employee Employee Details Dealer Details Manufacturing Stock Details Customer Invoice Number Invoice Details A Shoe Manufacturing Store Mid-Term Project ER-Diagram Dealers Raw_Material Employee_Area_of_Work
  5. 5. Zain 0315-4495944 Male 32street,Lahore Islam Brown_Leather zain.waseem.zw@gmail.com 100,0000 Brown_Leather InProcess 0 Zain 0315-4495944 Male 32street,Lahore Islam White_Leather zain.waseem.zw@gmail.com 100,0000 White_Leather Manufactured 10,000 Hamza 0305-9987654 Male 12street,Peshawar Islam Parie_Cardin hamzayasin@hotmail.com 20,000 Black_Leather InProcess 0 Hamza 0305-9987654 Male 12street,Peshawar Islam Black_Leather hamzayasin@hotmail.com 20,000 Parie_Cardin InProcess 0 Syrus 0311-3123422 Male 06street,Kashmir Christian Farin_Joel Syrus.isaam@techno.com 15,000 Farin_Joel Manufactured 30,000 Syrus 0311-3123422 Male 06street,Kashmir Christian Farin_Pearl Syrus.isaam@techno.com 15,000 Farin_Pearl Manufactured 50,000 Anjam 0331-1323233 Female 11street,Rawalpindi Hindu Ava anjam.mark@techno.com 35,000 Abva InProcess 0 Shariq 0315-8765432 Male 42street,Gujrat Islam Bava shariqansari@yahoo.com 55,000 Bava Manufactured 50,000 Daniel 0321-1323214 Male 09street,Karachi Islam Festival_Shoes daniyalsaeed@techno.com 85,000 Festival_Shoes InProcess 0 Sania 0333-1232342 Female 07street,Faislabad Islam DJ_Shine Sania.sanam@gmail.com 75,000 Dj_Shine Manufactured 45,000 Sania 0333-1232342 Female 07street,Faislabad Islam Joan_Brown Sania.sanam@gmail.com 75,000 Joan_Brown Manufactured 50,000 Daniel 0321-1323214 Male 09street,Karachi Islam War_Zone daniyalsaeed@techno.com 85,000 Laze_Round Manufactured 70,000 War_Zone InProcess 0 Raw Data At very first we thought what should be involved in our data. After thinking we made a rough table content which is based on different bulky Information like; Name, address, religion, shoe type, gender, price, salary, Location and etc. The information or data we have been collected was not in a manner way. So we apply 1st normalization form on our collected raw data.
  6. 6. 200 500 200 900 1500 Zahid 042-9782378 Gujarat Zeeshan 99street,Lahore 0324-876224 1500 null Brown_Leather 400 800 300 1500 2500 Maqsood 021-7652432 Rawalpindi Zeeshan 99street,Lahore 0324-876224 3000 null Parie_Cardin 300 800 100 1200 1800 Tariq 091-9867543 Lahore Amjad 19street,Lahore 0321-412424 1500 null Brown_Leather 500 1500 500 2500 3000 Shameer 018-7265432 Islamabad Amjad 19street,Lahore 0321-412424 2400 null Farin_Pearl 700 1800 1000 3500 4000 Tariq 021-2376543 Lahore Amjad 19street,Lahore 0321-412424 3900 100 White_Leather 500 1200 200 1900 2400 Tariq 021-8765454 Faisalabad Ramal 118street,Peshawar 0423-132412 90,000 null Parie_Cardin 400 1300 300 2000 2500 Kashif 191street,Islamabad 0213-324324 45,000 null Farin_Joel 800 1700 500 3000 3700 Anaam 71street,Lahore 0913-324214 34,000 1,000 Farin_Joel 800 1200 200 2200 2700 Rafooq 11street,Karachi 0314-132414 50,000 null Black_Leather 550 950 600 2100 2600 Rehan 1street,Sheikhupura 0313-098763 40,000 10,000 Joan_Brown 450 950 400 1800 2300 Rehan 9street,Gujranwala 0423-987654 70,000 null Laze_Round Anaam 5street,Faislabad 0213-765432 50,000 null Bava Kashif 11street,Islamabad` 0123-987654 50,000 null Joan_Brown Ramal 111street,Lahore 0423-987653 50,000 null Farin_Pearl
  7. 7. 1st Normalization In our first normalization form our raw data was going to be clear, we clearly found 4 entities in our first normal form and these entities were: Employee Information, Manufacturing Details, Dealer Information and customer’s details vice versa. But still we were confused in our data, because it’s still unclear for database understanding, we were not clear that what these rows and columns are actually representing. So we decided to do 2nd normalization form so that may be our data comes out clearly. Employee Manufacturing Zain 0315-4495944 Male 32street,Lahore Islam Brown_Leather zain.waseem.zw@gmail.com 100,0000 Brown_Leather InProcess 500 Zain 0315-4495944 Male 32street,Lahore Islam White_Leather zain.waseem.zw@gmail.com 100,0000 White_Leather Manufactured 10,000 Hamza 0305-9987654 Male 12street,Peshawar Islam Parie_Cardin hamzayasin@hotmail.com 20,000 Black_Leather InProcess 250 Hamza 0305-9987654 Male 12street,Peshawar Islam Black_Leather hamzayasin@hotmail.com 20,000 Parie_Cardin InProcess 300 Syrus 0311-3123422 Male 06street,Kashmir Christian Farin_Joel Syrus.isaam@techno.com 15,000 Farin_Joel Manufactured 30,000 Syrus 0311-3123422 Male 06street,Kashmir Christian Farin_Pearl Syrus.isaam@techno.com 15,000 Farin_Pearl Manufactured 50,000 Anjam 0331-1323233 Female 11street,Rawalpindi Hindu Ava anjam.mark@techno.com 35,000 Abva InProcess 100 Shariq 0315-8765432 Male 42street,Gujrat Islam Bava shariqansari@yahoo.com 55,000 Bava Manufactured 50,000 Daniel 0321-1323214 Male 09street,Karachi Islam Festival_Shoes daniyalsaeed@techno.com 85,000 Festival_Shoes InProcess 45 Sania 0333-1232342 Female 07street,Faislabad Islam DJ_Shine Sania.sanam@gmail.com 75,000 Dj_Shine Manufactured 45,000 Sania 0333-1232342 Female 07street,Faislabad Islam Joan_Brown Sania.sanam@gmail.com 75,000 Joan_Brown Manufactured 50,000 Daniel 0321-1323214 Male 09street,Karachi Islam War_Zone daniyalsaeed@techno.com 85,000 Laze_Round Manufactured 70,000 War_Zone InProcess 2000
  8. 8. Dealers Customers 200 500 200 900 1500 Zahid 042-9782378 Gujrat Zeeshan 99street,Lahore 0324-876224 1500 Null Brown_Leather 400 800 300 1500 2500 Maqsood 021-7652432 Rawalpindi Zeeshan 99street,Lahore 0324-876224 3000 Null Parie_Cardin 300 800 100 1200 1800 Tariq 091-9867543 Lahore Amjad 19street,Lahore 0321-412424 1500 Null Brown_Leather 500 1500 500 2500 3000 Shameer 018-7265432 Islamabad Amjad 19street,Lahore 0321-412424 2400 Null Farin_Pearl 700 1800 1000 3500 4000 Tariq 021-2376543 Lahore Amjad 19street,Lahore 0321-412424 3900 100 White_Leather 500 1200 200 1900 2400 Tariq 021-8765454 Faisalabad Ramal 118street,Peshawar 0423-132412 90,000 Null Parie_Cardin 400 1300 300 2000 2500 Kashif 191street,Islamabad 0213-324324 45,000 Null Farin_Joel 800 1700 500 3000 3700 Anaam 71street,Lahore 0913-324214 34,000 1,000 Farin_Joel 800 1200 200 2200 2700 Rafooq 11street,Karachi 0314-132414 50,000 Null Black_Leather 550 950 600 2100 2600 Rehan 1street,Sheikhupura 0313-098763 40,000 10,000 Joan_Brown 450 950 400 1800 2300 Rehan 9street,Gujranwala 0423-987654 70,000 Null Laze_Round Anaam 5street,Faislabad 0213-765432 50,000 Null Bava Kashif 11street,Islamabad` 0123-987654 50,000 Null Joan_Brown Ramal 111street,Lahore 0423-987653 50,000 Null Farin_Pearl
  9. 9. 2nd Normalization In the 2nd normal form it’s been clear that what are the attributes of the tables that we’ve been clarify before in our 1st normal form. We named those attributes in their respective tables and force our brain to think deep and to find more valuable stuff from this messing information. And our data was in cubic form that creates turmoil. So this thing gives us sock to do 3rd normal form. Employee Manufacturing Name Phone Sex Address Region Area_of_Work E-mail Salary Product Status Qty Zain 0315-4495944 Male 32street,Lahore Islam Brown_Leather zain.waseem.zw@gmail.com 100,0000 Brown_Leather InProcess 500 Zain 0315-4495944 Male 32street,Lahore Islam White_Leather zain.waseem.zw@gmail.com 100,0000 White_Leather Manufactured 10,000 Hamza 0305-9987654 Male 12street,Peshawar Islam Parie_Cardin hamzayasin@hotmail.com 20,000 Black_Leather InProcess 250 Hamza 0305-9987654 Male 12street,Peshawar Islam Black_Leather hamzayasin@hotmail.com 20,000 Parie_Cardin InProcess 300 Syrus 0311-3123422 Male 06street,Kashmir Christian Farin_Joel Syrus.isaam@techno.com 15,000 Farin_Joel Manufactured 30,000 Syrus 0311-3123422 Male 06street,Kashmir Christian Farin_Pearl Syrus.isaam@techno.com 15,000 Farin_Pearl Manufactured 50,000 Anjam 0331-1323233 Female 11street,Rawalpindi Hindu Ava anjam.mark@techno.com 35,000 Abva InProcess 100 Shariq 0315-8765432 Male 42street,Gujrat Islam Bava shariqansari@yahoo.com 55,000 Bava Manufactured 50,000 Daniel 0321-1323214 Male 09street,Karachi Islam Festival_Shoes daniyalsaeed@techno.com 85,000 Festival_Shoes InProcess 45 Sania 0333-1232342 Female 07street,Faislabad Islam DJ_Shine Sania.sanam@gmail.com 75,000 Dj_Shine Manufactured 45,000 Sania 0333-1232342 Female 07street,Faislabad Islam Joan_Brown Sania.sanam@gmail.com 75,000 Joan_Brown Manufactured 50,000 Daniel 0321-1323214 Male 09street,Karachi Islam War_Zone daniyalsaeed@techno.com 85,000 Laze_Round Manufactured 70,000 War_Zone InProcess 2000
  10. 10. Dealers Customers Sole Cost Leather Cost Labor Cost Cost Price Retail Price Name Phone Locations Name Address Phone Cash Balance Purchased Things 200 500 200 900 1500 Zahid 042-9782378 Gujarat Zeeshan 99street,Lahore 0324-876224 1500 Null Brown_Leather 400 800 300 1500 2500 Maqsood 021-7652432 Rawalpindi Zeeshan 99street,Lahore 0324-876224 3000 Null Parie_Cardin 300 800 100 1200 1800 Tariq 091-9867543 Lahore Amjad 19street,Lahore 0321-412424 1500 Null Brown_Leather 500 1500 500 2500 3000 Shameer 018-7265432 Islamabad Amjad 19street,Lahore 0321-412424 2400 Null Farin_Pearl 700 1800 1000 3500 4000 Tariq 021-2376543 Lahore Amjad 19street,Lahore 0321-412424 3900 100 White_Leather 500 1200 200 1900 2400 Tariq 021-8765454 Faisalabad Ramal 118street,Peshawar 0423-132412 90,000 Null Parie_Cardin 400 1300 300 2000 2500 Kashif 191street,Islamabad 0213-324324 45,000 Null Farin_Joel 800 1700 500 3000 3700 Anaam 71street,Lahore 0913-324214 34,000 1,000 Farin_Joel 800 1200 200 2200 2700 Rafooq 11street,Karachi 0314-132414 50,000 Null Black_Leather 550 950 600 2100 2600 Rehan 1street,Sheikhupura 0313-098763 40,000 10,000 Joan_Brown 450 950 400 1800 2300 Rehan 9street,Gujranwala 0423-987654 70,000 Null Laze_Round Anaam 5street,Faislabad 0213-765432 50,000 Null Bava Kashif 11street,Islamabad` 0123-987654 50,000 Null Joan_Brown Ramal 111street,Lahore 0423-987653 50,000 Null Farin_Pearl
  11. 11. 3rd Normalization In the 3rd Normalization form we break our cubic data into colonial type and made easy to access. As we were having data redundancy in our previous normal form so we add new columns with our four entities and assigned them numbers. e.g. staff#, serial#, dealer#, customer# respectively. This Action stops a bit amount of data redundancy but still the solution was not found. So this bulky data force us to think more on our scenario. Staff# Name Phone Sex Address Region Area_of_Work E-mail Salary 7 Zain 0315-4495944 Male 32street,Lahore Islam Brown_Leather, White_Leather zain.waseem.zw@gmail.com 100,0000 8 Shariq 0315-8765432 Male 42street,Gujrat Islam Bava shariqansari@yahoo.com 150,0000 9 Hamza 0305-9987654 Male 12street,Peshawar Islam Parie_Cardin, Black_Leather hamzayasin@hotmail.com 50,000 0 Daniel 0321-1323214 Male 09street,Karachi Islam Festival_Shoes, War_Zone daniyalsaeed@techno.com 90,000 1 Sania 0333-1232342 Female 07street,Faislabad Islam DJ_Shine, Joan_Brown Sania.sanam@gmail.com 45,000 2 Syrus 0311-3123422 Male 06street,Kashmir Christian Farin_Joel, Farin_Pearl Syrus.isaam@techno.com 35,000 3 Anjam 0331-1323233 Female 11street,Rawalpindi Hindu Ava anjam.mark@techno.com 25,000 Employee
  12. 12. Sr # Product Status Qty Sole Cost Leather Cost Labor Cost Cost Price Retail Price 1 Brown_Leather InProcess 0 200 500 200 900 1500 2 White_Leather Manufactured 10,000 400 800 300 1500 2500 3 Black_Leather InProcess 0 300 800 100 1200 1800 4 Parie_Cardin InProcess 0 500 1500 500 2500 3000 5 Farin_Joel Manufactured 30,000 700 1800 1000 3500 4000 6 Farin_Pearl Manufactured 50,000 500 1200 200 1900 2400 7 Abva InProcess 0 400 1300 300 2000 2500 8 Bava Manufactured 50,000 800 1700 500 3000 3700 9 Festival_Shoes InProcess 0 800 1200 200 2200 2700 10 Dj_Shine Manufactured 45,000 550 950 600 2100 2600 11 Joan_Brown Manufactured 50,000 450 950 400 1800 2300 12 Laze_Round Manufactured 70,000 100 400 400 900 1500 13 War_Zone InProcess 0 300 700 500 1500 2500 Manufacturing Dealers Dealer# Name Phone Locations 1 Zahid 042-9782378 Gujarat 2 Maqsood 021-7652432 Rawalpindi 3 Tariq 091-9867543 Lahore 4 Shameer 018-7265432 Islamabad 5 Tariq 021-2376543 Lahore 6 Tariq 021-8765454 Faisalabad
  13. 13. Customer# Name Address Phone Cash Balance Purchased Things 1 Zeeshan 99street,Lahore 0324-876224 1500 null Brown_Leather 1 Zeeshan 99street,Lahore 0324-876224 3000 null Parie_Cardin 2 Amjad 19street,Lahore 0321-412424 1500 null Brown_Leather 2 Amjad 19street,Lahore 0321-412424 2400 null Farin_Pearl 2 Amjad 19street,Lahore 0321-412424 3900 100 White_Leather 3 Ramal 118street,Peshawar 0423-132412 90,000 null Parie_Cardin 4 Kashif 191street,Islamabad 0213-324324 45,000 null Farin_Joel 5 Anaam 71street,Lahore 0913-324214 34,000 1,000 Farin_Joel 6 Rafooq 11street,Karachi 0314-132414 50,000 null Black_Leather 7 Rehan 1street,Sheikhupura 0313-098763 40,000 10,000 Joan_Brown 7 Rehan 9street,Gujranwala 0423-987654 70,000 null Laze_Round 8 Anaam 5street,Faislabad 0213-765432 50,000 null Bava 9 Kashif 11street,Islamabad` 0123-987654 50,000 null Joan_Brown 10 Ramal 111street,Lahore 0423-987653 50,000 null Farin_Pearl Customers
  14. 14. 4th Normalization In the 4th Normal form dealer# and serial# was not suiting on the tables so we just assign dealer code to the entity named as dealer, and product code to the entity named as Manufacturing. But still we are thinking that these just four entities are not enough to fulfill our requirements. So we decided to do 5th normal form. Staff # Name Phone Sex Appoint Date Address Region Area_of_Work E-mail Salary 7 Zain 0315-4495944 Male 11-11-2012 32street,Lahore Islam BL1,WL2 zain.waseem.zw@gmail.com 100,0000 8 Shariq 0315-8765432 Male 11-03-2000 42street,Gujrat Islam BA8 shariqansari@yahoo.com 150,0000 9 Hamza 0305-9987654 Male 24-01-2008 12street,Peshawar Islam PC4,BL3 hamzayasin@hotmail.com 50,000 0 Daniel 0321-1323214 Male 31-04-2005 09street,Karachi Islam FS9,WZ13 daniyalsaeed@techno.com 90,000 1 Sania 0333-1232342 Female 06-07-2002 07street,Faislabad Islam DS10,JB11 Sania.sanam@gmail.com 45,000 2 Syrus 0311-3123422 Male 15-07-2009 06street,Kashmir Christian FJ5,FP6 Syrus.isaam@techno.com 35,000 3 Anjam 0331-1323233 Female 03-09-2006 11street,Rawalpindi Hindu AA7 anjam.mark@techno.com 25,000 Employee
  15. 15. Product Code Product Status Sole Cost Leather Cost Labor Cost Qty Cost Price Retail Price BL1 Brown_Leather InProcess 200 500 200 0 900 1500 WL2 White_Leather Manufactured 400 800 300 10,000 1500 2500 BL3 Black_Leather InProcess 300 800 100 0 1200 1800 PC4 Parie_Cardin InProcess 500 1500 500 0 2500 3000 FJ5 Farin_Joel Manufactured 700 1800 1000 30,000 3500 4000 FP6 Farin_Pearl Manufactured 500 1200 200 50,000 1900 2400 AA7 Abva InProcess 400 1300 300 0 2000 2500 BA8 Bava Manufactured 800 1700 500 50,000 3000 3700 FS9 Festival_Shoes InProcess 800 1200 200 0 2200 2700 DS10 Dj_Shine Manufactured 550 950 600 45,000 2100 2600 JB11 Joan_Brown Manufactured 450 950 400 50,000 1800 2300 LR12 Laze_Round Manufactured 100 400 400 70,000 900 1500 WZ13 War_Zone InProcess 300 700 500 0 1500 2500 Manufacturing Dealer Code Name Phone Locations G1 Zahid 042-9782378 Gujarat R2 Maqsood 021-7652432 Rawalpindi L3 Tariq 091-9867543 Lahore I4 Shameer 018-7265432 Islamabad L5 Tariq 021-2376543 Lahore F6 Tariq 021-8765454 Faisalabad Dealer
  16. 16. Customer# Name Address Phone Invoice# Quantity Cash Balance Purchased Things 1 Zeeshan 99street,Lahore 0324-876224 98765 1 1500 null Brown_Leather 1 Zeeshan 99street,Lahore 0324-876224 98765 1 3000 null Parie_Cardin 2 Amjad 19street,Lahore 0321-412424 98766 1 1500 null Brown_Leather 2 Amjad 19street,Lahore 0321-412424 98766 1 2400 null Farin_Pearl 2 Amjad 19street,Lahore 0321-412424 98766 1 3900 100 White_Leather 3 Ramal 118street,Peshawar 0423-132412 98767 1 90,000 null Parie_Cardin 4 Kashif 191street,Islamabad 0213-324324 98768 1 45,000 null Farin_Joel 5 Anaam 71street,Lahore 0913-324214 98769 1 34,000 1,000 Farin_Joel 6 Rafooq 11street,Karachi 0314-132414 98770 1 50,000 null Black_Leather 7 Rehan 1street,Sheikhupura 0313-098763 98771 1 40,000 10,000 Joan_Brown 8 Rehan 9street,Gujranwala 0423-987654 98771 1 70,000 null Laze_Round 9 Anaam 5street,Faislabad 0213-765432 98769 1 50,000 null Bava 10 Kashif 11street,Islamabad` 0123-987654 98768 1 50,000 null Joan_Brown 11 Ramal 111street,Lahore 0423-987653 98772 1 50,000 null Farin_Pearl Customers
  17. 17. 5th Normalization Those four entities on which we were working before 4 normalizations were not enough to fulfill our requirements and making troubles to understand the scenario. Now in the 5th Normal form we create 3 more entities from these old 4 entities through breaking them twice. Firstly we assigned a code to the employee’s table and then broke manufacturing table into manufacturing and stock. Else we also broke dealer’s table into dealers and dealer details. And at the end we also broke our Customer’s table into customers and customer details. Because of large amount of data the relation between entities were still not clear. So this thing again force us to do more work on this process of normalization and we did 6th normalization form. Staff Code Name Phone Sex Appoint Date Address Region Area_of_Work E-mail Salary SM20127 Zain 0315-4495944 Male 11-11-2012 32street,Lahore Islam BL1,WL2 zain.waseem.zw@gmail.com 100,0000 DR20008 Shariq 0315-8765432 Male 11-03-2000 42street,Gujrat Islam BA8 shariqansari@yahoo.com 150,0000 GD20089 Hamza 0305-9987654 Male 24-01-2008 12street,Peshawar Islam PC4,BL3 hamzayasin@hotmail.com 50,000 PR20050 Daniel 0321-1323214 Male 31-04-2005 09street,Karachi Islam FS9,WZ13 daniyalsaeed@techno.com 90,000 MO20021 Sania 0333-1232342 Female 06-07-2002 07street,Faislabad Islam DS10,JB11 Sania.sanam@gmail.com 45,000 HH20092 Syrus 0311-3123422 Male 15-07-2009 06street,Kashmir Christian FJ5,FP6 Syrus.isaam@techno.com 35,000 MS20063 Anjam 0331-1323233 Female 03-09-2006 11street,Rawalpindi Hindu AA7 anjam.mark@techno.com 25,000 Employee
  18. 18. Product Code (P.K) Product Sole Cost Leather Cost Labor Cost BL1 Brown_Leather 200 500 200 WL2 White_Leather 400 800 300 BL3 Black_Leather 300 800 100 PC4 Parie_Cardin 500 1500 500 FJ5 Farin_Joel 700 1800 1000 FP6 Farin_Pearl 500 1200 200 AA7 Abva 400 1300 300 BA8 Bava 800 1700 500 FS9 Festival_Shoes 800 1200 200 DS10 Dj_Shine 550 950 600 JB11 Joan_Brown 450 950 400 LR12 Laze_Round 100 400 400 WZ13 War_Zone 300 700 500 Manufacturing Product Code (F.K) Qty Cost Price Retail Price Status BL1 0 900 1500 InProcess WL2 10,000 1500 2500 Manufactured BL3 0 1200 1800 InProcess PC4 0 2500 3000 InProcess FJ5 30,000 3500 4000 Manufactured FP6 50,000 1900 2400 Manufactured AA7 0 2000 2500 InProcess BA8 50,000 3000 3700 Manufactured FS9 0 2200 2700 InProcess DS10 45,000 2100 2600 Manufactured JB11 50,000 1800 2300 Manufactured LR12 70,000 900 1500 Manufactured WZ13 0 1500 2500 InProcess Stock Dealer Code (P.K) Name G1 Zahid R2 Maqsood L3 Tariq I4 Shameer F6 Tariq Dealers Dealer Code (F.K) Phone Locations G1 042-9782378 Gujarat R2 021-7652432 Rawalpindi L3 091-9867543 Lahore L3 021-2376543 Lahore L4 018-7265432 Islamabad F6 021-8765454 Faisalabad Dealer_Details
  19. 19. Customer# (P.K) Name Address Phone 1 Zeeshan 99street,Lahore 0324-876224 2 Amjad 19street,Lahore 0321-412424 3 Ramal 118street,Peshawar 0423-132412 4 Kashif 191street,Islamabad 0213-324324 5 Anaam 71street,Lahore 0913-324214 6 Rafooq 11street,Karachi 0314-132414 7 Rehan 1street,Sheikhupura 0313-098763 8 Rehan 9street,Gujranwala 0423-987654 9 Anaam 5street,Faislabad 0213-765432 10 Kashif 11street,Islamabad 0123-987654 11 Ramal 111street,Lahore 0423-987653 Customers Customer_Details Customer# (F.K) Invoice# Quantity Cash Balance Purchased Things 1 98765 1 1500 null Brown_Leather 1 98765 1 3000 null Parie_Cardin 2 98766 1 1500 null Brown_Leather 2 98766 1 3900 100 White_Leather 2 98766 1 2400 null Farin_Pearl 3 98767 1 90,000 Null Parie_Cardin 4 98768 1 45,000 Null Farin_Joel 5 98769 1 34,000 1,000 Farin_Joel 6 98770 1 50,000 Null Black_Leather 7 98771 1 40,000 10,000 Joan_Brown 8 98772 1 70,000 Null Laze_Round 9 98773 1 50,000 Null Bava 10 98774 1 50,000 Null Joan_Brown 11 98775 1 50,000 Null Farin_Pearl
  20. 20. 6th Normalization Breakdown of tables were still continue even in the 6th normal form. We broke the entity employee into three more entities; Employee, Employee Details and Employee area of work. At the same time we broke our table named as customer details into Invoice and Invoice details and assigned them their respective primary and foreign key’s. Now our design is coming in the understood form. But still there were some hurdles we were facing some many to many relationships so we need them to break as well. So this thing socks us to perform final and normalized form and we performed 7th Normal form to fulfill or requirements. Staff Code (P.K) Name Sex SM20127 Zain Male DR20008 Shariq Male GD20089 Hamza Male PR20050 Daniel Male MO20021 Sania Female HH20092 Syrus Male MS20063 Anjam Female Employee
  21. 21. Staff Code (P.K) Phone Appoint Date Address Region E-mail Salary SM20127 0315-4495944 11-11-2012 32street,Lahore Islam zain.waseem.zw@gmail.com 100,0000 DR20008 0315-8765432 11-03-2000 42street,Gujrat Islam shariqansari@yahoo.com 150,0000 GD20089 0305-9987654 24-01-2008 12street,Peshawar Islam hamzayasin@hotmail.com 50,000 PR20050 0321-1323214 31-04-2005 09street,Karachi Islam daniyalsaeed@techno.com 90,000 MO20021 0333-1232342 06-07-2002 07street,Faislabad Islam Sania.sanam@gmail.com 45,000 HH20092 0311-3123422 15-07-2009 06street,Kashmir Christian Syrus.isaam@techno.com 35,000 MS20063 0331-1323233 03-09-2006 11street,Rawalpindi Hindu anjam.mark@techno.com 25,000 Employee_Details Staff Code (FK) Product_Code (FK) SM20127 BL1 SM20127 WL2 DR20008 BA8 GD20089 PC4 GD20089 BL3 PR20050 FS9 PR20050 WZ13 MO20021 DS10 MO20021 JB11 HH20092 FJ5 HH20092 FP6 MS20063 AA7 Employee_Area_of_Work
  22. 22. Product Code (P.K) Product Sole Cost Leather Cost Labor Cost Status BL1 Brown_Leather 200 500 200 InProcess WL2 White_Leather 400 800 300 Manufactured BL3 Black_Leather 300 800 100 InProcess PC4 Parie_Cardin 500 1500 500 InProcess FJ5 Farin_Joel 700 1800 1000 Manufactured FP6 Farin_Pearl 500 1200 200 Manufactured AA7 Abva 400 1300 300 InProcess BA8 Bava 800 1700 500 Manufactured FS9 Festival_Shoes 800 1200 200 InProcess DS10 Dj_Shine 550 950 600 Manufactured JB11 Joan_Brown 450 950 400 Manufactured LR12 Laze_Round 100 400 400 Manufactured WZ13 War_Zone 300 700 500 InProcess Manufacturing Product Code (F.K) Qty Cost Price Retail Price BL1 0 900 1500 WL2 10,000 1500 2500 BL3 0 1200 1800 PC4 0 2500 3000 FJ5 30,000 3500 4000 FP6 50,000 1900 2400 AA7 0 2000 2500 BA8 50,000 3000 3700 FS9 0 2200 2700 DS10 45,000 2100 2600 JB11 50,000 1800 2300 LR12 70,000 900 1500 WZ13 0 1500 2500 Stock
  23. 23. Dealer Code (P.K) Name G1 Zahid R2 Maqsood L3 Tariq I4 Shameer F6 Tariq Dealers Dealer Code (F.K) Phone Locations G1 042-9782378 Gujarat R2 021-7652432 Rawalpindi L3 091-9867543 Lahore L3 021-2376543 Lahore L4 018-7265432 Islamabad F6 021-8765454 Faisalabad Dealer_Details Customer# (P.K) Name Address Phone 1 Zeeshan 99street,Lahore 0324-876224 2 Amjad 19street,Lahore 0321-412424 3 Ramal 118street,Peshawar 0423-132412 4 Kashif 191street,Islamabad 0213-324324 5 Anaam 71street,Lahore 0913-324214 6 Rafooq 11street,Karachi 0314-132414 7 Rehan 1street,Sheikhupura 0313-098763 8 Rehan 9street,Gujranwala 0423-987654 9 Anaam 5street,Faislabad 0213-765432 10 Kashif 11street,Islamabad 0123-987654 11 Ramal 111street,Lahore 0423-987653 Customers Invoice# (P.K) Customer# (F.K) 98765 1 98766 2 98767 3 98768 4 98769 5 98770 6 98771 7 98772 8 98773 9 98774 10 98775 11 Invoice
  24. 24. Invoice# (F.K) Quantity Cash Balance Purchased Things 98765 1 1500 Null Brown_Leather 98765 1 3000 Null Parie_Cardin 98766 1 1500 Null Brown_Leather 98766 1 3900 100 White_Leather 98766 1 2400 Null Farin_Pearl 98767 1 90,000 Null Parie_Cardin 98768 1 45,000 Null Farin_Joel 98769 1 34,000 1,000 Farin_Joel 98770 1 50,000 Null Black_Leather 98771 1 40,000 10,000 Joan_Brown 98772 1 70,000 Null Laze_Round 98773 1 50,000 Null Bava 98774 1 50,000 Null Joan_Brown 98775 1 50,000 Null Farin_Pearl Invoice_Details
  25. 25. 7th Normalization At the start of 7th normal form we were assured that we just need to break many to many relationships and we create different tables like; Bridge S_to_D (S for Stock & D for Dealers) and Bridge D_to_C (D for Dealer & C for Customer). And we also broke manufacturing table into manufacturing and raw material and we assigned primary and foreign keys to all entities to clarify their relations. Now our Effort to normalize the scenario and the bulky or messing data is finally proved fruitful Staff Code (P.K) Name Sex SM20127 Zain Male DR20008 Shariq Male GD20089 Hamza Male PR20050 Daniel Male MO20021 Sania Female HH20092 Syrus Male MS20063 Anjam Female Employee
  26. 26. Staff Code (F.K) Phone Appoint Date Address Region E-mail Salary SM20127 0315-4495944 11-11-2012 32street,Lahore Islam zain.waseem.zw@gmail.com 100,0000 DR20008 0315-8765432 11-03-2000 42street,Gujrat Islam shariqansari@yahoo.com 150,0000 GD20089 0305-9987654 24-01-2008 12street,Peshawar Islam hamzayasin@hotmail.com 50,000 PR20050 0321-1323214 31-04-2005 09street,Karachi Islam daniyalsaeed@techno.com 90,000 MO20021 0333-1232342 06-07-2002 07street,Faislabad Islam Sania.sanam@gmail.com 45,000 HH20092 0311-3123422 15-07-2009 06street,Kashmir Christian Syrus.isaam@techno.com 35,000 MS20063 0331-1323233 03-09-2006 11street,Rawalpindi Hindu anjam.mark@techno.com 25,000 Employee_Details Staff Code (FK) Product_Code (FK) SM20127 BL1 SM20127 WL2 DR20008 BA8 GD20089 PC4 GD20089 BL3 PR20050 FS9 PR20050 WZ13 MO20021 DS10 MO20021 JB11 HH20092 FJ5 HH20092 FP6 MS20063 AA7 Employee_Area_of_Work
  27. 27. Product Code (P.K) Product Status BL1 Brown_Leather InProcess WL2 White_Leather Manufactured BL3 Black_Leather InProcess PC4 Parie_Cardin InProcess FJ5 Farin_Joel Manufactured FP6 Farin_Pearl Manufactured AA7 Abva InProcess BA8 Bava Manufactured FS9 Festival_Shoes InProcess DS10 Dj_Shine Manufactured JB11 Joan_Brown Manufactured LR12 Laze_Round Manufactured WZ13 War_Zone InProcess Manufacturing Product Code (F.K) Sole Cost Leather Cost Labor Cost BL1 200 500 200 WL2 400 800 300 BL3 300 800 100 PC4 500 1500 500 FJ5 700 1800 1000 FP6 500 1200 200 AA7 400 1300 300 BA8 800 1700 500 FS9 800 1200 200 DS10 550 950 600 JB11 450 950 400 LR12 100 400 400 WZ13 300 700 500 Raw_Material
  28. 28. Stock_Code (FK) Dealer_Code (F.K) SC11 G1 SC12 G1 SC13 G1 SC11 R2 SC14 R2 SC15 R2 SC16 R2 SC11 L3 SC17 L3 SC18 L4 SC19 L4 SC20 L4 SC21 F6 SC22 F6 SC23 F6 Bridge_S_to_D Stock_Code (PK) Product_Code (FK) Qty Cost Price Retail Price SC11 BL1 0 900 1500 SC12 WL2 10,000 1500 2500 SC13 BL3 0 1200 1800 SC14 PC4 0 2500 3000 SC15 FJ5 30,000 3500 4000 SC16 FP6 50,000 1900 2400 SC17 AA7 0 2000 2500 SC18 BA8 50,000 3000 3700 SC19 FS9 0 2200 2700 SC20 DS10 45,000 2100 2600 SC21 JB11 50,000 1800 2300 SC22 LR12 70,000 900 1500 SC23 WZ13 0 1500 2500 Stock Dealer Code (PK) Name G1 Zahid R2 Maqsood L3 Tariq I4 Shameer F6 Tariq Dealers Dealer Code (F.K) Phone Locations G1 042-9782378 Gujarat R2 021-7652432 Rawalpindi L3 091-9867543 Lahore L3 021-2376543 Lahore L4 018-7265432 Islamabad F6 021-8765454 Faisalabad Dealer_Details
  29. 29. Dealer Code (FK) Customer# (FK) G1 1 G1 2 G1 3 R2 1 R2 4 R2 5 L3 6 L3 5 L3 7 L4 8 L4 9 F6 10 F6 11 Bridge_D_to_C Customer# (PK) Name Address Phone 1 Zeeshan 99street,Lahore 0324-876224 2 Amjad 19street,Lahore 0321-412424 3 Ramal 118street,Peshawar 0423-132412 4 Kashif 191street,Islamabad 0213-324324 5 Anaam 71street,Lahore 0913-324214 6 Rafooq 11street,Karachi 0314-132414 7 Rehan 1street,Sheikhupura 0313-098763 8 Rehan 9street,Gujranwala 0423-987654 9 Anaam 5street,Faislabad 0213-765432 10 Kashif 11street,Islamabad 0123-987654 11 Ramal 111street,Lahore 0423-987653 Customers Invoice# (PK) Customer# (FK) 98765 1 98766 2 98767 3 98768 4 98769 5 98770 6 98771 7 98772 8 98773 9 98774 10 98775 11 Invoice
  30. 30. Invoice# (FK) Quantity Cash Balance Purchased Things 98765 1 1500 Null Brown_Leather 98765 1 3000 Null Parie_Cardin 98766 1 1500 Null Brown_Leather 98766 1 3900 100 White_Leather 98766 1 2400 Null Farin_Pearl 98767 1 90,000 Null Parie_Cardin 98768 1 45,000 Null Farin_Joel 98769 1 34,000 1,000 Farin_Joel 98770 1 50,000 Null Black_Leather 98771 1 40,000 10,000 Joan_Brown 98772 1 70,000 Null Laze_Round 98773 1 50,000 Null Bava 98774 1 50,000 Null Joan_Brown 98775 1 50,000 Null Farin_Pearl Invoice_Details
  31. 31. Employee PK Staff_Code Name Sex Employee_Details <FK> Staff_Code Phone Appoint_Date Address Region E-mail Manufacturing PK Product_Code Product Status Stock PK Stock_ID <FK> Product_Code Cost_Price Retail_Price Qty Dealers PK Dealer_Code Name Dealer_Details <FK> Dealer_Code Phone Locations Customers PK Customer_no Name Address Phone Invoice PK Invoice_no <FK> Customer_no Invoice_Details <FK> Invoice_no Quantity Cash Balance Purchased_Things Raw_Material <FK> Product_Code Sole_Cost Leather_Cost Labor_Cost A Shoe Manufacturing Store ER-Detailed Design Employee_Area_of_Workr <FK> Staff_Code <FK> Product_Code Bridge_S_to_D <FK> Stock_ID <FK> Dealer_Code Bridge_D_to_C <FK> Dealer_Code <FK> Customer_no Detailed Design of Project
  32. 32. Thank You 

×