{"id":148,"date":"2015-10-15T15:55:37","date_gmt":"2015-10-15T20:55:37","guid":{"rendered":"http:\/\/naps.com.mx\/blog\/?p=148"},"modified":"2017-11-16T12:15:52","modified_gmt":"2017-11-16T18:15:52","slug":"ejemplos-de-primera-forma-normal-del-modelo-relacional","status":"publish","type":"post","link":"https:\/\/naps.com.mx\/blog\/ejemplos-de-primera-forma-normal-del-modelo-relacional\/","title":{"rendered":"Ejemplos de Primera forma normal del modelo relacional"},"content":{"rendered":"<p>Una relaci\u00f3n se encuentra en <strong>Primera Forma Normal (1FN)<\/strong> cuando cada atributo solo toma un valor del dominio simple subyacente. En 1FN no existen grupos repetitivos (De<br \/>\nMiguel et al, 2001). \u00a0En el siguiente ejemplo la tabla no se encuentra en 1FN.<\/p>\n<p><!--more  Continuar leyendo !--><\/p>\n<table>\n<tbody>\n<tr>\n<th width=\"299\">Nombre<\/th>\n<th width=\"299\">Recursos<\/th>\n<\/tr>\n<tr>\n<td width=\"299\">Juan<\/td>\n<td width=\"299\">MochilaComputadora<\/td>\n<\/tr>\n<tr>\n<td width=\"299\">Mar\u00eda<\/td>\n<td width=\"299\">Libreta<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>Para que la tabla anterior est\u00e9 en 1FN y sea una verdadera <strong>relaci\u00f3n<\/strong> deber\u00eda encontrarse en esta forma:<\/p>\n<table>\n<tbody>\n<tr>\n<th width=\"299\">Nombre<\/th>\n<th width=\"299\">Recursos<\/th>\n<\/tr>\n<tr>\n<td width=\"299\">Juan<\/td>\n<td width=\"299\">Mochila<\/td>\n<\/tr>\n<tr>\n<td width=\"299\">Juan<\/td>\n<td width=\"299\">Computadora<\/td>\n<\/tr>\n<tr>\n<td width=\"299\">Mar\u00eda<\/td>\n<td width=\"299\">Libreta<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p><strong>Se dice entonces que una relaci\u00f3n est\u00e1 en 1FN si los dominios de todos los atributos son at\u00f3micos<\/strong> (Silberschatz A., Korth H. y Sudarshan S., 2006) <strong>y monovalentes<\/strong> (Reynosa E., Maldonado C., Mu\u00f1oz R., Damiano L., Abrutsky M, 2012). Se le llama <em>at\u00f3mico<\/em> a los elementos de un dominio cuando son unidades indivisibles. En la primera tabla \u201cMochila\u201d y \u201cComputadora\u201d son elementos divisibles por lo que esa tabla no est\u00e1 en 1FN. El t\u00e9rmino <em>monovalente<\/em> se refiere a que los valores no pueden repetirse y deben expresarse una sola vez por ocurrencia. Si una tupla tiene repetida varias veces la misma informaci\u00f3n deber\u00e1 reducirse a una \u00fanica instancia. A eso se refiere la expresi\u00f3n, eliminar grupos repetitivos.<\/p>\n<p>Veamos el siguente ejemplo:<\/p>\n<p>Tabla original<\/p>\n<table>\n<tbody>\n<tr>\n<th width=\"55\">Sucursal y n\u00famero de factura<\/th>\n<th width=\"55\">Fecha de la factura<\/th>\n<th width=\"55\">Forma de pago<\/th>\n<th width=\"55\">C\u00f3digo de cliente<\/th>\n<th width=\"55\">Nombre de cliente<\/th>\n<th width=\"55\">C\u00f3digo de art\u00edculo<\/th>\n<th width=\"55\">Nombre de art\u00edculo<\/th>\n<th width=\"55\">Cantidad del art\u00edculo<\/th>\n<th width=\"55\">Precio unitario del art\u00edculo<\/th>\n<th width=\"55\">Subtotal del art\u00edculo<\/th>\n<th width=\"55\">Total de factura<\/th>\n<\/tr>\n<tr>\n<td width=\"55\">01-100<\/td>\n<td width=\"55\">1\/10\/15<\/td>\n<td width=\"55\">Cr\u00e9dito<\/td>\n<td width=\"55\">01<\/td>\n<td width=\"55\">PEREZ<\/td>\n<td width=\"55\">01<\/td>\n<td width=\"55\">CAMISA<\/td>\n<td width=\"55\">2<\/td>\n<td width=\"55\">50<\/td>\n<td width=\"55\">100<\/td>\n<td width=\"55\">440<\/td>\n<\/tr>\n<tr>\n<td width=\"55\">01-100<\/td>\n<td width=\"55\">1\/10\/15<\/td>\n<td width=\"55\">\u00a0Cr\u00e9dito<\/td>\n<td width=\"55\">01<\/td>\n<td width=\"55\">PEREZ<\/td>\n<td width=\"55\">02<\/td>\n<td width=\"55\">ZAPATOS<\/td>\n<td width=\"55\">3<\/td>\n<td width=\"55\">80<\/td>\n<td width=\"55\">240<\/td>\n<td width=\"55\">440<\/td>\n<\/tr>\n<tr>\n<td width=\"55\">01-100<\/td>\n<td width=\"55\">1\/10\/15<\/td>\n<td width=\"55\">Cr\u00e9dito<\/td>\n<td width=\"55\">01<\/td>\n<td width=\"55\">PEREZ<\/td>\n<td width=\"55\">05<\/td>\n<td width=\"55\">MESA<\/td>\n<td width=\"55\">1<\/td>\n<td width=\"55\">100<\/td>\n<td width=\"55\">100<\/td>\n<td width=\"55\">440<\/td>\n<\/tr>\n<tr>\n<td width=\"55\">01-101<\/td>\n<td width=\"55\">2\/10\/15<\/td>\n<td width=\"55\">Contado<\/td>\n<td width=\"55\">33<\/td>\n<td width=\"55\">GARC\u00cdA<\/td>\n<td width=\"55\">09<\/td>\n<td width=\"55\">TINTA<\/td>\n<td width=\"55\">4<\/td>\n<td width=\"55\">25<\/td>\n<td width=\"55\">100<\/td>\n<td width=\"55\">100<\/td>\n<\/tr>\n<tr>\n<td width=\"55\">02-100<\/td>\n<td width=\"55\">3\/10\/15<\/td>\n<td width=\"55\">Cr\u00e9dito<\/td>\n<td width=\"55\">45<\/td>\n<td width=\"55\">GOMEZ<\/td>\n<td width=\"55\">13<\/td>\n<td width=\"55\">CUADRO<\/td>\n<td width=\"55\">5<\/td>\n<td width=\"55\">90<\/td>\n<td width=\"55\">450<\/td>\n<td width=\"55\">550<\/td>\n<\/tr>\n<tr>\n<td width=\"55\">02-100<\/td>\n<td width=\"55\">3\/10\/15<\/td>\n<td width=\"55\">Cr\u00e9dito<\/td>\n<td width=\"55\">45<\/td>\n<td width=\"55\">GOMEZ<\/td>\n<td width=\"55\">05<\/td>\n<td width=\"55\">MESA<\/td>\n<td width=\"55\">1<\/td>\n<td width=\"55\">100<\/td>\n<td width=\"55\">100<\/td>\n<td width=\"55\">550<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>Observamos que no se encuentra en 1FN, pues Sucursal y n\u00famero de factura <strong>no es un dato at\u00f3mico<\/strong>.\u00a0 Un primer cambio que podemos hacer es el siguiente:<\/p>\n<p>&nbsp;<\/p>\n<table>\n<tbody>\n<tr>\n<th width=\"20\">Sucursal<\/th>\n<th width=\"55\">N\u00famero de factura<\/th>\n<th width=\"50\">Fecha de la factura<\/th>\n<th width=\"52\">Forma de pago<\/th>\n<th width=\"49\">C\u00f3digo de cliente<\/th>\n<th width=\"55\">Nombre de cliente<\/th>\n<th width=\"52\">C\u00f3digo de art\u00edculo<\/th>\n<th width=\"55\">Nombre de art\u00edculo<\/th>\n<th width=\"58\">Cantidad del art\u00edculo<\/th>\n<th width=\"53\">Precio unitario del art\u00edculo<\/th>\n<th width=\"55\">Subtotal del art\u00edculo<\/th>\n<th width=\"50\">Total de factura<\/th>\n<\/tr>\n<tr>\n<td width=\"20\">01<\/td>\n<td width=\"55\">100<\/td>\n<td width=\"50\">1\/10\/15<\/td>\n<td width=\"52\">Cr\u00e9dito<\/td>\n<td width=\"49\">01<\/td>\n<td width=\"55\">PEREZ<\/td>\n<td width=\"52\">01<\/td>\n<td width=\"55\">CAMISA<\/td>\n<td width=\"58\">2<\/td>\n<td width=\"53\">50<\/td>\n<td width=\"55\">100<\/td>\n<td width=\"50\">440<\/td>\n<\/tr>\n<tr>\n<td width=\"20\">01<\/td>\n<td width=\"55\">100<\/td>\n<td width=\"50\">1\/10\/15<\/td>\n<td width=\"52\">\u00a0Cr\u00e9dito<\/td>\n<td width=\"49\">01<\/td>\n<td width=\"55\">PEREZ<\/td>\n<td width=\"52\">02<\/td>\n<td width=\"55\">ZAPATOS<\/td>\n<td width=\"58\">3<\/td>\n<td width=\"53\">80<\/td>\n<td width=\"55\">240<\/td>\n<td width=\"50\">440<\/td>\n<\/tr>\n<tr>\n<td width=\"20\">01<\/td>\n<td width=\"55\">100<\/td>\n<td width=\"50\">1\/10\/15<\/td>\n<td width=\"52\">Cr\u00e9dito<\/td>\n<td width=\"49\">01<\/td>\n<td width=\"55\">PEREZ<\/td>\n<td width=\"52\">05<\/td>\n<td width=\"55\">MESA<\/td>\n<td width=\"58\">1<\/td>\n<td width=\"53\">100<\/td>\n<td width=\"55\">100<\/td>\n<td width=\"50\">440<\/td>\n<\/tr>\n<tr>\n<td width=\"20\">01<\/td>\n<td width=\"55\">101<\/td>\n<td width=\"50\">2\/10\/15<\/td>\n<td width=\"52\">Contado<\/td>\n<td width=\"49\">33<\/td>\n<td width=\"55\">GARC\u00cdA<\/td>\n<td width=\"52\">09<\/td>\n<td width=\"55\">TINTA<\/td>\n<td width=\"58\">4<\/td>\n<td width=\"53\">25<\/td>\n<td width=\"55\">100<\/td>\n<td width=\"50\">100<\/td>\n<\/tr>\n<tr>\n<td width=\"20\">02<\/td>\n<td width=\"55\">100<\/td>\n<td width=\"50\">3\/10\/15<\/td>\n<td width=\"52\">Cr\u00e9dito<\/td>\n<td width=\"49\">45<\/td>\n<td width=\"55\">GOMEZ<\/td>\n<td width=\"52\">13<\/td>\n<td width=\"55\">CUADRO<\/td>\n<td width=\"58\">5<\/td>\n<td width=\"53\">90<\/td>\n<td width=\"55\">450<\/td>\n<td width=\"50\">550<\/td>\n<\/tr>\n<tr>\n<td width=\"20\">02<\/td>\n<td width=\"55\">100<\/td>\n<td width=\"50\">3\/10\/15<\/td>\n<td width=\"52\">Cr\u00e9dito<\/td>\n<td width=\"49\">45<\/td>\n<td width=\"55\">GOMEZ<\/td>\n<td width=\"52\">05<\/td>\n<td width=\"55\">MESA<\/td>\n<td width=\"58\">1<\/td>\n<td width=\"53\">100<\/td>\n<td width=\"55\">100<\/td>\n<td width=\"50\">550<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>Encontramos que todav\u00eda existen <strong>grupos repetitivos<\/strong>. Para eliminarlos y no eliminar los detalles de la factura no queda otra opci\u00f3n sino dividir la tabla.<\/p>\n<table>\n<tbody>\n<tr>\n<th width=\"55\">Sucursal<\/th>\n<th width=\"55\">N\u00famero de factura<\/th>\n<th width=\"50\">Fecha de la factura<\/th>\n<th width=\"52\">Forma de pago<\/th>\n<th width=\"49\">C\u00f3digo de cliente<\/th>\n<th width=\"55\">Nombre de cliente<\/th>\n<th width=\"55\">Total de factura<\/th>\n<\/tr>\n<tr>\n<td width=\"55\">01<\/td>\n<td width=\"55\">100<\/td>\n<td width=\"50\">1\/10\/15<\/td>\n<td width=\"52\">Cr\u00e9dito<\/td>\n<td width=\"49\">01<\/td>\n<td width=\"55\">PEREZ<\/td>\n<td width=\"55\">440<\/td>\n<\/tr>\n<tr>\n<td width=\"55\">01<\/td>\n<td width=\"55\">100<\/td>\n<td width=\"50\">1\/10\/15<\/td>\n<td width=\"52\">\u00a0Cr\u00e9dito<\/td>\n<td width=\"49\">01<\/td>\n<td width=\"55\">PEREZ<\/td>\n<td width=\"55\">440<\/td>\n<\/tr>\n<tr>\n<td width=\"55\">01<\/td>\n<td width=\"55\">100<\/td>\n<td width=\"50\">1\/10\/15<\/td>\n<td width=\"52\">Cr\u00e9dito<\/td>\n<td width=\"49\">01<\/td>\n<td width=\"55\">PEREZ<\/td>\n<td width=\"55\">440<\/td>\n<\/tr>\n<tr>\n<td width=\"55\">01<\/td>\n<td width=\"55\">101<\/td>\n<td width=\"50\">2\/10\/15<\/td>\n<td width=\"52\">Contado<\/td>\n<td width=\"49\">33<\/td>\n<td width=\"55\">GARC\u00cdA<\/td>\n<td width=\"55\">100<\/td>\n<\/tr>\n<tr>\n<td width=\"55\">02<\/td>\n<td width=\"55\">100<\/td>\n<td width=\"50\">3\/10\/15<\/td>\n<td width=\"52\">Cr\u00e9dito<\/td>\n<td width=\"49\">45<\/td>\n<td width=\"55\">GOMEZ<\/td>\n<td width=\"55\">550<\/td>\n<\/tr>\n<tr>\n<td width=\"55\">02<\/td>\n<td width=\"55\">100<\/td>\n<td width=\"50\">3\/10\/15<\/td>\n<td width=\"52\">Cr\u00e9dito<\/td>\n<td width=\"49\">45<\/td>\n<td width=\"55\">GOMEZ<\/td>\n<td width=\"55\">550<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"52\">C\u00f3digo de art\u00edculo<\/td>\n<td width=\"55\">Nombre de art\u00edculo<\/td>\n<td width=\"58\">Cantidad del art\u00edculo<\/td>\n<td width=\"53\">Precio unitario del art\u00edculo<\/td>\n<td width=\"55\">Subtotal del art\u00edculo<\/td>\n<\/tr>\n<tr>\n<td width=\"52\">01<\/td>\n<td width=\"55\">CAMISA<\/td>\n<td width=\"58\">2<\/td>\n<td width=\"53\">50<\/td>\n<td width=\"55\">100<\/td>\n<\/tr>\n<tr>\n<td width=\"52\">02<\/td>\n<td width=\"55\">ZAPATOS<\/td>\n<td width=\"58\">3<\/td>\n<td width=\"53\">80<\/td>\n<td width=\"55\">240<\/td>\n<\/tr>\n<tr>\n<td width=\"52\">05<\/td>\n<td width=\"55\">MESA<\/td>\n<td width=\"58\">1<\/td>\n<td width=\"53\">100<\/td>\n<td width=\"55\">100<\/td>\n<\/tr>\n<tr>\n<td width=\"52\">09<\/td>\n<td width=\"55\">TINTA<\/td>\n<td width=\"58\">4<\/td>\n<td width=\"53\">25<\/td>\n<td width=\"55\">100<\/td>\n<\/tr>\n<tr>\n<td width=\"52\">13<\/td>\n<td width=\"55\">CUADRO<\/td>\n<td width=\"58\">5<\/td>\n<td width=\"53\">90<\/td>\n<td width=\"55\">450<\/td>\n<\/tr>\n<tr>\n<td width=\"52\">05<\/td>\n<td width=\"55\">MESA<\/td>\n<td width=\"58\">1<\/td>\n<td width=\"53\">100<\/td>\n<td width=\"55\">100<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>En la primera de las dos tablas resultantes, podemos <strong>eliminar<\/strong> los datos repetitivos, quedando la tabla de esta forma<\/p>\n<table>\n<tbody>\n<tr>\n<th width=\"55\">Sucursal<\/th>\n<th width=\"55\">N\u00famero de factura<\/th>\n<th width=\"50\">Fecha de la factura<\/th>\n<th width=\"52\">Forma de pago<\/th>\n<th width=\"49\">C\u00f3digo de cliente<\/th>\n<th width=\"55\">Nombre de cliente<\/th>\n<th width=\"55\">Total de factura<\/th>\n<\/tr>\n<tr>\n<td width=\"55\">01<\/td>\n<td width=\"55\">100<\/td>\n<td width=\"50\">1\/10\/15<\/td>\n<td width=\"52\">Cr\u00e9dito<\/td>\n<td width=\"49\">01<\/td>\n<td width=\"55\">PEREZ<\/td>\n<td width=\"55\">440<\/td>\n<\/tr>\n<tr>\n<td width=\"55\">01<\/td>\n<td width=\"55\">101<\/td>\n<td width=\"50\">2\/10\/15<\/td>\n<td width=\"52\">Contado<\/td>\n<td width=\"49\">33<\/td>\n<td width=\"55\">GARC\u00cdA<\/td>\n<td width=\"55\">100<\/td>\n<\/tr>\n<tr>\n<td width=\"55\">02<\/td>\n<td width=\"55\">100<\/td>\n<td width=\"50\">3\/10\/15<\/td>\n<td width=\"52\">Cr\u00e9dito<\/td>\n<td width=\"49\">45<\/td>\n<td width=\"55\">GOMEZ<\/td>\n<td width=\"55\">550<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>Elegimos los dos primeros atributos como <strong>clave primaria<\/strong><\/p>\n<table>\n<tbody>\n<tr>\n<td colspan=\"2\" width=\"110\"><strong>PK<\/strong><\/td>\n<td width=\"50\"><\/td>\n<td width=\"52\"><\/td>\n<td width=\"49\"><\/td>\n<td width=\"55\"><\/td>\n<td width=\"55\"><\/td>\n<\/tr>\n<tr>\n<td width=\"55\">Sucursal<\/td>\n<td width=\"55\">N\u00famero de factura<\/td>\n<td width=\"50\">Fecha de la factura<\/td>\n<td width=\"52\">Forma de pago<\/td>\n<td width=\"49\">C\u00f3digo de cliente<\/td>\n<td width=\"55\">Nombre de cliente<\/td>\n<td width=\"55\">Total de factura<\/td>\n<\/tr>\n<tr>\n<td width=\"55\">01<\/td>\n<td width=\"55\">100<\/td>\n<td width=\"50\">1\/10\/15<\/td>\n<td width=\"52\">Cr\u00e9dito<\/td>\n<td width=\"49\">01<\/td>\n<td width=\"55\">PEREZ<\/td>\n<td width=\"55\">440<\/td>\n<\/tr>\n<tr>\n<td width=\"55\">01<\/td>\n<td width=\"55\">101<\/td>\n<td width=\"50\">2\/10\/15<\/td>\n<td width=\"52\">Contado<\/td>\n<td width=\"49\">33<\/td>\n<td width=\"55\">GARC\u00cdA<\/td>\n<td width=\"55\">100<\/td>\n<\/tr>\n<tr>\n<td width=\"55\">02<\/td>\n<td width=\"55\">100<\/td>\n<td width=\"50\">3\/10\/15<\/td>\n<td width=\"52\">Cr\u00e9dito<\/td>\n<td width=\"49\">45<\/td>\n<td width=\"55\">GOMEZ<\/td>\n<td width=\"55\">550<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p><strong>Agregamos<\/strong> las columnas que componen la clave primaria de la primera tabla, a la segunda tabla para poder relacionar ambas tablas.<\/p>\n<table>\n<tbody>\n<tr>\n<th width=\"55\">Sucursal<\/th>\n<th width=\"55\">N\u00famero de factura<\/th>\n<th width=\"52\">C\u00f3digo de art\u00edculo<\/th>\n<th width=\"55\">Nombre de art\u00edculo<\/th>\n<th width=\"58\">Cantidad del art\u00edculo<\/th>\n<th width=\"53\">Precio unitario del art\u00edculo<\/th>\n<th width=\"55\">Subtotal del art\u00edculo<\/th>\n<\/tr>\n<tr>\n<td width=\"55\">01<\/td>\n<td width=\"55\">100<\/td>\n<td width=\"52\">01<\/td>\n<td width=\"55\">CAMISA<\/td>\n<td width=\"58\">2<\/td>\n<td width=\"53\">50<\/td>\n<td width=\"55\">100<\/td>\n<\/tr>\n<tr>\n<td width=\"55\">01<\/td>\n<td width=\"55\">100<\/td>\n<td width=\"52\">02<\/td>\n<td width=\"55\">ZAPATOS<\/td>\n<td width=\"58\">3<\/td>\n<td width=\"53\">80<\/td>\n<td width=\"55\">240<\/td>\n<\/tr>\n<tr>\n<td width=\"55\">01<\/td>\n<td width=\"55\">100<\/td>\n<td width=\"52\">05<\/td>\n<td width=\"55\">MESA<\/td>\n<td width=\"58\">1<\/td>\n<td width=\"53\">100<\/td>\n<td width=\"55\">100<\/td>\n<\/tr>\n<tr>\n<td width=\"55\">01<\/td>\n<td width=\"55\">101<\/td>\n<td width=\"52\">09<\/td>\n<td width=\"55\">TINTA<\/td>\n<td width=\"58\">4<\/td>\n<td width=\"53\">25<\/td>\n<td width=\"55\">100<\/td>\n<\/tr>\n<tr>\n<td width=\"55\">02<\/td>\n<td width=\"55\">100<\/td>\n<td width=\"52\">13<\/td>\n<td width=\"55\">CUADRO<\/td>\n<td width=\"58\">5<\/td>\n<td width=\"53\">90<\/td>\n<td width=\"55\">450<\/td>\n<\/tr>\n<tr>\n<td width=\"55\">02<\/td>\n<td width=\"55\">100<\/td>\n<td width=\"52\">05<\/td>\n<td width=\"55\">MESA<\/td>\n<td width=\"58\">1<\/td>\n<td width=\"53\">100<\/td>\n<td width=\"55\">100<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>Establecemos los tres primeros atributos como clave primaria para esta tabla. Y por \u00faltimo establecemos los dos primeros atributos como<strong> clave for\u00e1nea<\/strong>.<\/p>\n<table>\n<tbody>\n<tr>\n<th colspan=\"3\" width=\"162\">PK<\/th>\n<\/tr>\n<tr>\n<th width=\"55\">Sucursal<\/th>\n<th width=\"55\">N\u00famero de factura<\/th>\n<th width=\"52\">C\u00f3digo de art\u00edculo<\/th>\n<th width=\"55\">Nombre de art\u00edculo<\/th>\n<th width=\"58\">Cantidad del art\u00edculo<\/th>\n<th width=\"53\">Precio unitario del art\u00edculo<\/th>\n<th width=\"55\">Subtotal del art\u00edculo<\/th>\n<\/tr>\n<tr>\n<td width=\"55\">01<\/td>\n<td width=\"55\">100<\/td>\n<td width=\"52\">01<\/td>\n<td width=\"55\">CAMISA<\/td>\n<td width=\"58\">2<\/td>\n<td width=\"53\">50<\/td>\n<td width=\"55\">100<\/td>\n<\/tr>\n<tr>\n<td width=\"55\">01<\/td>\n<td width=\"55\">100<\/td>\n<td width=\"52\">02<\/td>\n<td width=\"55\">ZAPATOS<\/td>\n<td width=\"58\">3<\/td>\n<td width=\"53\">80<\/td>\n<td width=\"55\">240<\/td>\n<\/tr>\n<tr>\n<td width=\"55\">01<\/td>\n<td width=\"55\">100<\/td>\n<td width=\"52\">05<\/td>\n<td width=\"55\">MESA<\/td>\n<td width=\"58\">1<\/td>\n<td width=\"53\">100<\/td>\n<td width=\"55\">100<\/td>\n<\/tr>\n<tr>\n<td width=\"55\">01<\/td>\n<td width=\"55\">101<\/td>\n<td width=\"52\">09<\/td>\n<td width=\"55\">TINTA<\/td>\n<td width=\"58\">4<\/td>\n<td width=\"53\">25<\/td>\n<td width=\"55\">100<\/td>\n<\/tr>\n<tr>\n<td width=\"55\">02<\/td>\n<td width=\"55\">100<\/td>\n<td width=\"52\">13<\/td>\n<td width=\"55\">CUADRO<\/td>\n<td width=\"58\">5<\/td>\n<td width=\"53\">90<\/td>\n<td width=\"55\">450<\/td>\n<\/tr>\n<tr>\n<td width=\"55\">02<\/td>\n<td width=\"55\">100<\/td>\n<td width=\"52\">05<\/td>\n<td width=\"55\">MESA<\/td>\n<td width=\"58\">1<\/td>\n<td width=\"53\">100<\/td>\n<td width=\"55\">100<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\" width=\"110\">Fk<\/td>\n<td width=\"52\"><\/td>\n<td width=\"55\"><\/td>\n<td width=\"58\"><\/td>\n<td width=\"53\"><\/td>\n<td width=\"55\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p><strong>\u00bfUsar o no usar datos at\u00f3micos?<\/strong><\/p>\n<p>Un caso com\u00fan de violaci\u00f3n a la 1FN es cuando una empresa asigna un n\u00famero de control a sus empleados utilizando una combinaci\u00f3n de claves, por ejemplo, el c\u00f3digo de departamento con el c\u00f3digo de empleado. Estos n\u00fameros pueden dividirse en unidades menores, por lo que una relaci\u00f3n que los usara <strong>no se encuentra en 1FN<\/strong>. (Adem\u00e1s, utilizar esos n\u00fameros como clave primaria ocasionar\u00eda problemas, por ejemplo cuando un empleado cambiara de departamento).<\/p>\n<p>Otro ejemplo ser\u00eda cuando\u00a0 un atributo llamado \u201cDirecci\u00f3n\u201d guarda los datos de calle y ciudad, ambos datos se considerar\u00edan como uno solo, y no se podr\u00edan hacer b\u00fasquedas por calle o por ciudad. Sin embargo, si en alg\u00fan caso no se requiriera el uso de datos independientes, <strong>tendr\u00eda sentido utilizar datos no at\u00f3micos para evitar una carga innecesaria al programador<\/strong> cuando \u00e9ste tuviese que convertir los datos separados a datos at\u00f3micos.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Referencias<\/strong><\/p>\n<ol>\n<li>De Miguel et al (2001). <strong>Dise\u00f1o de Bases de Datos<\/strong>. Alfaomega, M\u00e9xico.<\/li>\n<li>Silberschatz A., Korth H. y Sudarshan S. (2006). <strong>Fundamentos de bases de datos<\/strong>. Quinta edici\u00f3n. McGraw Hill. Madrid.<\/li>\n<li>Reynosa E., Maldonado C., Mu\u00f1oz R., Damiano L., Abrutsky M. (2012). <strong>Bases de datos<\/strong>. Ed. Alfaomega.<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Una relaci\u00f3n se encuentra en Primera Forma Normal (1FN) cuando cada atributo solo toma un valor del dominio simple subyacente. En 1FN no existen grupos repetitivos (De Miguel et al, 2001). \u00a0En el siguiente ejemplo la tabla no se encuentra en 1FN.<\/p>\n","protected":false},"author":1,"featured_media":156,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"amp_status":"","footnotes":""},"categories":[49],"tags":[71,72,70],"class_list":["post-148","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-bases-de-datos","tag-1fn","tag-base-de-datos","tag-normalizacion"],"_links":{"self":[{"href":"https:\/\/naps.com.mx\/blog\/wp-json\/wp\/v2\/posts\/148","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/naps.com.mx\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/naps.com.mx\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/naps.com.mx\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/naps.com.mx\/blog\/wp-json\/wp\/v2\/comments?post=148"}],"version-history":[{"count":13,"href":"https:\/\/naps.com.mx\/blog\/wp-json\/wp\/v2\/posts\/148\/revisions"}],"predecessor-version":[{"id":163,"href":"https:\/\/naps.com.mx\/blog\/wp-json\/wp\/v2\/posts\/148\/revisions\/163"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/naps.com.mx\/blog\/wp-json\/wp\/v2\/media\/156"}],"wp:attachment":[{"href":"https:\/\/naps.com.mx\/blog\/wp-json\/wp\/v2\/media?parent=148"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/naps.com.mx\/blog\/wp-json\/wp\/v2\/categories?post=148"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/naps.com.mx\/blog\/wp-json\/wp\/v2\/tags?post=148"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}