HTMLify
What is Normalization | DBMS
Views: 649 | Author: cody
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 | <html> <head> <meta http-equiv=Content-Type content="text/html; charset=utf-8"> <meta name=Generator content="Microsoft Word 15 (filtered)"> <style> <!-- /* Font Definitions */ @font-face {font-family:Helvetica; panose-1:2 11 6 4 2 2 2 2 2 4;} @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} @font-face {font-family:Tahoma; panose-1:2 11 6 4 3 5 4 4 2 4;} @font-face {font-family:"Segoe UI"; panose-1:2 11 5 2 4 2 4 2 2 3;} @font-face {font-family:"Arial Rounded MT Bold"; panose-1:2 15 7 4 3 5 4 3 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin-top:0in; margin-right:0in; margin-bottom:10.0pt; margin-left:0in; line-height:115%; font-size:11.0pt; font-family:"Calibri",sans-serif;} .MsoChpDefault {font-family:"Calibri",sans-serif;} .MsoPapDefault {margin-bottom:10.0pt; line-height:115%;} @page WordSection1 {size:595.3pt 841.9pt; margin:.5in .5in .5in .5in;} div.WordSection1 {page:WordSection1;} /* List Definitions */ ol {margin-bottom:0in;} ul {margin-bottom:0in;} --> </style> </head> <body lang=EN-US link=blue vlink=purple style='word-wrap:break-word'> <div class=WordSection1> <p class=MsoNormal style='text-align:justify;background:white'><span lang=EN-IN style='font-size:19.0pt;font-family:"Helvetica",sans-serif; color:#610B38'>What is Normalization?</span></p> <ul style='margin-top:0in' type=circle> <li class=MsoNormal style='color:black;margin-top:3.0pt;text-align:justify; line-height:18.75pt;background:white'><span lang=EN-IN style='font-size: 12.0pt;font-family:"Segoe UI",sans-serif'>Normalization is the process of organizing the data in the database.</span></li> <li class=MsoNormal style='color:black;margin-top:3.0pt;text-align:justify; line-height:18.75pt;background:white'><span lang=EN-IN style='font-size: 12.0pt;font-family:"Segoe UI",sans-serif'>Normalization is used to minimize the redundancy from a relation or set of relations. It is also used to eliminate undesirable characteristics like Insertion, Update, and Deletion Anomalies.</span></li> <li class=MsoNormal style='color:black;margin-top:3.0pt;text-align:justify; line-height:18.75pt;background:white'><span lang=EN-IN style='font-size: 12.0pt;font-family:"Segoe UI",sans-serif'>Normalization divides the larger table into smaller and links them using relationships.</span></li> <li class=MsoNormal style='color:black;margin-top:3.0pt;text-align:justify; line-height:18.75pt;background:white'><span lang=EN-IN style='font-size: 12.0pt;font-family:"Segoe UI",sans-serif'>The normal form is used to reduce redundancy from the database table.</span></li> </ul> <p class=MsoNormal style='text-align:justify;line-height:normal;background: white'><span lang=EN-IN style='font-size:12.0pt;font-family:"Arial Rounded MT Bold",sans-serif; color:red'>Why do we need Normalization?</span></p> <p class=MsoNormal style='text-align:justify;line-height:normal;background: white'><span lang=EN-IN style='font-size:12.0pt;font-family:"Segoe UI",sans-serif; color:#333333'>The main reason for normalizing the relations is removing these anomalies. Failure to eliminate anomalies leads to data redundancy and can cause data integrity and other problems as the database grows. Normalization consists of a series of guidelines that helps to guide you in creating a good database structure.</span></p> <p class=MsoNormal style='text-align:justify;line-height:normal;background: white'><b><span lang=EN-IN style='font-size:12.0pt;font-family:"Segoe UI",sans-serif; color:#333333'>Data modification anomalies can be categorized into three types:</span></b></p> <ul style='margin-top:0in' type=circle> <li class=MsoNormal style='color:black;margin-top:3.0pt;text-align:justify; line-height:18.75pt;background:white'><b><span lang=EN-IN style='font-size:12.0pt;font-family:"Segoe UI",sans-serif'>Insertion Anomaly:</span></b><span lang=EN-IN style='font-size:12.0pt;font-family: "Segoe UI",sans-serif'> Insertion Anomaly refers to when one cannot insert a new tuple into a relationship due to lack of data.</span></li> <li class=MsoNormal style='color:black;margin-top:3.0pt;text-align:justify; line-height:18.75pt;background:white'><b><span lang=EN-IN style='font-size:12.0pt;font-family:"Segoe UI",sans-serif'>Deletion Anomaly:</span></b><span lang=EN-IN style='font-size:12.0pt;font-family: "Segoe UI",sans-serif'> The delete anomaly refers to the situation where the deletion of data results in the unintended loss of some other important data.</span></li> <li class=MsoNormal style='color:black;margin-top:3.0pt;text-align:justify; line-height:18.75pt;background:white'><b><span lang=EN-IN style='font-size:12.0pt;font-family:"Segoe UI",sans-serif'>Updatation Anomaly:</span></b><span lang=EN-IN style='font-size:12.0pt;font-family: "Segoe UI",sans-serif'> The update anomaly is when an update of a single data value requires multiple rows of data to be updated.</span></li> </ul> <p class=MsoNormal style='text-align:justify;line-height:15.6pt;background: white'><span lang=EN-IN style='font-size:12.0pt;font-family:"Arial Rounded MT Bold",sans-serif; color:#610B38'>Types of Normal Forms:</span></p> <p class=MsoNormal style='text-align:justify;line-height:normal;background: white'><span lang=EN-IN style='font-size:12.0pt;font-family:"Arial Rounded MT Bold",sans-serif; color:#333333'>Normalization works through a series of stages called Normal forms. The normal forms apply to individual relations. The relation is said to be in particular normal form if it satisfies constraints.</span></p> <p class=MsoNormal style='text-align:justify;line-height:normal;background: white'><b><span lang=EN-IN style='font-size:12.0pt;font-family:"Arial Rounded MT Bold",sans-serif; color:#333333'>Following are the various types of Normal forms:</span></b></p> <p class=MsoNormal style='margin-bottom:0in;line-height:normal'><span lang=EN-IN style='font-size:12.0pt;font-family:"Arial Rounded MT Bold",sans-serif'> </span></p> <table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 width=693 style='width:519.5pt;background:white;border-collapse:collapse;border:none'> <tr> <td valign=top style='border-top:solid #C7CCBE 1.0pt;border-left:solid #C7CCBE 1.0pt; border-bottom:none;border-right:none;background:#C7CCBE;padding:9.0pt 9.0pt 9.0pt 9.0pt'> <p class=MsoNormal style='margin-bottom:0in;line-height:normal'><b><span lang=EN-IN style='font-size:12.0pt;font-family:"Arial Rounded MT Bold",sans-serif; color:black'>Normal Form</span></b></p> </td> <td valign=top style='border-top:solid #C7CCBE 1.0pt;border-left:none; border-bottom:none;border-right:solid #C7CCBE 1.0pt;background:#C7CCBE; padding:9.0pt 9.0pt 9.0pt 9.0pt'> <p class=MsoNormal style='margin-bottom:0in;line-height:normal'><b><span lang=EN-IN style='font-size:12.0pt;font-family:"Arial Rounded MT Bold",sans-serif; color:black'>Description</span></b></p> </td> </tr> <tr> <td valign=top style='border:solid #C7CCBE 1.0pt;padding:6.0pt 6.0pt 6.0pt 6.0pt'> <p class=MsoNormal style='margin-bottom:0in;text-align:justify;line-height: normal'><span lang=EN-IN style='color:black'><a href="https://www.javatpoint.com/dbms-first-normal-form"><span style='font-size:12.0pt;font-family:"Arial Rounded MT Bold",sans-serif; color:green;text-decoration:none'>1NF</span></a></span></p> </td> <td valign=top style='border:solid #C7CCBE 1.0pt;border-left:none;padding: 6.0pt 6.0pt 6.0pt 6.0pt'> <p class=MsoNormal style='margin-bottom:0in;text-align:justify;line-height: normal'><span lang=EN-IN style='font-size:12.0pt;font-family:"Arial Rounded MT Bold",sans-serif; color:#333333'>A relation is in 1NF if it contains an atomic value.</span></p> </td> </tr> <tr> <td valign=top style='border:solid #C7CCBE 1.0pt;border-top:none;background: #EFF1EB;padding:6.0pt 6.0pt 6.0pt 6.0pt'> <p class=MsoNormal style='margin-bottom:0in;text-align:justify;line-height: normal'><span lang=EN-IN style='color:black'><a href="https://www.javatpoint.com/dbms-second-normal-form"><span style='font-size:12.0pt;font-family:"Arial Rounded MT Bold",sans-serif; color:green;text-decoration:none'>2NF</span></a></span></p> </td> <td valign=top style='border-top:none;border-left:none;border-bottom:solid #C7CCBE 1.0pt; border-right:solid #C7CCBE 1.0pt;background:#EFF1EB;padding:6.0pt 6.0pt 6.0pt 6.0pt'> <p class=MsoNormal style='margin-bottom:0in;text-align:justify;line-height: normal'><span lang=EN-IN style='font-size:12.0pt;font-family:"Arial Rounded MT Bold",sans-serif; color:#333333'>A relation will be in 2NF if it is in 1NF and all non-key attributes are fully functional dependent on the primary key.</span></p> </td> </tr> <tr> <td valign=top style='border:solid #C7CCBE 1.0pt;border-top:none;padding: 6.0pt 6.0pt 6.0pt 6.0pt'> <p class=MsoNormal style='margin-bottom:0in;text-align:justify;line-height: normal'><span lang=EN-IN style='color:black'><a href="https://www.javatpoint.com/dbms-third-normal-form"><span style='font-size:12.0pt;font-family:"Arial Rounded MT Bold",sans-serif; color:green;text-decoration:none'>3NF</span></a></span></p> </td> <td valign=top style='border-top:none;border-left:none;border-bottom:solid #C7CCBE 1.0pt; border-right:solid #C7CCBE 1.0pt;padding:6.0pt 6.0pt 6.0pt 6.0pt'> <p class=MsoNormal style='margin-bottom:0in;text-align:justify;line-height: normal'><span lang=EN-IN style='font-size:12.0pt;font-family:"Arial Rounded MT Bold",sans-serif; color:#333333'>A relation will be in 3NF if it is in 2NF and no transition dependency exists.</span></p> </td> </tr> <tr> <td valign=top style='border:solid #C7CCBE 1.0pt;border-top:none;background: #EFF1EB;padding:6.0pt 6.0pt 6.0pt 6.0pt'> <p class=MsoNormal style='margin-bottom:0in;text-align:justify;line-height: normal'><span lang=EN-IN style='font-size:12.0pt;font-family:"Arial Rounded MT Bold",sans-serif; color:#333333'>BCNF</span></p> </td> <td valign=top style='border-top:none;border-left:none;border-bottom:solid #C7CCBE 1.0pt; border-right:solid #C7CCBE 1.0pt;background:#EFF1EB;padding:6.0pt 6.0pt 6.0pt 6.0pt'> <p class=MsoNormal style='margin-bottom:0in;text-align:justify;line-height: normal'><span lang=EN-IN style='font-size:12.0pt;font-family:"Arial Rounded MT Bold",sans-serif; color:#333333'>A stronger definition of 3NF is known as Boyce Codd's normal form.</span></p> </td> </tr> <tr> <td valign=top style='border:solid #C7CCBE 1.0pt;border-top:none;padding: 6.0pt 6.0pt 6.0pt 6.0pt'> <p class=MsoNormal style='margin-bottom:0in;text-align:justify;line-height: normal'><span lang=EN-IN style='color:black'><a href="https://www.javatpoint.com/dbms-forth-normal-form"><span style='font-size:12.0pt;font-family:"Arial Rounded MT Bold",sans-serif; color:green;text-decoration:none'>4NF</span></a></span></p> </td> <td valign=top style='border-top:none;border-left:none;border-bottom:solid #C7CCBE 1.0pt; border-right:solid #C7CCBE 1.0pt;padding:6.0pt 6.0pt 6.0pt 6.0pt'> <p class=MsoNormal style='margin-bottom:0in;text-align:justify;line-height: normal'><span lang=EN-IN style='font-size:12.0pt;font-family:"Arial Rounded MT Bold",sans-serif; color:#333333'>A relation will be in 4NF if it is in Boyce Codd's normal form and has no multi-valued dependency.</span></p> </td> </tr> <tr> <td valign=top style='border:solid #C7CCBE 1.0pt;border-top:none;background: #EFF1EB;padding:6.0pt 6.0pt 6.0pt 6.0pt'> <p class=MsoNormal style='margin-bottom:0in;text-align:justify;line-height: normal'><span lang=EN-IN style='color:black'><a href="https://www.javatpoint.com/dbms-fifth-normal-form"><span style='font-size:12.0pt;font-family:"Arial Rounded MT Bold",sans-serif; color:green;text-decoration:none'>5NF</span></a></span></p> </td> <td valign=top style='border-top:none;border-left:none;border-bottom:solid #C7CCBE 1.0pt; border-right:solid #C7CCBE 1.0pt;background:#EFF1EB;padding:6.0pt 6.0pt 6.0pt 6.0pt'> <p class=MsoNormal style='margin-bottom:0in;text-align:justify;line-height: normal'><span lang=EN-IN style='font-size:12.0pt;font-family:"Arial Rounded MT Bold",sans-serif; color:#333333'>A relation is in 5NF. If it is in 4NF and does not contain any join dependency, joining should be lossless.</span></p> </td> </tr> </table> <p class=MsoNormal style='text-align:justify;line-height:15.6pt;background: white'><span lang=EN-IN style='font-size:12.0pt;font-family:"Arial Rounded MT Bold",sans-serif; color:#610B38'>Advantages of Normalization</span></p> <ul style='margin-top:0in' type=circle> <li class=MsoNormal style='color:black;margin-top:3.0pt;text-align:justify; line-height:18.75pt;background:white'><span lang=EN-IN style='font-size: 12.0pt;font-family:"Arial Rounded MT Bold",sans-serif'>Normalization helps to minimize data redundancy.</span></li> <li class=MsoNormal style='color:black;margin-top:3.0pt;text-align:justify; line-height:18.75pt;background:white'><span lang=EN-IN style='font-size: 12.0pt;font-family:"Arial Rounded MT Bold",sans-serif'>Greater overall database organization.</span></li> <li class=MsoNormal style='color:black;margin-top:3.0pt;text-align:justify; line-height:18.75pt;background:white'><span lang=EN-IN style='font-size: 12.0pt;font-family:"Arial Rounded MT Bold",sans-serif'>Data consistency within the database.</span></li> <li class=MsoNormal style='color:black;margin-top:3.0pt;text-align:justify; line-height:18.75pt;background:white'><span lang=EN-IN style='font-size: 12.0pt;font-family:"Arial Rounded MT Bold",sans-serif'>Much more flexible database design.</span></li> <li class=MsoNormal style='color:black;margin-top:3.0pt;text-align:justify; line-height:18.75pt;background:white'><span lang=EN-IN style='font-size: 12.0pt;font-family:"Arial Rounded MT Bold",sans-serif'>Enforces the concept of relational integrity.</span></li> </ul> <p class=MsoNormal style='text-align:justify;line-height:15.6pt;background: white'><span lang=EN-IN style='font-size:12.0pt;font-family:"Arial Rounded MT Bold",sans-serif; color:#610B38'>Disadvantages of Normalization</span></p> <ul style='margin-top:0in' type=circle> <li class=MsoNormal style='color:black;margin-top:3.0pt;text-align:justify; line-height:18.75pt;background:white'><span lang=EN-IN style='font-size: 12.0pt;font-family:"Arial Rounded MT Bold",sans-serif'>You cannot start building the database before knowing what the user needs.</span></li> <li class=MsoNormal style='color:black;margin-top:3.0pt;text-align:justify; line-height:18.75pt;background:white'><span lang=EN-IN style='font-size: 12.0pt;font-family:"Arial Rounded MT Bold",sans-serif'>The performance degrades when normalizing the relations to higher normal forms, i.e., 4NF, 5NF.</span></li> <li class=MsoNormal style='color:black;margin-top:3.0pt;text-align:justify; line-height:18.75pt;background:white'><span lang=EN-IN style='font-size: 12.0pt;font-family:"Arial Rounded MT Bold",sans-serif'>It is very time-consuming and difficult to normalize relations of a higher degree.</span></li> <li class=MsoNormal style='color:black;margin-top:3.0pt;text-align:justify; line-height:18.75pt;background:white'><span lang=EN-IN style='font-size: 12.0pt;font-family:"Arial Rounded MT Bold",sans-serif'>Careless decomposition may lead to a bad database design, leading to serious problems.</span></li> </ul> <p class=MsoNormal><span lang=EN-IN style='font-size:12.0pt;line-height:115%; font-family:"Arial Rounded MT Bold",sans-serif'> </span></p> </div> </body> </html> |