SlideShare a Scribd company logo
1 of 10
Career Point University,
Kota (Raj.)
Minor 2 Assignment
Topic : Normalization
Presented To: Presented By:
Rohit Singh Wakil Kumar
Assistant Professor UID- K12467
CSE Dept. B.Tech (CSE)
4th Sem / 2nd Year
Normalization
In relational database design,normalizationisthe processof organizingdatatominimize redundancy.
Normalizationusuallyinvolvesdividinga database intotwoor more tables and definingrelationships
betweenthe tables.The objective istoisolate datasothat additions,deletions,andmodificationsof a
fieldcanbe made in justone table andthenpropagatedthroughthe restof the database viathe defined
relationships.
There are three main normal forms, each with increasing levels of normalization:
 First Normal Form(1NF): Each field in a table contains different information. For
example, in an employee list, each table would contain only one birthdate field.
 SecondNormal Form(2NF): No field values can be derived from another field. For
example, if a table already included a birthdate field, it could not also include a birth year field,
since this information would be redundant.
 Third Normal Form (3NF): No duplicate information is permitted. So, for example, if two
tables both require a birthdate field, the birthdate information would be separated into a
separate table, and the two other tables would then access the birthdate information via an
index field in the birthdate table. Any change to a birthdate would automatically be reflect in all
tables that link to the birthdate table.
The underlying ideas in normalization are simple enough. Through normalization we want to
design for our relational database a set of files that (1) contain all the data necessary for the
purposes that the database is to serve, (2) have as little redundancy as possible, (3)
accommodate multiple values for types of data that require them, (4) permit efficient updates
of the data in the database, and (5) avoid the danger of losing data unknowingly.
Normalization can be viewed as a series of steps (i.e., levels) designed, one after another, to
deal with ways in which tables can be "too complicated for their own good". The purpose of
normalization is to reduce the chances for anomalies to occur in a database. The definitions of
the various levels of normalization illustrate complications to be eliminated in order to reduce
the chances of anomalies. At all levels and in every case of a table with a complication, the
resolution of the problem turns out to be the establishment of two or more simpler tables
which, as a group, contain the same information as the original table but which, because of
their simpler individual structures, lack the complication.
To explain this concept we will use a typical business set of data – that commonly found
in the shipment of goods.
The shipment of goods between a consignee (who gets the goods) and a consignor (who sends
them) is also known as consignment, delivery, movement or transport of goods. It typically
involves a third party organization who takes on the role of the freight forwarder. They manage
the scheduling of the required transport (ship, plane, train, truck, etc.) and may supply the
equipment necessary for efficient carriage of the goods. For example, customized containers
for the holds of aircraft or refrigerated sea containers for carrying perishable goods. The
contract of a shipment between the carrier and either the consignee or the consignor is often
established by a document known as a shipping or forwarding instruction or a bill, waybill or bill
of lading.
The following table (Table 1) gives three sample instances of data that may typically be
used for shipping. The first two rows refer to a consignment of goods being shipped by
sea and then road in a shipping container using two carriers. The third row relates to a
separate air freight shipment.
ContractID1 Transport
Mode2
CarrierID3 EquipmentID4 SizeTypeCode5 SealNumber6 SealIssuer7
PONL40078678 Sea P&ONL PONL12345
PONL34567
4040
4020
ABX123456
ABX123457
ABC
ABC
TNT9439287-5 Road TNT PONL34567 4020 ABX123457
GGDFG99
ABC
Customs
1 identifies a shipping contract that allows the supplier to ship goods under specific
freight conditions or the carrier to bill against a specific contract.
2 specifies the method or type of transportation of the shipment. Typically this may be
sea, air or road.
3 the identifier assigned by the agency to the carrier. This identifies the carrier being
used for this stage of the shipment.
4 identifies the information about one set of transport equipment related to the shipment.
The most common example of transport equipment is a shipping container.
5 the size and type of the transport equipment.
6 identifies the seal number of the equipment.
7 which party issues and is responsible for the seal.
180-1234567 Air KE-
Korean
Air Cargo
KAL12345 747-K10 XXX664
Table 1 Shipment Table
We shall use this set of data to demonstrate the principles of normalization.
Of course, we can present this data in any number of formats. Here is an XML instantiation of the same
data.
<Shipment>
<ContractId>PONL40078678</ContractId>
<TransportModeId>Sea</TransportModeId>
<CarrierId>P&ONL</CarrierId>
<EquipmentId>PONL12345</EquipmentId>
<EquipmentId>PONL34567</EquipmentId>
<SizeTypeCode>4040</SizeTypeCode>
<SizeTypeCode>4020</SizeTypeCode>
<SealNumber>ABX123456</ SealNumber>
<SealIssuer>ABC</SealIssuer>
<SealNumber>ABX123457</ SealNumber>
<SealIssuer>ABC</SealIssuer>
</Shipment>
<Shipment>
<ContractId>TNT9439287-5</ContractId>
<TransportModeId>Road</TransportModeId>
<CarrierId>TNT</CarrierId>
<EquipmentId>PONL34567</EquipmentId>
<SizeTypeCode>4020</SizeTypeCode>
<SealNumber>ABX123457</ SealNumber>
<SealIssuer>ABC</SealIssuer>
<SealNumber>GGDFG99</SealNumber>
<SealIssuer>Customs</SealIssuer>
</Shipment>
<Shipment>
<ContractId>180-1234567</ContractId>
<TransportModeId>Air</TransportModeId>
<CarrierId>KE-KoreanAir Cargo</CarrierId>
<EquipmentId>KAL12345</EquipmentId>
<SizeTypeCode>747-K10</SizeTypeCode>
<SealNumber>XXX664</ SealNumber>
</Shipment>
The first thing to note is that the data present is ‘flat’ – we have one table/container called ‘shipment’ and
all attributes or nested elements sit within this one structure. When data is a single flat structure like this, it
is known as being in zero normal form (or de-normalized). The purpose of normalization is to put
structure or ‘depth’ into the data.
The secondthingto be aware of is the primarykey(orkeys) of our data. Withinanysetof data,one or
more valuesmaybe usedto uniquelyidentify aspecificinstance of anentry. For example,aContractID
may be usedto identifypreciselyone row inthe shipmenttable. Soif we have a ContractIDof
“PONL40078678” thenwe should findone,andonlyone,entrywiththisvalue.
However,sometimesasingle value maynotbe sufficientlyindividual todothis.Forexample,itis
possible fordifferentcarrierstouse the same identificationnumbersfortheircontracts. Technically,we
couldhave two“PONL40078678” ContractIDs,one for P&ONLand another for OOCL shipping. There is
no businessconventiontoguardagainstthis. So we may needboththe CarrierIDand the ContractIDto
be sure of uniqueness. Atthisstage,thisparticularissue wouldaddtothe complexityof ourexample,
so we will assume thatContractIDisgood enoughonitsownas a unique key.However,asalways,real
businesspractice shouldbe the guide forthese decisions. Itshouldsuffice tosaythatwhenwe talkof
keyswe meanthe ‘entire’keyorsetof valuesthatcan uniquelyidentifyasingle entryinourdata.
Withthisin mind,the firststepisto progressourdata intoFirst Normal Form.
First NormalForm
The aim of firstnormal form data isto ensure thatall of the attributesare discrete i.e.canonlytake a
single value.Thisisachievedbythe removal of repeatinggroupsintotheirownentities. Forexample,a
large Shipmentmayrequire several ‘equipments’orcontainers. Thismeanswe can have repeating
EquipmentID,SealNumberandSizeTypeCodevaluesineachcell of ourtable. FirstNormal Form says
that these shouldbe separatedintoaseparate table asshownintable 2.
ContractID Transport Mode CarrierID
PONL40078678 Sea P&ONL
TNT9439287-5 Road TNT
180-1234567 Air KE-Korean Air Cargo
Table 2 Shipment Table - 1NF
ContractID EquipmentID SizeTypeCode SealNumber SealIssuer
PONL40078678 PONL12345 4040 ABX123456 ABC
PONL40078678 PONL34567
4020 ABX123457
ABC
TNT9439287-5 PONL34567
4020 ABX123457
GGDFG99
ABC
Customs
180-1234567 KAL12345 747-K10 XXX664
Table 3 ShipmentEquipment Table - 0NF
A quickglance at the secondtable will revealthatwe have includedthe ContractIDinthe secondtable
as well asthe first. Thisis because wheneverwe move elementsintoanew table of theirownwe
include the keyvalue of the original,parenttable. We mustdothisto ensure we retainthe association
betweenthe twopiecesof data. Inrelational modelingthisiscalledthe ‘foreign’key –it’sforeign
because itshome isinthe parenttable.
Anotherlongerglance atthe secondtable will show we still have repeatingvaluesinelements
SealNumberandSealIssuer. Thisisbecause acontainermayhave several sealsattached,eachwithits
ownnumber. Therefore we needtoseparate SealNumberandSealIssuerfromthisnew table,intoa
table of theirown. But before we cando thiswe needto establishthe keyfieldsforthe new
ShipmentEquipmenttable.Onthe face of it,EquipmentIDwouldappearsufficientlyprecise tobe
unique. Infact,international shippingconventionsensure thatcontainernumbersare unique globally.
However,whilstatany particularmomentintime anEquipmentIDwouldbe unique,containersare re-
usedinothershipments. Thisisthe case here,where container“PONL34567” istakenoff a shipand
carriedby road. So ourkeyfor ShipmentEquipmentisboththe ContractIDandthe EquipmentID. We
thenendup withthe following….
ContractID EquipmentID SizeTypeCode
PONL40078678 PONL12345 4040
PONL40078678 PONL34567 4020
TNT9439287-5 PONL34567
4020
180-1234567 KAL12345 747-K10
Table 4 ShipmentEquipment Table - 1NF
ContractID EquipmentID SealNumber SealIssuer
PONL40078678 PONL12345 ABX123456 ABC
PONL40078678 PONL34567 ABX123457 ABC
TNT9439287-5 PONL34567 ABX123457 ABC
TNT9439287-5 PONL34567 GGDFG99 Customs
180-1234567 KAL12345 XXX664
Table 5 ShipmentSeal Table - 1NF
The newtable for ShipmentSeal hasinheritedthe foreignkeyof bothContractIDandEquipmentID.That
isto say, thispiece of equipmentwhenusedinthisshipmenthasthisseal.
Second NormalForm
The aim of secondnormal form data isto splitoff intoseparate tablesanyattributesthatdonotwholly
dependonthe entire key.
For example,whenwe lookcloselyatthe ShipmentEquipmenttable we cansee thatSizeTypeCode does
not dependentirelyonContractIDandEquipmentID(ourtwokeys).
We can say that the size andtype of a containerdependsonthe EquipmentID. Everycontainerhasone
EquipmentIDandone size andtype. “PONL34567” is a 40 footcontainerof standardfeatures. If the
EquipmentIDvalue changed(ie adifferentcontainerwasused),thenwe couldnotbe sure the
SizeTypeCode wouldremainthe same. SizeTypeCode isdependantonthe EquipmentID. The same
cannot be saidfor ContractID. The value of ContractIDcan change withoutaffectingthe SizeTypeCode.
For example,whenthe containeristransferredtothe truckfor road haulage – itssize andtype do not
change.
SecondNormal Formtellsusto separate these attributesthatdon’tdependonthe entire key. Inthis
case itis the SizeTypeCode anditsdependantforeignkey,EquipmentID,thatformanew Equipment
table.
ContractID EquipmentID
PONL40078678 PONL12345
PONL40078678 PONL34567
TNT9439287-5 PONL34567
180-1234567 KAL12345
Table 6 - ShipmentEquipment table - 2 NF
EquipmentID SizeTypeCode
PONL12345 4040
PONL34567 4020
KAL12345 747-K10
Table 7 Equipment table - 2 NF
Third NormalForm
To achieve adata model inThirdNormal Form we mustensure thatall Non-Keyattributesare
independentof one another. ThisissimilartoSecondNormal Form, butnow we focuson the non-key
dependencies.
For example,if we lookatthe ShipmentSealtable,we seethatSealNumberandSealIssuerare not
independentof eachother. Neitherare keysvalues,butthere isadependantrelationshipbetween
them,forexample if the SealIssuerwhere tochange thenthe SealNumberwouldpresumablychange as
well. Sowe mustmove SealIssueranditsdependantforeignkey,SealNumberintoanew table. Inthis
case we shall call itthe Seal table.
ContractID EquipmentID SealNumber
PONL40078678 PONL12345 ABX123456
PONL40078678 PONL34567 ABX123457
TNT9439287-5 PONL34567 ABX123457
TNT9439287-5 PONL34567 GGDFG99
180-1234567 KAL12345 XXX664
Table 8 ShipmentSeal table - 3NF
SealNumber SealIssuer
ABX123456 ABC
ABX123457 ABC
GGDFG99 Customs
XXX664
Table 9 Seal table - 3 NF
Summary
Normalizationisaformal andwell establishedmethodof analyzingdatastructures. If applied
consistently,thenthistechnique willidentifythe logical containers necessaryforbuildingre-usable XML
schemas. It can be usedinconjunctionwithotheranalysistechniquestocompare andrefine data
models.
Whilstitsoriginal purpose wastoorganize datato minimize redundancyandavoiddataduplication,itis
a powerful technique forimprovingthe understandingof the datamodelsnecessaryforre-usable
librariesof componentssuchasUBL.
Reference :
1). Wikipedia
2). Google
3).Books,(H.F. Korth)

More Related Content

Viewers also liked

Introduction of The Dream Weavers
Introduction of The Dream WeaversIntroduction of The Dream Weavers
Introduction of The Dream WeaversThe Dream Weavers
 
Normalization
NormalizationNormalization
NormalizationJTHSICT
 
Introduction to Dreamweaver
Introduction to DreamweaverIntroduction to Dreamweaver
Introduction to DreamweaverSarah Bombich
 
Penerbitan video korporat
Penerbitan video korporatPenerbitan video korporat
Penerbitan video korporatHazrul Halim
 
DHTML - Events & Buttons
DHTML - Events  & ButtonsDHTML - Events  & Buttons
DHTML - Events & ButtonsDeep Patel
 
Dreamweaver - Introduction AND WALKTHROUGH
Dreamweaver - Introduction AND WALKTHROUGHDreamweaver - Introduction AND WALKTHROUGH
Dreamweaver - Introduction AND WALKTHROUGHSahil Bansal
 
Web designp pt
Web designp ptWeb designp pt
Web designp ptBizzyb09
 
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
FUNCTION DEPENDENCY  AND TYPES & EXAMPLEFUNCTION DEPENDENCY  AND TYPES & EXAMPLE
FUNCTION DEPENDENCY AND TYPES & EXAMPLEVraj Patel
 
Lecture 04 normalization
Lecture 04 normalization Lecture 04 normalization
Lecture 04 normalization emailharmeet
 
Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)Jargalsaikhan Alyeksandr
 

Viewers also liked (15)

Dreamweawer
DreamweawerDreamweawer
Dreamweawer
 
Introduction of The Dream Weavers
Introduction of The Dream WeaversIntroduction of The Dream Weavers
Introduction of The Dream Weavers
 
Normalization
NormalizationNormalization
Normalization
 
WYSIWYG Is a Lie
WYSIWYG Is a LieWYSIWYG Is a Lie
WYSIWYG Is a Lie
 
Normalization
NormalizationNormalization
Normalization
 
Introduction to Dreamweaver
Introduction to DreamweaverIntroduction to Dreamweaver
Introduction to Dreamweaver
 
Penerbitan video korporat
Penerbitan video korporatPenerbitan video korporat
Penerbitan video korporat
 
DHTML - Events & Buttons
DHTML - Events  & ButtonsDHTML - Events  & Buttons
DHTML - Events & Buttons
 
Dreamweaver - Introduction AND WALKTHROUGH
Dreamweaver - Introduction AND WALKTHROUGHDreamweaver - Introduction AND WALKTHROUGH
Dreamweaver - Introduction AND WALKTHROUGH
 
Dhtml sohaib ch
Dhtml sohaib chDhtml sohaib ch
Dhtml sohaib ch
 
Web designp pt
Web designp ptWeb designp pt
Web designp pt
 
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
FUNCTION DEPENDENCY  AND TYPES & EXAMPLEFUNCTION DEPENDENCY  AND TYPES & EXAMPLE
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
 
DBMS - Normalization
DBMS - NormalizationDBMS - Normalization
DBMS - Normalization
 
Lecture 04 normalization
Lecture 04 normalization Lecture 04 normalization
Lecture 04 normalization
 
Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)
 

Similar to Normalization of shipment data into 1NF and 2NF tables

Discriminators for use in flow-based classification
Discriminators for use in flow-based classificationDiscriminators for use in flow-based classification
Discriminators for use in flow-based classificationDenis Zuev
 
1 Project 1 Introduction - the SeaPort Project seri.docx
1  Project 1 Introduction - the SeaPort Project seri.docx1  Project 1 Introduction - the SeaPort Project seri.docx
1 Project 1 Introduction - the SeaPort Project seri.docxoswald1horne84988
 
Sap Payroll Cluster Repair Whitepaper V1.0
Sap Payroll Cluster Repair   Whitepaper V1.0Sap Payroll Cluster Repair   Whitepaper V1.0
Sap Payroll Cluster Repair Whitepaper V1.0amau2000
 
Ijariie1117 volume 1-issue 1-page-25-27
Ijariie1117 volume 1-issue 1-page-25-27Ijariie1117 volume 1-issue 1-page-25-27
Ijariie1117 volume 1-issue 1-page-25-27IJARIIE JOURNAL
 
Storage and management of semi structured data
Storage and management of semi structured dataStorage and management of semi structured data
Storage and management of semi structured dataKhông còn Phù Hợp
 
Data preparation, depth function
Data preparation, depth functionData preparation, depth function
Data preparation, depth functionFAO
 
MULTIDIMENSIONAL ANALYSIS FOR QOS IN WIRELESS SENSOR NETWORKS
MULTIDIMENSIONAL ANALYSIS FOR QOS IN WIRELESS SENSOR NETWORKSMULTIDIMENSIONAL ANALYSIS FOR QOS IN WIRELESS SENSOR NETWORKS
MULTIDIMENSIONAL ANALYSIS FOR QOS IN WIRELESS SENSOR NETWORKSijcses
 
Methodology for Managing Dynamic Collections on Semantic Semi-Structured XMLs
Methodology for Managing Dynamic Collections on Semantic Semi-Structured XMLsMethodology for Managing Dynamic Collections on Semantic Semi-Structured XMLs
Methodology for Managing Dynamic Collections on Semantic Semi-Structured XMLsIRJET Journal
 
On the fly n w mvd identification for reducing data redundancy
On the fly n w mvd identification for reducing data redundancyOn the fly n w mvd identification for reducing data redundancy
On the fly n w mvd identification for reducing data redundancyijdms
 
MAPPING DATA BETWEEN PROBABILITY SPACES IN PROBABILISTIC DATABASES
MAPPING DATA BETWEEN PROBABILITY SPACES IN PROBABILISTIC DATABASESMAPPING DATA BETWEEN PROBABILITY SPACES IN PROBABILISTIC DATABASES
MAPPING DATA BETWEEN PROBABILITY SPACES IN PROBABILISTIC DATABASESijdms
 
Research Inventy : International Journal of Engineering and Science
Research Inventy : International Journal of Engineering and ScienceResearch Inventy : International Journal of Engineering and Science
Research Inventy : International Journal of Engineering and Scienceinventy
 
Data manipulation on r
Data manipulation on rData manipulation on r
Data manipulation on rAbhik Seal
 
Computer science_xii_2016
 Computer science_xii_2016 Computer science_xii_2016
Computer science_xii_2016Ritika sahu
 
Air Travel Analytics in SAS
Air Travel Analytics in SASAir Travel Analytics in SAS
Air Travel Analytics in SASRohan Nanda
 
Structured military messaging & NEO Net Enabled Operations
Structured military messaging & NEO Net Enabled OperationsStructured military messaging & NEO Net Enabled Operations
Structured military messaging & NEO Net Enabled OperationsSteven McGee
 

Similar to Normalization of shipment data into 1NF and 2NF tables (20)

Discriminators for use in flow-based classification
Discriminators for use in flow-based classificationDiscriminators for use in flow-based classification
Discriminators for use in flow-based classification
 
1 Project 1 Introduction - the SeaPort Project seri.docx
1  Project 1 Introduction - the SeaPort Project seri.docx1  Project 1 Introduction - the SeaPort Project seri.docx
1 Project 1 Introduction - the SeaPort Project seri.docx
 
Sap Payroll Cluster Repair Whitepaper V1.0
Sap Payroll Cluster Repair   Whitepaper V1.0Sap Payroll Cluster Repair   Whitepaper V1.0
Sap Payroll Cluster Repair Whitepaper V1.0
 
D-5436
D-5436D-5436
D-5436
 
Ijariie1117 volume 1-issue 1-page-25-27
Ijariie1117 volume 1-issue 1-page-25-27Ijariie1117 volume 1-issue 1-page-25-27
Ijariie1117 volume 1-issue 1-page-25-27
 
Storage and management of semi structured data
Storage and management of semi structured dataStorage and management of semi structured data
Storage and management of semi structured data
 
Data preparation, depth function
Data preparation, depth functionData preparation, depth function
Data preparation, depth function
 
MULTIDIMENSIONAL ANALYSIS FOR QOS IN WIRELESS SENSOR NETWORKS
MULTIDIMENSIONAL ANALYSIS FOR QOS IN WIRELESS SENSOR NETWORKSMULTIDIMENSIONAL ANALYSIS FOR QOS IN WIRELESS SENSOR NETWORKS
MULTIDIMENSIONAL ANALYSIS FOR QOS IN WIRELESS SENSOR NETWORKS
 
Methodology for Managing Dynamic Collections on Semantic Semi-Structured XMLs
Methodology for Managing Dynamic Collections on Semantic Semi-Structured XMLsMethodology for Managing Dynamic Collections on Semantic Semi-Structured XMLs
Methodology for Managing Dynamic Collections on Semantic Semi-Structured XMLs
 
Databases By ZAK
Databases By ZAKDatabases By ZAK
Databases By ZAK
 
On the fly n w mvd identification for reducing data redundancy
On the fly n w mvd identification for reducing data redundancyOn the fly n w mvd identification for reducing data redundancy
On the fly n w mvd identification for reducing data redundancy
 
MAPPING DATA BETWEEN PROBABILITY SPACES IN PROBABILISTIC DATABASES
MAPPING DATA BETWEEN PROBABILITY SPACES IN PROBABILISTIC DATABASESMAPPING DATA BETWEEN PROBABILITY SPACES IN PROBABILISTIC DATABASES
MAPPING DATA BETWEEN PROBABILITY SPACES IN PROBABILISTIC DATABASES
 
Research Inventy : International Journal of Engineering and Science
Research Inventy : International Journal of Engineering and ScienceResearch Inventy : International Journal of Engineering and Science
Research Inventy : International Journal of Engineering and Science
 
Fdms 1st cycle exp.pdf
Fdms 1st cycle exp.pdfFdms 1st cycle exp.pdf
Fdms 1st cycle exp.pdf
 
Data manipulation on r
Data manipulation on rData manipulation on r
Data manipulation on r
 
Chapter5
Chapter5Chapter5
Chapter5
 
ADB introduction
ADB introductionADB introduction
ADB introduction
 
Computer science_xii_2016
 Computer science_xii_2016 Computer science_xii_2016
Computer science_xii_2016
 
Air Travel Analytics in SAS
Air Travel Analytics in SASAir Travel Analytics in SAS
Air Travel Analytics in SAS
 
Structured military messaging & NEO Net Enabled Operations
Structured military messaging & NEO Net Enabled OperationsStructured military messaging & NEO Net Enabled Operations
Structured military messaging & NEO Net Enabled Operations
 

More from Wakil Kumar

Miniature Circuit Breakers (MCB) By Chhotray Tiyu
Miniature Circuit Breakers (MCB) By Chhotray TiyuMiniature Circuit Breakers (MCB) By Chhotray Tiyu
Miniature Circuit Breakers (MCB) By Chhotray TiyuWakil Kumar
 
Stepdown Transformer By Nagmani
Stepdown Transformer By NagmaniStepdown Transformer By Nagmani
Stepdown Transformer By NagmaniWakil Kumar
 
function (mal120) By Wakil Kumar
function (mal120) By Wakil Kumarfunction (mal120) By Wakil Kumar
function (mal120) By Wakil KumarWakil Kumar
 
Line balancing ppt By Wakil Kumar
Line balancing ppt By Wakil KumarLine balancing ppt By Wakil Kumar
Line balancing ppt By Wakil KumarWakil Kumar
 
RLC series circuit simulation at Proteus Wakil Kumar
RLC series circuit simulation at Proteus Wakil KumarRLC series circuit simulation at Proteus Wakil Kumar
RLC series circuit simulation at Proteus Wakil KumarWakil Kumar
 
RLC series circuit simulation at Proteus
RLC series circuit simulation at Proteus RLC series circuit simulation at Proteus
RLC series circuit simulation at Proteus Wakil Kumar
 

More from Wakil Kumar (7)

Mcq android app
Mcq android appMcq android app
Mcq android app
 
Miniature Circuit Breakers (MCB) By Chhotray Tiyu
Miniature Circuit Breakers (MCB) By Chhotray TiyuMiniature Circuit Breakers (MCB) By Chhotray Tiyu
Miniature Circuit Breakers (MCB) By Chhotray Tiyu
 
Stepdown Transformer By Nagmani
Stepdown Transformer By NagmaniStepdown Transformer By Nagmani
Stepdown Transformer By Nagmani
 
function (mal120) By Wakil Kumar
function (mal120) By Wakil Kumarfunction (mal120) By Wakil Kumar
function (mal120) By Wakil Kumar
 
Line balancing ppt By Wakil Kumar
Line balancing ppt By Wakil KumarLine balancing ppt By Wakil Kumar
Line balancing ppt By Wakil Kumar
 
RLC series circuit simulation at Proteus Wakil Kumar
RLC series circuit simulation at Proteus Wakil KumarRLC series circuit simulation at Proteus Wakil Kumar
RLC series circuit simulation at Proteus Wakil Kumar
 
RLC series circuit simulation at Proteus
RLC series circuit simulation at Proteus RLC series circuit simulation at Proteus
RLC series circuit simulation at Proteus
 

Recently uploaded

Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...Call Girls in Nagpur High Profile
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxfenichawla
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesPrabhanshu Chaturvedi
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGSIVASHANKAR N
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdfKamal Acharya
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 

Recently uploaded (20)

Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 

Normalization of shipment data into 1NF and 2NF tables

  • 1. Career Point University, Kota (Raj.) Minor 2 Assignment Topic : Normalization Presented To: Presented By: Rohit Singh Wakil Kumar Assistant Professor UID- K12467 CSE Dept. B.Tech (CSE) 4th Sem / 2nd Year
  • 2. Normalization In relational database design,normalizationisthe processof organizingdatatominimize redundancy. Normalizationusuallyinvolvesdividinga database intotwoor more tables and definingrelationships betweenthe tables.The objective istoisolate datasothat additions,deletions,andmodificationsof a fieldcanbe made in justone table andthenpropagatedthroughthe restof the database viathe defined relationships. There are three main normal forms, each with increasing levels of normalization:  First Normal Form(1NF): Each field in a table contains different information. For example, in an employee list, each table would contain only one birthdate field.  SecondNormal Form(2NF): No field values can be derived from another field. For example, if a table already included a birthdate field, it could not also include a birth year field, since this information would be redundant.  Third Normal Form (3NF): No duplicate information is permitted. So, for example, if two tables both require a birthdate field, the birthdate information would be separated into a separate table, and the two other tables would then access the birthdate information via an index field in the birthdate table. Any change to a birthdate would automatically be reflect in all tables that link to the birthdate table. The underlying ideas in normalization are simple enough. Through normalization we want to design for our relational database a set of files that (1) contain all the data necessary for the purposes that the database is to serve, (2) have as little redundancy as possible, (3) accommodate multiple values for types of data that require them, (4) permit efficient updates of the data in the database, and (5) avoid the danger of losing data unknowingly. Normalization can be viewed as a series of steps (i.e., levels) designed, one after another, to deal with ways in which tables can be "too complicated for their own good". The purpose of normalization is to reduce the chances for anomalies to occur in a database. The definitions of the various levels of normalization illustrate complications to be eliminated in order to reduce the chances of anomalies. At all levels and in every case of a table with a complication, the resolution of the problem turns out to be the establishment of two or more simpler tables which, as a group, contain the same information as the original table but which, because of their simpler individual structures, lack the complication. To explain this concept we will use a typical business set of data – that commonly found in the shipment of goods.
  • 3. The shipment of goods between a consignee (who gets the goods) and a consignor (who sends them) is also known as consignment, delivery, movement or transport of goods. It typically involves a third party organization who takes on the role of the freight forwarder. They manage the scheduling of the required transport (ship, plane, train, truck, etc.) and may supply the equipment necessary for efficient carriage of the goods. For example, customized containers for the holds of aircraft or refrigerated sea containers for carrying perishable goods. The contract of a shipment between the carrier and either the consignee or the consignor is often established by a document known as a shipping or forwarding instruction or a bill, waybill or bill of lading. The following table (Table 1) gives three sample instances of data that may typically be used for shipping. The first two rows refer to a consignment of goods being shipped by sea and then road in a shipping container using two carriers. The third row relates to a separate air freight shipment. ContractID1 Transport Mode2 CarrierID3 EquipmentID4 SizeTypeCode5 SealNumber6 SealIssuer7 PONL40078678 Sea P&ONL PONL12345 PONL34567 4040 4020 ABX123456 ABX123457 ABC ABC TNT9439287-5 Road TNT PONL34567 4020 ABX123457 GGDFG99 ABC Customs 1 identifies a shipping contract that allows the supplier to ship goods under specific freight conditions or the carrier to bill against a specific contract. 2 specifies the method or type of transportation of the shipment. Typically this may be sea, air or road. 3 the identifier assigned by the agency to the carrier. This identifies the carrier being used for this stage of the shipment. 4 identifies the information about one set of transport equipment related to the shipment. The most common example of transport equipment is a shipping container. 5 the size and type of the transport equipment. 6 identifies the seal number of the equipment. 7 which party issues and is responsible for the seal.
  • 4. 180-1234567 Air KE- Korean Air Cargo KAL12345 747-K10 XXX664 Table 1 Shipment Table We shall use this set of data to demonstrate the principles of normalization. Of course, we can present this data in any number of formats. Here is an XML instantiation of the same data. <Shipment> <ContractId>PONL40078678</ContractId> <TransportModeId>Sea</TransportModeId> <CarrierId>P&ONL</CarrierId> <EquipmentId>PONL12345</EquipmentId> <EquipmentId>PONL34567</EquipmentId> <SizeTypeCode>4040</SizeTypeCode> <SizeTypeCode>4020</SizeTypeCode> <SealNumber>ABX123456</ SealNumber> <SealIssuer>ABC</SealIssuer> <SealNumber>ABX123457</ SealNumber> <SealIssuer>ABC</SealIssuer> </Shipment> <Shipment> <ContractId>TNT9439287-5</ContractId> <TransportModeId>Road</TransportModeId> <CarrierId>TNT</CarrierId> <EquipmentId>PONL34567</EquipmentId> <SizeTypeCode>4020</SizeTypeCode>
  • 5. <SealNumber>ABX123457</ SealNumber> <SealIssuer>ABC</SealIssuer> <SealNumber>GGDFG99</SealNumber> <SealIssuer>Customs</SealIssuer> </Shipment> <Shipment> <ContractId>180-1234567</ContractId> <TransportModeId>Air</TransportModeId> <CarrierId>KE-KoreanAir Cargo</CarrierId> <EquipmentId>KAL12345</EquipmentId> <SizeTypeCode>747-K10</SizeTypeCode> <SealNumber>XXX664</ SealNumber> </Shipment> The first thing to note is that the data present is ‘flat’ – we have one table/container called ‘shipment’ and all attributes or nested elements sit within this one structure. When data is a single flat structure like this, it is known as being in zero normal form (or de-normalized). The purpose of normalization is to put structure or ‘depth’ into the data. The secondthingto be aware of is the primarykey(orkeys) of our data. Withinanysetof data,one or more valuesmaybe usedto uniquelyidentify aspecificinstance of anentry. For example,aContractID may be usedto identifypreciselyone row inthe shipmenttable. Soif we have a ContractIDof “PONL40078678” thenwe should findone,andonlyone,entrywiththisvalue. However,sometimesasingle value maynotbe sufficientlyindividual todothis.Forexample,itis possible fordifferentcarrierstouse the same identificationnumbersfortheircontracts. Technically,we couldhave two“PONL40078678” ContractIDs,one for P&ONLand another for OOCL shipping. There is no businessconventiontoguardagainstthis. So we may needboththe CarrierIDand the ContractIDto be sure of uniqueness. Atthisstage,thisparticularissue wouldaddtothe complexityof ourexample, so we will assume thatContractIDisgood enoughonitsownas a unique key.However,asalways,real businesspractice shouldbe the guide forthese decisions. Itshouldsuffice tosaythatwhenwe talkof keyswe meanthe ‘entire’keyorsetof valuesthatcan uniquelyidentifyasingle entryinourdata. Withthisin mind,the firststepisto progressourdata intoFirst Normal Form.
  • 6. First NormalForm The aim of firstnormal form data isto ensure thatall of the attributesare discrete i.e.canonlytake a single value.Thisisachievedbythe removal of repeatinggroupsintotheirownentities. Forexample,a large Shipmentmayrequire several ‘equipments’orcontainers. Thismeanswe can have repeating EquipmentID,SealNumberandSizeTypeCodevaluesineachcell of ourtable. FirstNormal Form says that these shouldbe separatedintoaseparate table asshownintable 2. ContractID Transport Mode CarrierID PONL40078678 Sea P&ONL TNT9439287-5 Road TNT 180-1234567 Air KE-Korean Air Cargo Table 2 Shipment Table - 1NF ContractID EquipmentID SizeTypeCode SealNumber SealIssuer PONL40078678 PONL12345 4040 ABX123456 ABC PONL40078678 PONL34567 4020 ABX123457 ABC TNT9439287-5 PONL34567 4020 ABX123457 GGDFG99 ABC Customs 180-1234567 KAL12345 747-K10 XXX664 Table 3 ShipmentEquipment Table - 0NF A quickglance at the secondtable will revealthatwe have includedthe ContractIDinthe secondtable as well asthe first. Thisis because wheneverwe move elementsintoanew table of theirownwe include the keyvalue of the original,parenttable. We mustdothisto ensure we retainthe association betweenthe twopiecesof data. Inrelational modelingthisiscalledthe ‘foreign’key –it’sforeign because itshome isinthe parenttable. Anotherlongerglance atthe secondtable will show we still have repeatingvaluesinelements SealNumberandSealIssuer. Thisisbecause acontainermayhave several sealsattached,eachwithits ownnumber. Therefore we needtoseparate SealNumberandSealIssuerfromthisnew table,intoa table of theirown. But before we cando thiswe needto establishthe keyfieldsforthe new ShipmentEquipmenttable.Onthe face of it,EquipmentIDwouldappearsufficientlyprecise tobe unique. Infact,international shippingconventionsensure thatcontainernumbersare unique globally. However,whilstatany particularmomentintime anEquipmentIDwouldbe unique,containersare re- usedinothershipments. Thisisthe case here,where container“PONL34567” istakenoff a shipand
  • 7. carriedby road. So ourkeyfor ShipmentEquipmentisboththe ContractIDandthe EquipmentID. We thenendup withthe following…. ContractID EquipmentID SizeTypeCode PONL40078678 PONL12345 4040 PONL40078678 PONL34567 4020 TNT9439287-5 PONL34567 4020 180-1234567 KAL12345 747-K10 Table 4 ShipmentEquipment Table - 1NF ContractID EquipmentID SealNumber SealIssuer PONL40078678 PONL12345 ABX123456 ABC PONL40078678 PONL34567 ABX123457 ABC TNT9439287-5 PONL34567 ABX123457 ABC TNT9439287-5 PONL34567 GGDFG99 Customs 180-1234567 KAL12345 XXX664 Table 5 ShipmentSeal Table - 1NF The newtable for ShipmentSeal hasinheritedthe foreignkeyof bothContractIDandEquipmentID.That isto say, thispiece of equipmentwhenusedinthisshipmenthasthisseal. Second NormalForm The aim of secondnormal form data isto splitoff intoseparate tablesanyattributesthatdonotwholly dependonthe entire key. For example,whenwe lookcloselyatthe ShipmentEquipmenttable we cansee thatSizeTypeCode does not dependentirelyonContractIDandEquipmentID(ourtwokeys).
  • 8. We can say that the size andtype of a containerdependsonthe EquipmentID. Everycontainerhasone EquipmentIDandone size andtype. “PONL34567” is a 40 footcontainerof standardfeatures. If the EquipmentIDvalue changed(ie adifferentcontainerwasused),thenwe couldnotbe sure the SizeTypeCode wouldremainthe same. SizeTypeCode isdependantonthe EquipmentID. The same cannot be saidfor ContractID. The value of ContractIDcan change withoutaffectingthe SizeTypeCode. For example,whenthe containeristransferredtothe truckfor road haulage – itssize andtype do not change. SecondNormal Formtellsusto separate these attributesthatdon’tdependonthe entire key. Inthis case itis the SizeTypeCode anditsdependantforeignkey,EquipmentID,thatformanew Equipment table. ContractID EquipmentID PONL40078678 PONL12345 PONL40078678 PONL34567 TNT9439287-5 PONL34567 180-1234567 KAL12345 Table 6 - ShipmentEquipment table - 2 NF EquipmentID SizeTypeCode PONL12345 4040 PONL34567 4020 KAL12345 747-K10 Table 7 Equipment table - 2 NF Third NormalForm To achieve adata model inThirdNormal Form we mustensure thatall Non-Keyattributesare independentof one another. ThisissimilartoSecondNormal Form, butnow we focuson the non-key dependencies.
  • 9. For example,if we lookatthe ShipmentSealtable,we seethatSealNumberandSealIssuerare not independentof eachother. Neitherare keysvalues,butthere isadependantrelationshipbetween them,forexample if the SealIssuerwhere tochange thenthe SealNumberwouldpresumablychange as well. Sowe mustmove SealIssueranditsdependantforeignkey,SealNumberintoanew table. Inthis case we shall call itthe Seal table. ContractID EquipmentID SealNumber PONL40078678 PONL12345 ABX123456 PONL40078678 PONL34567 ABX123457 TNT9439287-5 PONL34567 ABX123457 TNT9439287-5 PONL34567 GGDFG99 180-1234567 KAL12345 XXX664 Table 8 ShipmentSeal table - 3NF SealNumber SealIssuer ABX123456 ABC ABX123457 ABC GGDFG99 Customs XXX664 Table 9 Seal table - 3 NF Summary Normalizationisaformal andwell establishedmethodof analyzingdatastructures. If applied consistently,thenthistechnique willidentifythe logical containers necessaryforbuildingre-usable XML schemas. It can be usedinconjunctionwithotheranalysistechniquestocompare andrefine data models. Whilstitsoriginal purpose wastoorganize datato minimize redundancyandavoiddataduplication,itis a powerful technique forimprovingthe understandingof the datamodelsnecessaryforre-usable librariesof componentssuchasUBL.
  • 10. Reference : 1). Wikipedia 2). Google 3).Books,(H.F. Korth)