Está en la página 1de 11

UNIVERSIDAD

VIRTUAL D E L E S TA D O
DE
GUANAJUATO
NOMBRE: Jorge Vásqu
ez A g u i l a r MATRICULA:
22006310
M O D U L O : F U N D A M E N TO S DE
B A S E DE
D ATO S
P R O F E S O R : C l au d i a
Pa t r i c i a FECHA DE
E L A B O R A C IÓ N :
RETO 5 : N O R M A L I Z A C I Ó N DE MI B A S
E D E D ATO S
REDACCIÓN DEL PROBLEMA
Se desea diseñar una base de datos para una la tienda de ropa Modarte S.A. de C.V. para realizar
correctamente el control de inventario y gestión de las ventas. Esta comercializadora cuenta con
diversos productos para dama, caballero, niño y niña; por lo que se necesita llevar puntualmente
información sobre los Productos, Empleados, Clientes y Ventas.
• Los productos pueden ser vendidos por muchos Empleados y son comprados por muchos
Clientes; para Producto se requiere información como código de producto, nombre de producto,
tipo, talla, fecha de compra, fecha de venta y cantidad en existencia.
• Los Empleados pueden realizar muchas ventas, estas ventas pueden tener muchos Productos; para
Empleado se necesita información como ID de empleado, nombre del empleado, dirección, teléfono y
CURP.
• Un Cliente puede realizar muchas ventas, para el cliente es necesaria información como número
de cliente, nombre del cliente, dirección, e-mail, forma de pago y RFC para facturación.
• Una Venta puede tener muchos productos, un producto puede aparecer en muchas ventas, a su
vez,
un empleado puede realizar muchas ventas, al mismo tiempo que un cliente puede participar en
muchas ventas. Para las ventas se debe considerar la siguiente información: código de venta, fecha de
DEFINICIÓN DE
TA B L A S
Productos
CodProd Numero único de 5 dígitos, identifica el producto
NomProd Texto con la descripción del producto
Tipo Texto indicando el tipo
Talla Carácter indicando la talla del producto
FechaComp Fecha en que se compro el producto
FechaVent Fecha en que el producto se vendió al cliente
CantExist Numero indicando cantidad de unidades en almacén
DEFINICIÓN DE
TA B L A S
Empleados
IdEmp Numero único de 5 dígitos, identifica el empleado
Nom Emp Texto formado por nombre y apellido
Dirección Texto formado por calle, numero, colonia, municipio y
estado del empleado.
Teléfono Numero indicando numero telefónico del empleado
Curp Texto formado con clave única de registro de población
del empleado.
DEFINICIÓN DE
TA B L A S
Cliente
NumCliente Numero único de 5 dígitos, identifica al cliente
Nomcliente Texto formado por nombre y apellidos
Dirección Texto formado por calle, numero, colonia, municipio y
estado del cliente
E-mail Texto indicando el email del cliente
FormaPago Texto señalando la forma de pago del cliente
RFC Texto con registro Federal del contribuyentes del
cliente
DEFINICIÓN DE
TA B L A S
Ventas
CodVenta Numero único de 5 dígitos, identifica el cliente
FechVenta Fecha en que el producto se vendió al cliente
FormPago Texto señalando la forma de pago del cliente
TotalPagar Texto señalando el total a pagar del cliente
MODELO ENTIDAD RELACIÓN
FechVenta CodVenta

Ventas
N:M 1:
Formpago
N
Totalpagar
Tien
e Realizan
1:
N
Cantexist Telefono Dirección
NomProd CodProd Participa
Em
Productos pleado
FechVent
a
Tall NomEmp
a leado CURP
FechCom ID_Emplea
p
Tipo NumClient
Form Pago do
e

RFC Clientes
E-m ail

Dirección NomClient
e
Empleado Cliente
Id_Empleado Int Pk 1: 1: NumCliente Int Pk

Direccion
M ODEL O RELACION AL
Nom Empleado Varchar(30)
Varchar(30)
Not Null
Not Null
N N NomCliente
Direccion
Varchar(30)
Varchar(30)
Not Null
Not Null
Telefono Varchar(15) Not Null FormPago Varchar(15) Not Null
CURP Varchar(15) Not Null RFC Varchar(15) Not Null
E-mail Varchar(20) Not Null
Venta
1: CodVent Int Pk
N FechVent Date Not Null
FormPago Varchar(15) Not Null
TotalPagar Double Not Null Venta
IdEmpleado Int FK CodProd Int Pk
IdCliente Int FK NomProd Varchar(30) Not Null
Tipo Varchar(15) Not Null
Producto_Venta FechVent Date Not Null
CodVent Int FK FechComp Date Not Null
CodProd Int FK 1: CantExist Int Not Null
N
PRIMERA FORMA NORMAL Cliente
NumCliente
Int PK
Empleado
1:
NomCliente Varchar(30) Not Null
ID_Empleado
Int PK 1:
N Direccion Varchar(30) Not Null
N
NomEmpleado Varchar(30) Not Null Varchar(30)
ApellidoPat
Not Null
ApellidoPat Varchar(30) Not Null Varchar(30)
ApellidoMat
Not Null
ApellidoMat Varchar(30) Not Null Calle Varchar(30) Not Null
Calle Varchar(30) Not Null
Venta Numero Varchar(30) Not Null
Numero Varchar(30) Not Null CodVent Int PK Colonia Varchar(30) Not Null
Colonia Varchar(30) Not Null FechVent Date Not Ciudad Varchar(30) Not Null
Ciudad Varchar(30) Not Null Null RFC Varchar(15) Not Null
Telefono Varchar(15) Not Null FormPago Varchar(15)
Not E-mail Varchar(20) Not Null
CURP Varchar(15) Not Null Null
TotalPagar Double Productos
Not
1: Null CodProd Int PK
N IdEmpleado Int FK NomProd Varchar(30 Not Null
)
P rod ucto IdCliente Int FK
Tipo Varchar(15 Not Null
_Ven ta 1: )
CodVent In FK N FechVent Date Not Null
t FechComp Date Not Null
CodProd In FK
Cliente
SEGUNDA FORMA NORMAL NumCliente
Int PK
Empleado
1:
NomCliente Varchar(30) Not Null
ID_Empleado
Int PK 1:
Varchar(30) N N
Direccion Varchar(30) Not Null
NomEmpleado
Not Null
ApellidoPat Varchar(30) Not Null
ApellidoPat Varchar(30) Not Null
ApellidoMat Varchar(30) Not Null
ApellidoMat Varchar(30) Not Null
Calle Varchar(30) Not Null
Calle Varchar(30) Not Null
Venta Numero Varchar(30) Not Null
Numero Varchar(30) Not Null
CodVent Int PK Colonia Varchar(30) Not Null
Colonia Varchar(30) Not Null
FechVent Date Not Ciudad Varchar(30) Not Null
Ciudad Varchar(30) Not Null Null RFC Varchar(15) Not Null
Telefono Varchar(15) Not Null FormPago Varchar(15)
Not
CURP Varchar(15)
E-mail Varchar(20) Not Null
Not Null Null
TotalPagar Double Productos
Not
1: Null CodProd Int PK
N
Producto_Ven IdEmpleado Int FK NomProd Varchar(30 Not Null
)
ta FK
IdCliente Int Varchar(15
CodVent In FK Tipo Not Null
1: )
t N FechVent Date Not Null
FK FechComp Date Not Null
CodProd In FK
Cliente
TERCERA FORMA NOR NumCliente
Int PK
Em p lead MAL Prod ucto _Ve
o n
NomCliente Varchar(30) Not Null
ID _Em
PK
pleado ta
CodVent In FK
Direccion Varchar(30) Not Null
NomEmpleado Int Not Null
Varchar(30) t ApellidoPat Varchar(30) Not Null
ApellidoPat
Not Null
Varchar(30) FK ApellidoMat Varchar(30) Not Null
ApellidoMat
Not Null
Varchar(30) 1: CodProd In FK 1: Calle Varchar(30) Not Null
Calle Varchar(30) Not Null N t N Numero Varchar(30) Not Null
Numero Varchar(30) Not Null FK
Venta Colonia Varchar(30) Not Null
Colonia Varchar(30) Not Null
Ciudad Varchar(30) Not Null
CodVent Int PK
Ciudad Varchar(30) Not Null
RFC Varchar(15) Not Null
FechVent D ate Not
Telefono Varchar(15) Not Null
Null E-mail Varchar(20) Not Null
CURP Varchar(15) Not Null FormPago Varchar(15)
Not
Null
TotalPagar D ouble Not P rod
Producto_Ven Null CodProd uctos PK
ta NomProd Varchar(30)
Int Not Null
CodVent 1: IdEmpleado Int FK
In FK Tipo Varchar(15) Not Null
N IdCliente Int FK
t FechVent Date Not Null

FK 1: FechComp Date Not Null

CodProd In FK N CantExist Int Not Null

También podría gustarte