View
61
Download
2
Category
Preview:
Citation preview
o الرحيم الرحمن الله بسم
DATABASE SYSTEM
ZAIN-UL-ABEDINMuhammad ShariqHamza YasinDaniyal 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 that involves a process from manufacturing of shoe to the customer hand.
Scenario
EmployeeEmployee Details
Dealer Details
Manufacturing
Stock Details
Customer Invoice Number
Invoice Details
A Shoe Manufacturing StoreMid-Term Project
ER-Diagram
Dealers
Raw_MaterialEmployee_Area_of_Work
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.
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
1st NormalizationIn 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 ManufacturingZain 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
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
2nd NormalizationIn 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
Dealers CustomersSoleCost
LeatherCost
LaborCost
CostPrice
RetailPrice 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
3rd NormalizationIn 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
Sr# Product Status Qty Sole
CostLeather
CostLaborCost
CostPrice
RetailPrice
1 Brown_Leather InProcess 0 200 500 200 900 15002 White_Leather Manufactured 10,000 400 800 300 1500 25003 Black_Leather InProcess 0 300 800 100 1200 18004 Parie_Cardin InProcess 0 500 1500 500 2500 30005 Farin_Joel Manufactured 30,000 700 1800 1000 3500 40006 Farin_Pearl Manufactured 50,000 500 1200 200 1900 24007 Abva InProcess 0 400 1300 300 2000 25008 Bava Manufactured 50,000 800 1700 500 3000 37009 Festival_Shoes InProcess 0 800 1200 200 2200 2700
10 Dj_Shine Manufactured 45,000 550 950 600 2100 260011 Joan_Brown Manufactured 50,000 450 950 400 1800 230012 Laze_Round Manufactured 70,000 100 400 400 900 150013 War_Zone InProcess 0 300 700 500 1500 2500
Manufacturing
Dealers
Dealer# Name Phone Locations
1 Zahid 042-9782378 Gujarat2 Maqsood 021-7652432 Rawalpindi3 Tariq 091-9867543 Lahore4 Shameer 018-7265432 Islamabad5 Tariq 021-2376543 Lahore6 Tariq 021-8765454 Faisalabad
Customer# Name Address Phone Cash Balance Purchased Things1 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
4th NormalizationIn 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
Product Code Product Status
SoleCost
LeatherCost
LaborCost Qty
CostPrice
RetailPrice
BL1 Brown_Leather InProcess 200 500 200 0 900 1500WL2 White_Leather Manufactured 400 800 300 10,000 1500 2500BL3 Black_Leather InProcess 300 800 100 0 1200 1800PC4 Parie_Cardin InProcess 500 1500 500 0 2500 3000FJ5 Farin_Joel Manufactured 700 1800 1000 30,000 3500 4000FP6 Farin_Pearl Manufactured 500 1200 200 50,000 1900 2400AA7 Abva InProcess 400 1300 300 0 2000 2500BA8 Bava Manufactured 800 1700 500 50,000 3000 3700FS9 Festival_Shoes InProcess 800 1200 200 0 2200 2700
DS10 Dj_Shine Manufactured 550 950 600 45,000 2100 2600JB11 Joan_Brown Manufactured 450 950 400 50,000 1800 2300LR12 Laze_Round Manufactured 100 400 400 70,000 900 1500WZ13 War_Zone InProcess 300 700 500 0 1500 2500
Manufacturing
DealerCode Name Phone Locations
G1 Zahid 042-9782378 GujaratR2 Maqsood 021-7652432 RawalpindiL3 Tariq 091-9867543 LahoreI4 Shameer 018-7265432 IslamabadL5 Tariq 021-2376543 LahoreF6 Tariq 021-8765454 Faisalabad
Dealer
Customer# Name Address Phone Invoice# Quantity Cash Balance Purchased Things1 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_Leather2 Amjad 19street,Lahore 0321-412424 98766 1 2400 null Farin_Pearl2 Amjad 19street,Lahore 0321-412424 98766 1 3900 100 White_Leather3 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_Joel6 Rafooq 11street,Karachi 0314-132414 98770 1 50,000 null Black_Leather7 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_Round9 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
5th NormalizationThose 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
Product Code(P.K) Product Sole
CostLeather
CostLaborCost
BL1 Brown_Leather 200 500 200WL2 White_Leather 400 800 300BL3 Black_Leather 300 800 100PC4 Parie_Cardin 500 1500 500FJ5 Farin_Joel 700 1800 1000FP6 Farin_Pearl 500 1200 200AA7 Abva 400 1300 300BA8 Bava 800 1700 500FS9 Festival_Shoes 800 1200 200
DS10 Dj_Shine 550 950 600JB11 Joan_Brown 450 950 400LR12 Laze_Round 100 400 400WZ13 War_Zone 300 700 500
ManufacturingProduct
Code (F.K) QtyCostPrice
RetailPrice Status
BL1 0 900 1500 InProcessWL2 10,000 1500 2500 ManufacturedBL3 0 1200 1800 InProcessPC4 0 2500 3000 InProcessFJ5 30,000 3500 4000 ManufacturedFP6 50,000 1900 2400 ManufacturedAA7 0 2000 2500 InProcessBA8 50,000 3000 3700 ManufacturedFS9 0 2200 2700 InProcess
DS10 45,000 2100 2600 ManufacturedJB11 50,000 1800 2300 ManufacturedLR12 70,000 900 1500 ManufacturedWZ13 0 1500 2500 InProcess
Stock
DealerCode (P.K) Name
G1 ZahidR2 MaqsoodL3 TariqI4 ShameerF6 Tariq
DealersDealer
Code (F.K) Phone Locations
G1 042-9782378 GujaratR2 021-7652432 RawalpindiL3 091-9867543 LahoreL3 021-2376543 Lahore L4 018-7265432 IslamabadF6 021-8765454 Faisalabad
Dealer_Details
Customer#(P.K) Name Address Phone
1 Zeeshan 99street,Lahore 0324-8762242 Amjad 19street,Lahore 0321-4124243 Ramal 118street,Peshawar 0423-1324124 Kashif 191street,Islamabad 0213-3243245 Anaam 71street,Lahore 0913-3242146 Rafooq 11street,Karachi 0314-1324147 Rehan 1street,Sheikhupura 0313-0987638 Rehan 9street,Gujranwala 0423-9876549 Anaam 5street,Faislabad 0213-765432
10 Kashif 11street,Islamabad 0123-98765411 Ramal 111street,Lahore 0423-987653
Customers
Customer_DetailsCustomer#
(F.K) Invoice# Quantity Cash Balance Purchased Things
1 98765 1 1500 null Brown_Leather1 98765 1 3000 null Parie_Cardin2 98766 1 1500 null Brown_Leather2 98766 1 3900 100 White_Leather2 98766 1 2400 null Farin_Pearl3 98767 1 90,000 Null Parie_Cardin4 98768 1 45,000 Null Farin_Joel5 98769 1 34,000 1,000 Farin_Joel6 98770 1 50,000 Null Black_Leather7 98771 1 40,000 10,000 Joan_Brown8 98772 1 70,000 Null Laze_Round9 98773 1 50,000 Null Bava
10 98774 1 50,000 Null Joan_Brown11 98775 1 50,000 Null Farin_Pearl
6th NormalizationBreakdown 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 MaleDR20008 Shariq MaleGD20089 Hamza MalePR20050 Daniel MaleMO20021 Sania FemaleHH20092 Syrus MaleMS20063 Anjam Female
Employee
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,0000DR20008 0315-8765432 11-03-2000 42street,Gujrat Islam shariqansari@yahoo.com 150,0000GD20089 0305-9987654 24-01-2008 12street,Peshawar Islam hamzayasin@hotmail.com 50,000PR20050 0321-1323214 31-04-2005 09street,Karachi Islam daniyalsaeed@techno.com 90,000MO20021 0333-1232342 06-07-2002 07street,Faislabad Islam Sania.sanam@gmail.com 45,000HH20092 0311-3123422 15-07-2009 06street,Kashmir Christian Syrus.isaam@techno.com 35,000MS20063 0331-1323233 03-09-2006 11street,Rawalpindi Hindu anjam.mark@techno.com 25,000
Employee_Details
Staff Code(FK)
Product_Code(FK)
SM20127 BL1SM20127 WL2DR20008 BA8GD20089 PC4GD20089 BL3PR20050 FS9PR20050 WZ13MO20021 DS10MO20021 JB11HH20092 FJ5HH20092 FP6MS20063 AA7
Employee_Area_of_Work
Product Code(P.K) Product Sole
CostLeather
CostLaborCost Status
BL1 Brown_Leather 200 500 200 InProcessWL2 White_Leather 400 800 300 ManufacturedBL3 Black_Leather 300 800 100 InProcessPC4 Parie_Cardin 500 1500 500 InProcessFJ5 Farin_Joel 700 1800 1000 ManufacturedFP6 Farin_Pearl 500 1200 200 ManufacturedAA7 Abva 400 1300 300 InProcessBA8 Bava 800 1700 500 ManufacturedFS9 Festival_Shoes 800 1200 200 InProcess
DS10 Dj_Shine 550 950 600 ManufacturedJB11 Joan_Brown 450 950 400 ManufacturedLR12 Laze_Round 100 400 400 ManufacturedWZ13 War_Zone 300 700 500 InProcess
Manufacturing
Product Code (F.K) Qty
CostPrice
RetailPrice
BL1 0 900 1500WL2 10,000 1500 2500BL3 0 1200 1800PC4 0 2500 3000FJ5 30,000 3500 4000FP6 50,000 1900 2400AA7 0 2000 2500BA8 50,000 3000 3700FS9 0 2200 2700
DS10 45,000 2100 2600JB11 50,000 1800 2300LR12 70,000 900 1500WZ13 0 1500 2500
Stock
DealerCode (P.K) Name
G1 ZahidR2 MaqsoodL3 TariqI4 ShameerF6 Tariq
DealersDealer
Code (F.K) Phone Locations
G1 042-9782378 GujaratR2 021-7652432 RawalpindiL3 091-9867543 LahoreL3 021-2376543 Lahore L4 018-7265432 IslamabadF6 021-8765454 Faisalabad
Dealer_Details
Customer#(P.K) Name Address Phone
1 Zeeshan 99street,Lahore 0324-8762242 Amjad 19street,Lahore 0321-4124243 Ramal 118street,Peshawar 0423-1324124 Kashif 191street,Islamabad 0213-3243245 Anaam 71street,Lahore 0913-3242146 Rafooq 11street,Karachi 0314-1324147 Rehan 1street,Sheikhupura 0313-0987638 Rehan 9street,Gujranwala 0423-9876549 Anaam 5street,Faislabad 0213-765432
10 Kashif 11street,Islamabad 0123-98765411 Ramal 111street,Lahore 0423-987653
CustomersInvoice#
(P.K)Customer#
(F.K)98765 198766 298767 398768 498769 598770 698771 798772 898773 998774 1098775 11
Invoice
Invoice#(F.K) Quantity Cash Balance Purchased Things
98765 1 1500 Null Brown_Leather98765 1 3000 Null Parie_Cardin98766 1 1500 Null Brown_Leather98766 1 3900 100 White_Leather98766 1 2400 Null Farin_Pearl98767 1 90,000 Null Parie_Cardin98768 1 45,000 Null Farin_Joel98769 1 34,000 1,000 Farin_Joel98770 1 50,000 Null Black_Leather98771 1 40,000 10,000 Joan_Brown98772 1 70,000 Null Laze_Round98773 1 50,000 Null Bava98774 1 50,000 Null Joan_Brown98775 1 50,000 Null Farin_Pearl
Invoice_Details
7th NormalizationAt 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 MaleDR20008 Shariq MaleGD20089 Hamza MalePR20050 Daniel MaleMO20021 Sania FemaleHH20092 Syrus MaleMS20063 Anjam Female
Employee
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,0000DR20008 0315-8765432 11-03-2000 42street,Gujrat Islam shariqansari@yahoo.com 150,0000GD20089 0305-9987654 24-01-2008 12street,Peshawar Islam hamzayasin@hotmail.com 50,000PR20050 0321-1323214 31-04-2005 09street,Karachi Islam daniyalsaeed@techno.com 90,000MO20021 0333-1232342 06-07-2002 07street,Faislabad Islam Sania.sanam@gmail.com 45,000HH20092 0311-3123422 15-07-2009 06street,Kashmir Christian Syrus.isaam@techno.com 35,000MS20063 0331-1323233 03-09-2006 11street,Rawalpindi Hindu anjam.mark@techno.com 25,000
Employee_Details
Staff Code(FK)
Product_Code(FK)
SM20127 BL1SM20127 WL2DR20008 BA8GD20089 PC4GD20089 BL3PR20050 FS9PR20050 WZ13MO20021 DS10MO20021 JB11HH20092 FJ5HH20092 FP6MS20063 AA7
Employee_Area_of_Work
Product Code(P.K) Product Status
BL1 Brown_Leather InProcessWL2 White_Leather ManufacturedBL3 Black_Leather InProcessPC4 Parie_Cardin InProcessFJ5 Farin_Joel ManufacturedFP6 Farin_Pearl ManufacturedAA7 Abva InProcessBA8 Bava ManufacturedFS9 Festival_Shoes InProcess
DS10 Dj_Shine ManufacturedJB11 Joan_Brown ManufacturedLR12 Laze_Round ManufacturedWZ13 War_Zone InProcess
Manufacturing
Product Code(F.K)
SoleCost
LeatherCost
LaborCost
BL1 200 500 200WL2 400 800 300BL3 300 800 100PC4 500 1500 500FJ5 700 1800 1000FP6 500 1200 200AA7 400 1300 300BA8 800 1700 500FS9 800 1200 200
DS10 550 950 600JB11 450 950 400LR12 100 400 400WZ13 300 700 500
Raw_Material
Stock_Code(FK)
Dealer_Code (F.K)
SC11 G1SC12 G1SC13 G1SC11 R2SC14 R2SC15 R2SC16 R2SC11 L3SC17 L3SC18 L4SC19 L4SC20 L4SC21 F6SC22 F6SC23 F6
Bridge_S_to_DStock_Code
(PK)Product_Code
(FK) QtyCostPrice
RetailPrice
SC11 BL1 0 900 1500SC12 WL2 10,000 1500 2500SC13 BL3 0 1200 1800SC14 PC4 0 2500 3000SC15 FJ5 30,000 3500 4000SC16 FP6 50,000 1900 2400SC17 AA7 0 2000 2500SC18 BA8 50,000 3000 3700SC19 FS9 0 2200 2700SC20 DS10 45,000 2100 2600SC21 JB11 50,000 1800 2300SC22 LR12 70,000 900 1500SC23 WZ13 0 1500 2500
Stock
DealerCode (PK) Name
G1 ZahidR2 MaqsoodL3 TariqI4 ShameerF6 Tariq
DealersDealer
Code (F.K) Phone Locations
G1 042-9782378 GujaratR2 021-7652432 RawalpindiL3 091-9867543 LahoreL3 021-2376543 Lahore L4 018-7265432 IslamabadF6 021-8765454 Faisalabad
Dealer_Details
DealerCode (FK)
Customer#(FK)
G1 1G1 2G1 3R2 1R2 4R2 5L3 6L3 5L3 7L4 8L4 9F6 10F6 11
Bridge_D_to_CCustomer#
(PK) Name Address Phone
1 Zeeshan 99street,Lahore 0324-8762242 Amjad 19street,Lahore 0321-4124243 Ramal 118street,Peshawar 0423-1324124 Kashif 191street,Islamabad 0213-3243245 Anaam 71street,Lahore 0913-3242146 Rafooq 11street,Karachi 0314-1324147 Rehan 1street,Sheikhupura 0313-0987638 Rehan 9street,Gujranwala 0423-9876549 Anaam 5street,Faislabad 0213-765432
10 Kashif 11street,Islamabad 0123-98765411 Ramal 111street,Lahore 0423-987653
Customers
Invoice#(PK)
Customer#(FK)
98765 198766 298767 398768 498769 598770 698771 798772 898773 998774 1098775 11
Invoice
Invoice#(FK) Quantity Cash Balance Purchased Things
98765 1 1500 Null Brown_Leather98765 1 3000 Null Parie_Cardin98766 1 1500 Null Brown_Leather98766 1 3900 100 White_Leather98766 1 2400 Null Farin_Pearl98767 1 90,000 Null Parie_Cardin98768 1 45,000 Null Farin_Joel98769 1 34,000 1,000 Farin_Joel98770 1 50,000 Null Black_Leather98771 1 40,000 10,000 Joan_Brown98772 1 70,000 Null Laze_Round98773 1 50,000 Null Bava98774 1 50,000 Null Joan_Brown98775 1 50,000 Null Farin_Pearl
Invoice_Details
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 StoreER-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
Thank You
Recommended