Documentos de Académico
Documentos de Profesional
Documentos de Cultura
BD - 05 Diseño de Base de Datos Relacional
BD - 05 Diseño de Base de Datos Relacional
Base de datos
Elmasri, R., & Navathe, S. (2011). Fundamentals of database systems (6th ed., p. 201).
Boston: Addison-Wesley.
Modelos
Un modelo es
Una
Puesto
Cdigo departamento
Cdigo puesto
Nombre departamento
Ubicacin departamento
Descripcin puesto
Empleado
Cdigo empleado
Competencia
Cdigo competencia
Descripcin competencia
Nombre empleado
email empleado
Cdigo departamento
Cdigo puesto
Tipo relacin
Tipo relacin
Dependiente
Cdigo empleado
Nombre
Tipo relacin
Notacin: Entidad
Asociado
DNI
Nombres
Apellido paterno
Apellido materno
Direccin
email
Telfono
Gnero
Fecha nacimiento
Notacin: Relaciones
Normalizacin
Dependencia funcional
Reglas o restricciones que se debe
cumplir
Son el objetivo
Para un determinante, la funcin devuelve
un dependiente
Claves determinan funcionalmente los
atributos no clave
Anomalas
Son los sntomas de un problema
Insercin
Actualizacin
Eliminacin
Redundancia
Es la causa
Normalizacin
Es la solucin
Descomponer una relacin en otras
Mantener la informacin acerca de una cosa
en un solo lugar
Inconsistencia=violacin / infraccin de
integridad
Ejemplos
Direccin:
Ejemplos
Claves
Casos
diferentes
Ejemplo:
Todos los atributos en una sola relacin
Redundancia, cantidad de tuplas
Actualizacin -> inconsistencia
Dependencias funcionales
4NF
4NF
4NF
As we will see later, if there are no functional dependencies, then the relation is
automatically in Boyce-Codd Normal Form, but it's not in and fourth normal form.
So fourth normal form is associated with what are called multi-value dependencies.
When we specify a multi-value dependency as we've done here with the double arrow,
what this is saying is that if we take a particular social security number in the relation, we
will have every combination of college names that are associated with that social security
number with every high school that's associated with that social security number.
We'll actually see that when we have this multi-value dependency, we automatically have
this one, too.
I know it seems a bit complicated, and we will formalize it completely, but for now now just
think about the English statement that multi-valued dependency is saying that we are going
to have every combination of those two attributes and values in those attributes for a given
social security number.
In other words, those values are really independent of each other.
So if we have that situation, then what we should really do is store each college name and
each high school for each social security number one time, and that's what fourth normal
form will do for us.
4NF
Fourth normal form, similarly to Boyce-Codd normal form, says if we have a dependency,
then the left hand side must be a key.
In this case, it's a multi-value dependency we're looking at, so it's really saying something
different but the basic idea is the same which is that we want only one tuple that has each
value that's appears on the left hand side of a multi-value dependency.
So let's see what would happen, in this example, if we use our multi-value dependencies to
decompose the relation, based on the idea of fourth Normal Form.
Well it is the intuitive thing that happens.
We separate the information about the college names that a student applies to from the
information about the high schools themselves, and then we'll see that that we only store
each fact once and we do get the behavior of having C plus H tuples instead of having C
times H tuples.
Like with functional dependencies and Boyce-Codd Normal Form we'll be completely
formalizing all of this reasoning and the definitions in later videos.
A -> B, no significa que B -> A
Dependencias triviales y no triviales
Sirve para
Crear tablas y otros objetos
ALTER
DROP
Estrategias:
Proceso
previo a la construccin
Disear mientras se construye
Diseo en desarrollo de
software