Está en la página 1de 27

2013

[Base de Datos CAPT2013]

Grupo N2 Telecomunicaciones 18/05/2013

Para Nuestra Docente Ing. Yessica Puchuri Manco Por La gran Labor Que

Desempea, A pesar de Los Imprevistos y Ocurrencias

que se Suscitan en clase.

INDICE

I.- BREVE DESCRIPCION DE LA EMPRESA Y LA BASE DE DATOS..Pag. 3 I.1.Historia del Nombre de La Empresa o Base de Datos: Pag. 3 II.- DIAGRAMA DE LA BASE DE DATOS CAPT2013 .. Pag. 4 III.- TRANSACT SQL USADO PARA LA CREACION DE LA BASE DE DATOSPag 5 -- SECCION A - CREANDO LA BASE DE DATOS CAPT2013 Pag 5 I-- SECCION B - CREANDO ESQUEMAS. Pag.5 -- SECCION C - CREANDO TABLAS, RESTRICCIONES Y RELACIONES

B - CREANDO ESQUEMAS -- SECCION C - CREANDO TABLAS,RESTRICCIONES Y RELACIONES


1. Creando La Tabla: ' Amortizacion.Pago ' Pag. 6 2. Creando La Tabla: ' Amortizacion.saldo ' Pag. 6 3. Creando La Tabla: ' Amortizacion.Deuda ' Pag. 6 4. Creando La Tabla: ' Produccion.productcateg ' Pag. 6 5. Creando La Tabla: ' Empleados.EmplDescrip Pag. 6 6. Creando La Tabla: ' Empleados.EmplCateg Pag. 6 7. Creando La Tabla: ' Clientes.CategoriaCliente Pag. 7 8. Creando La Tabla: ' Almacenes.Almacen ' Pag. 7 9. Creando La Tabla: ' Compras.DetalleCompra ' Pag. 7 10. Creando La Tabla: ' Transportes.TransportCategoria ' Pag. 7 11. Creando La Tabla: ' Transportes.TransportEnvio ' Pag. 7 12. Creando La Tabla: 'Transportes.TransportDettalleEnvio ' Pag. 7 13. Creando La Tabla: ' Clientes.Cliente ' Pag. 8 14. Creando La Tabla: ' Ventas.Distribuidor ' Pag. 8 15. Creando La Tabla: ' Empleados.empleado ' Pag. 8 16. Creando La Tabla: ' Proveedores.proveedor ' Pag.9. 17. Creando La Tabla: ' Produccion.producto '.. Pag.9. 18. Creando La Tabla: ' Ventas.Pedido '.. Pag. 9 19. Creando La Tabla: ' Documentos.guia ' Pag.9. 20. Creando La Tabla: ' Documentos.factura ' Pag.10 21. Creando La Tabla: ' Ventas.DetallePedido ' Pag.10 22. Creando La Tabla: ' Compras.Compra ' Pag.10 -- SECCION D INSERTANDO DATOS A LA BASE DE DATOSBASE. DE DATOS

BASE DE DATOS CAPT2013

I.

BREVE DESCRIPCION DE LA EMPRESA Y BD

CAPT Es Una Empresa Dedicada a Adquisicin de la compra, Venta y Transporte de Mltiples Productos desde Maquinarias Pesadas, artefactos y productos Tecnolgicos hasta Materias Primas a Gran Escala.

Adems se Desarrolla en El mbito Local, Nacional e Internacional, Contando con con Proveedores y Distribuidores a Nivel Global.

I.1 Historia del Nombre de La Empresa o Base de Datos:


El Nombre de La Base de Datos CAPT2013 Nace de La Combinacin de Las Iniciales de Los Apellidos de Los Integrantes del Grupo del Curso de Implementacin de Base de Datos de La Facultad de Ingeniera de Sistemas, Universidad Nacional San Luis Gonzaga.

ALUMNOS:

[ C ]USI ALVARADO JULIO CESAR [ A ]CEVEDO TORNERO ALDAIR [ P ]AUCCA INCA ERINCK [ T ]ASAYCO MUNAYCO LUIS

II.

DIAGRAMA DE LA BASE DE DATOS CAPT2013

III.

TRANSACT SQL USADO PARA LA CREACION DE LA BASE DE DATOS


---------------------------------------------------------------------

-- SECCION A - CREANDO LA BASE DE DATOS CAPT2013


---------------------------------------------------------------------

-- 1. Conectarse a la instancia de SQL Server en las instalaciones, la base de datos master -- 2. Ejecute el cdigo siguiente para crear una base de datos vaca llamada TSQL2012
USE master;

-- Si La Base de Datos Ya Existe Eliminar


IF DB_ID('CAPT2013') IS NOT NULL DROP DATABASE CAPT2013;

-- Si la base de datos no puede ser creado debido a las conexiones abiertas, abortar
IF @@ERROR = 3702 RAISERROR('Database cannot be dropped because there are still open connections.', 127, 127) WITH NOWAIT, LOG;

-- Creando La Base de Datos


CREATE DATABASE CAPT2013; GO USE CAPT2013; GO

---------------------------------------------------------------------

-- SECCION B - CREANDO ESQUEMAS


--------------------------------------------------------------------CREATE SCHEMA Ventas AUTHORIZATION dbo; GO CREATE SCHEMA Transportes AUTHORIZATION dbo; GO CREATE SCHEMA Proveedores AUTHORIZATION dbo; GO CREATE SCHEMA Produccion AUTHORIZATION dbo; GO CREATE SCHEMA Empleados AUTHORIZATION dbo; GO CREATE SCHEMA Documentos AUTHORIZATION dbo; GO CREATE SCHEMA Compras AUTHORIZATION dbo; GO CREATE SCHEMA Clientes AUTHORIZATION dbo; GO CREATE SCHEMA Amortizacion AUTHORIZATION dbo; GO CREATE SCHEMA Almacenes AUTHORIZATION dbo; GO

---------------------------------------------------------------------

-- SECCION C - CREANDO TABLAS,RESTRICCIONES Y RELACIONES


---------------------------------------------------------------------

-- Creando La Tabla: ' Amortizacion.Pago '


CREATE TABLE Amortizacion.Pago ( IdPago int IDENTITY(1,1) NOT NULL, CantPago money NOT NULL, NumCuentaPago char(16) NOT NULL, CONSTRAINT PK_Pago PRIMARY KEY(IdPago), );

-- Creando La Tabla: ' Amortizacion.saldo '


CREATE TABLE Amortizacion.Saldo ( IdSaldo int IDENTITY(1,1) NOT NULL, SubtotalSaldo money NOT NULL, TotalSaldo money NOT NULL, CONSTRAINT PK_Saldo PRIMARY KEY(IdSaldo), )

-- Creando La Tabla: '

Amortizacion.Deuda '

CREATE TABLE Amortizacion.deuda ( IdDeuda int IDENTITY(1,1) NOT NULL, CantDeuda money NOT NULL, TazaDeuda decimal(2, 2) NOT NULL, CONSTRAINT PK_Deuda PRIMARY KEY(IdDeuda), )

-- Creando La Tabla: '

Produccion.productcateg '

CREATE TABLE Produccion.Productcateg ( IdCategProducto int IDENTITY(1,1) NOT NULL, NombreCategoria varchar(20) NOT NULL, Descripcion varchar(20) NOT NULL, CONSTRAINT PK_Productcateg PRIMARY KEY(IdCategProducto), )

-- Creando La Tabla: ' Empleados.EmplDescrip


CREATE TABLE Empleados.EmplDescrip ( IdDescripEmpl int IDENTITY(1,1) NOT NULL, AoContratacEmpl date NOT NULL, TiempContracEmpl date NOT NULL, SueldEmpl money NOT NULL, AreaLaboralEmpl varchar(10) NULL, CONSTRAINT PK_EmplDescrip PRIMARY KEY(IdDescripEmpl), )

-- Creando La Tabla: ' Empleados.EmplCateg


CREATE TABLE Empleados.EmplCateg ( IdCategoriaEmpl int IDENTITY(1,1) NOT NULL, NombCatgEmpl varchar(20) NOT NULL, descripcionEmpl varchar(20) NOT NULL, CONSTRAINT PK_EmplCateg PRIMARY KEY(IdCategoriaEmpl), )

-- Creando La Tabla: ' Clientes.CategoriaCliente


CREATE TABLE Clientes.CategoriaCliente ( IdCategCliente int IDENTITY(1,1) NOT NULL, NombreCategCliente nvarchar(40) NOT NULL, Descripcion nvarchar(30) NOT NULL, CONSTRAINT PK_CategoriaCliente PRIMARY KEY(IdCategCliente), )

-- Creando La Tabla: ' Almacenes.Almacen '


CREATE TABLE Almacenes.Almacen ( IdAlmacen int IDENTITY(1,1) NOT NULL, NombreAlmacen varchar(50) NOT NULL, TotalProductoAlmacen int NOT NULL, AreaAlmacen nchar(40) NOT NULL, CONSTRAINT PK_Almacen PRIMARY KEY(IdAlmacen), )

-- Creando La Tabla: ' Compras.DetalleCompra '


CREATE TABLE Compras.DetalleCompra ( IdCategCompr int IDENTITY(1,1) NOT NULL, NombreCategoria varchar(50) NULL, FechaCompr date NOT NULL, CONSTRAINT PK_DetalleCompra PRIMARY KEY(IdCategCompr), )

-- Creando La Tabla: '

Transportes.TransportCategoria '

CREATE TABLE Transportes.TransportCategoria ( IdCateg int IDENTITY(1,1) NOT NULL, NombreCateg varchar(40) NOT NULL, DescripCateg varchar(50) NOT NULL, CONSTRAINT PK_TransportCategoria PRIMARY KEY(IdCateg), )

-- Creando La Tabla: ' Transportes.TransportEnvio '


CREATE TABLE Transportes.TransportEnvio ( IdTransp int IDENTITY(1,1) NOT NULL, NombEmpTransp varchar(50) NOT NULL, FechaSalidaTransp date NOT NULL, FechaLlegadaTransp date NULL, CONSTRAINT PK_TransportEnvio PRIMARY KEY(IdTransp), )

-- Creando La Tabla: ' Transportes.TransportDettalleEnvio '


CREATE TABLE Transportes.TransportDettalleEnvio ( IdDetalleTransp int IDENTITY(1,1) NOT NULL, DescripcionTransp varchar(10) NOT NULL, IdCateg int NOT NULL, IdTransp int NOT NULL, CONSTRAINT PK_TransportDettalleEnvio PRIMARY KEY(IdDetalleTransp), CONSTRAINT FK_TransportDettalleEnvio2 FOREIGN KEY(IdCateg)REFERENCES Transportes.TransportCategoria(IdCateg), CONSTRAINT FK_TransportDettalleEnvio3 FOREIGN KEY(IdTransp)REFERENCES Transportes.TransportEnvio(IdTransp), );

-- Creando La Tabla: ' Clientes.Cliente '


CREATE TABLE Clientes.Cliente ( IdCliente int IDENTITY(1,1) NOT NULL, NombreCliente varchar(40) NOT NULL, apel_paterno varchar(40) NOT NULL, apel_materno varchar(40) NOT NULL, NombreCompaia nchar(50) NOT NULL, Ciudad varchar(50) NOT NULL, Region varchar(50) NOT NULL, CodigoPostal varchar(40) NOT NULL, Pais varchar(40) NOT NULL, Telefono nchar(8) NOT NULL, Fax nchar(15) NOT NULL, IdCategCliente int NOT NULL, IdPago int NOT NULL, IdDeuda int NOT NULL, IdSaldo int NOT NULL, CONSTRAINT PK_Cliente PRIMARY KEY(IdCliente), CONSTRAINT FK_Cliente2 FOREIGN KEY(IdCategCliente)REFERENCES Clientes.CategoriaCliente(IdCategCliente), CONSTRAINT FK_Cliente3 FOREIGN KEY(IdPago)REFERENCES Amortizacion.pago(IdPago), CONSTRAINT FK_Cliente4 FOREIGN KEY(IdDeuda)REFERENCES Amortizacion.deuda(IdDeuda), CONSTRAINT FK_Cliente5 FOREIGN KEY(IdSaldo)REFERENCES Amortizacion.saldo(IdSaldo), )

-- Creando La Tabla: ' Ventas.Distribuidor '


CREATE TABLE Ventas.Distribuidor ( IdDistribuidor int IDENTITY(1,1) NOT NULL, NombCompDistribuidor varchar(20) NOT NULL, TelefDistribuidor nvarchar(8) NOT NULL, IdTransp int NOT NULL, CONSTRAINT PK_Distribuidor PRIMARY KEY(IdDistribuidor), CONSTRAINT FK_Distribuidor2 FOREIGN KEY(IdTransp)REFERENCES Transportes.TransportEnvio(IdTransp), )

-- Creando La Tabla: ' Empleados.empleado '


CREATE TABLE Empleados.empleado ( IdEmpl int IDENTITY(1,1) NOT NULL, nombre varchar(20) NOT NULL, Apellido varchar(40) NOT NULL, Titulo varchar(40) NOT NULL, Titulo_Cortesia varchar(40) NOT NULL, FechaNacimiento date NOT NULL, FechadeContrato date NOT NULL, Direccion varchar(50) NOT NULL, Ciudad varchar(20) NOT NULL, Region varchar(40) NOT NULL, CodigoPostal varchar(40) NOT NULL, Pais varchar(40) NOT NULL, Telefono char(8) NOT NULL, IdDescripEmpl int NOT NULL, IdCategoriaEmpl int NOT NULL, CONSTRAINT PK_Empleado PRIMARY KEY(IdEmpl), CONSTRAINT FK_Empleado2 FOREIGN KEY(IdDescripEmpl)REFERENCES Empleados.EmplDescrip(IdDescripEmpl), CONSTRAINT FK_Empleado3 FOREIGN KEY(IdCategoriaEmpl)REFERENCES Empleados.EmplCateg(IdCategoriaEmpl), )

-- Creando La Tabla: ' Proveedores.proveedor '


CREATE TABLE Proveedores.proveedor ( IdProveedor int IDENTITY(1,1) NOT NULL, Nombre varchar(20) NOT NULL, Apellido varchar(40) NOT NULL, Compaa varchar(40) NOT NULL, DireccionProveedor varchar(40) NOT NULL, CiudadProveedor varchar(40) NOT NULL, tipoproveedor varchar(20) NOT NULL, CONSTRAINT PK_proveedor PRIMARY KEY(IdProveedor), )

-- Creando La Tabla: ' Produccion.producto '


CREATE TABLE Produccion.producto ( IdProducto int IDENTITY(1,1) NOT NULL, NombreProducto varchar(20) NOT NULL, PrecioUnitario money NOT NULL, IdProveedor int NOT NULL, IdCategProducto int NOT NULL, IdAlmacen int NOT NULL, CONSTRAINT PK_producto PRIMARY KEY(IdProducto), CONSTRAINT FK_producto2 FOREIGN KEY(IdProveedor)REFERENCES Proveedores.proveedor(IdProveedor), CONSTRAINT FK_producto3 FOREIGN KEY(IdCategProducto)REFERENCES Produccion.productcateg(IdCategProducto), CONSTRAINT FK_producto4 FOREIGN KEY(IdAlmacen)REFERENCES Almacenes.Almacen(IdAlmacen), )

-- Creando La Tabla: ' Ventas.Pedido '


CREATE TABLE Ventas.Pedido ( IdPedido int IDENTITY(1,1) NOT NULL, FechPedido date NOT NULL, FechRequerPedido date NOT NULL, FechaDistribPedido date NOT NULL, PesoPedido decimal(5, 2) NULL, DireccionDistrib nvarchar(60) NOT NULL, CiudadPedido nvarchar(50) NOT NULL, RegionPedido nvarchar(50) NOT NULL, CodPostalPedido nvarchar(15) NOT NULL, PaisPedido nvarchar(20) NULL, IdCliente int NOT NULL, IdEmpl int NOT NULL, IdProducto int NOT NULL, CONSTRAINT PK_Pedido PRIMARY KEY(IdPedido), CONSTRAINT FK_Pedido2 FOREIGN KEY(IdCliente)REFERENCES Clientes.Cliente(IdCliente), CONSTRAINT FK_Pedido3 FOREIGN KEY(IdEmpl)REFERENCES Empleados.empleado(IdEmpl), CONSTRAINT FK_Pedido4 FOREIGN KEY(IdProducto)REFERENCES Produccion.producto(IdProducto), )

-- Creando La Tabla: ' Documentos.guia '


CREATE TABLE Documentos.Guia ( idguia int IDENTITY(1,1) NOT NULL, fecha date NOT NULL, IdProducto int NOT NULL, CONSTRAINT PK_Guia PRIMARY KEY(idguia), CONSTRAINT FK_Guia2 FOREIGN KEY(IdProducto)REFERENCES Produccion.producto(IdProducto), )

10

-- Creando La Tabla: ' Documentos.factura '


CREATE TABLE Documentos.Factura ( idfactura int IDENTITY(1,1) NOT NULL, direccion varchar(50) NOT NULL, fecha date NOT NULL, precio_unitario decimal(3, 2) NOT NULL, subtotal decimal(3, 2) NOT NULL, igv decimal(2, 2) NOT NULL, totalpago decimal(3, 2) NOT NULL, IdCliente int NOT NULL, IdProducto int NOT NULL, CONSTRAINT PK_factura PRIMARY KEY(idfactura), CONSTRAINT FK_factura2 FOREIGN KEY(IdCliente)REFERENCES Clientes.Cliente(IdCliente), CONSTRAINT FK_factura3 FOREIGN KEY(IdProducto)REFERENCES Produccion.producto(IdProducto), )

-- Creando La Tabla: ' Ventas.DetallePedido '


CREATE TABLE Ventas.DetallePedido ( PrecioUnitario money NOT NULL, Cantidad int NOT NULL, Descuento decimal(2, 2) NOT NULL, IdPedido int IDENTITY(1,1) NOT NULL, IdDistribuidor int NOT NULL, CONSTRAINT FK_DetallePedido FOREIGN KEY(IdPedido)REFERENCES Ventas.Pedido(IdPedido), CONSTRAINT FK_DetallePedido2 FOREIGN KEY(IdDistribuidor)REFERENCES Ventas.Distribuidor(IdDistribuidor), )

-- Creando La Tabla: ' Compras.Compra '


CREATE TABLE Compras.Compra ( IdCompr int IDENTITY(1,1) NOT NULL, CostoCompr money NOT NULL, AreaCompr nvarchar(40) NOT NULL, IdProducto int NOT NULL, IdCategCompr int NOT NULL, IdProveedor int NOT NULL, IdEmpl int NOT NULL, CONSTRAINT PK_Compra PRIMARY KEY(IdCompr), CONSTRAINT FK_Compra2 FOREIGN KEY(IdProducto)REFERENCES Produccion.producto(IdProducto), CONSTRAINT FK_Compra3 FOREIGN KEY(IdCategCompr)REFERENCES Compras.DetalleCompra(IdCategCompr), CONSTRAINT FK_Compra4 FOREIGN KEY(IdProveedor)REFERENCES Proveedores.proveedor(IdProveedor), CONSTRAINT FK_Compra5 FOREIGN KEY(IdEmpl)REFERENCES Empleados.empleado(IdEmpl), )

11

---------------------------------------------------------------------

-- SECCION D INSERTANDO DATOS A LA BASE DE DATOS


---------------------------------------------------------------------

SELECT*FROM GO INSERT INTO INSERT INTO INSERT INTO INSERT INTO INSERT INTO INSERT INTO INSERT INTO INSERT INTO INSERT INTO INSERT INTO INSERT INTO INSERT INTO INSERT INTO INSERT INTO INSERT INTO INSERT INTO INSERT INTO INSERT INTO

Almacenes.Almacen Almacenes.Almacen Almacenes.Almacen Almacenes.Almacen Almacenes.Almacen Almacenes.Almacen Almacenes.Almacen Almacenes.Almacen Almacenes.Almacen Almacenes.Almacen Almacenes.Almacen Almacenes.Almacen Almacenes.Almacen Almacenes.Almacen Almacenes.Almacen Almacenes.Almacen Almacenes.Almacen Almacenes.Almacen Almacenes.Almacen values('AcevedoSA', 345, 'B') values('Aceros Arequipa', 222, 'A') values('TorneroSA', 335, 'C') values('Tiendas Brenda', 444, 'V') values('GuerraSA', 145, 'UN') values('Davides', 395, 'ZT') values('GuionZ', 333, 'GT') values('FuLham', 115, 'ZG') values('Hurtado.ER', 341, 'M') values('HuilaCV', 775, 'GB') values('Valdez', 365, 'JK') values('Kiosko', 332, 'PL') values('UlisesFG', 113, 'KT') values('NORAZ', 785, 'LG') values('JKHER', 111, 'JL') values('HIEL', 225, '1B') values('123KU', 165, 'KK') values('K.A.', 123, 'KA')

SELECT*FROM Amortizacion.deuda INSERT INSERT INSERT INSERT INSERT INSERT INSERT INSERT INSERT INSERT INSERT INSERT INSERT INSERT INSERT INSERT INSERT INSERT INTO INTO INTO INTO INTO INTO INTO INTO INTO INTO INTO INTO INTO INTO INTO INTO INTO INTO Amortizacion.deuda Amortizacion.deuda Amortizacion.deuda Amortizacion.deuda Amortizacion.deuda Amortizacion.deuda Amortizacion.deuda Amortizacion.deuda Amortizacion.deuda Amortizacion.deuda Amortizacion.deuda Amortizacion.deuda Amortizacion.deuda Amortizacion.deuda Amortizacion.deuda Amortizacion.deuda Amortizacion.deuda Amortizacion.deuda VALUES(653, 0.25) VALUES(600, 0.11) VALUES(644, 0.45) VALUES(789, 0.44) VALUES(888, 0.67) VALUES(999, 0.76) VALUES(956, 0.65) VALUES(56743, 0.89) VALUES(5646, 0.67) VALUES(23434, 0.99) VALUES(323, 0.56) VALUES(2131, 0.344) VALUES(3424, 0.443) VALUES(4321, 0.453) VALUES(34234, 0.43) VALUES(4532, 0.90) VALUES(1234, 0.32) VALUES(2345, 0.78)

12

SELECT*FROM Amortizacion.pago go INSERT INSERT INSERT INSERT INSERT INSERT INSERT INSERT INSERT INSERT INSERT INSERT INSERT INSERT INSERT INSERT INSERT INSERT INSERT INTO INTO INTO INTO INTO INTO INTO INTO INTO INTO INTO INTO INTO INTO INTO INTO INTO INTO INTO Amortizacion.pago Amortizacion.pago Amortizacion.pago Amortizacion.pago Amortizacion.pago Amortizacion.pago Amortizacion.pago Amortizacion.pago Amortizacion.pago Amortizacion.pago Amortizacion.pago Amortizacion.pago Amortizacion.pago Amortizacion.pago Amortizacion.pago Amortizacion.pago Amortizacion.pago Amortizacion.pago Amortizacion.pago values(1234, 'ABC') values(3456, '1123FGA') values(6766, '3343TF') values(3321, '1234TY') values(4543, '122343HG') values(3345, '1234GTG') values(112345, '12345BC') values(12432, '123221C') values(123432, '124532C') values(19999, '1234UU') values(453223, '556432YT') values(21345, '45432TDF') values(32345, '345678HG') values(765444, '453422FT') values(343224, '754445HY') values(4543233, '45432GFV') values(4543334, '123432HGB') values(1323424, '32433463GGF') values(564645, '345345GBN')

SELECT*FROM Amortizacion.saldo go Insert into Amortizacion.saldo values (12345, 45549646) Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert into into into into into into into into into into into into into into into into into into into Amortizacion.saldo Amortizacion.saldo Amortizacion.saldo Amortizacion.saldo Amortizacion.saldo Amortizacion.saldo Amortizacion.saldo Amortizacion.saldo Amortizacion.saldo Amortizacion.saldo Amortizacion.saldo Amortizacion.saldo Amortizacion.saldo Amortizacion.saldo Amortizacion.saldo Amortizacion.saldo Amortizacion.saldo Amortizacion.saldo Amortizacion.saldo values values values values values values values values values values values values values values values values values values values (45367, (23456, (12234, (32434, (46657, (54566, (67678, (65454, (45345, (43234, (43545, (32344, (24324, (23432, (32423, (55443, (46546, (54666, (45654, 45646467) 67657657) 56464657) 75675677) 98788656) 34543658) 45647676) 67756767) 65675787) 77776767) 56675677) 76756466) 43545656) 45466654) 45889677) 67565677) 88785767) 85549646) 89787879)

13

SELECT*FROM clientes.categoriacliente go Insert into clientes.categoriacliente 'MUYBUENA') Insert into clientes.categoriacliente 'BUENA') Insert into clientes.categoriacliente 'MALA') Insert into clientes.categoriacliente 'EXCELENTE') Insert into clientes.categoriacliente 'MALA') Insert into clientes.categoriacliente 'MUYMALA') Insert into clientes.categoriacliente 'BUENA') Insert into clientes.categoriacliente 'PSIMO') Insert into clientes.categoriacliente 'REGULAR') Insert into clientes.categoriacliente 'EXELENTE') Insert into clientes.categoriacliente 'MUYBUENA') Insert into clientes.categoriacliente Insert into clientes.categoriacliente 'MUYBUENA') Insert into clientes.categoriacliente 'EXELENTE') Insert into clientes.categoriacliente Insert into clientes.categoriacliente 'MUYBUENA') Insert into clientes.categoriacliente Insert into clientes.categoriacliente 'MUYMALA') Insert into clientes.categoriacliente 'BUENA') Insert into clientes.categoriacliente 'MUYBUENA') values ('Armando Hoyos', values ('Felipe Cevallos', values ('Guillermo Siguas', values ('Humberto Hurtado', values ('Fernando Escate', values ('Jose Jauregui', values ('Bernardo Bonilla', values ('Jose Guerrero', values ('Victoria Gallegos', values ('Kiara Mayoli', values ('Dante Mateo', values ('Luis Labarthe', 'MALA') values ('Carlos Izaguirre', values ('Umberto Morel', values ('Juvenal Serna', 'MALA') values ('Omar Lizarbe', values ('Diego Andia', 'BUENA') values ('Humberto Legua', values ('Roberto Rodriguez', values ('Paola Fuentes',

14

Select*from clientes.cliente go Insert into Clientes.cliente values ('Armando','Hoyos','Serrano', 'AcevedoSA', 'ICA', 'Ica', 90111,'Per',056455645, '1234CRT',1,1, 2,15, 1 ) Insert into Clientes.cliente values ('Felipe','Cevallos','Cabrera', 'Aceros Arequipa', 'Pisco', 'Ica', 90222,'Per',056432123, '1123FGA',2,2, 34,20, 2 ) Insert into Clientes.cliente values ('Guillermo','Siguas','Moreno', 'TorneroSA', 'Chincha', 'Ica', 90444,'Per',23423453, '3343TF',3,3, 45,21, 3 ) Insert into Clientes.cliente values ('Humberto','Hurtado','Gutierrez', 'Tiendas brenda', 'Nazca', 'Ica', 90321,'Per',056344345, '14533gth',4,4, 33,22, 4 ) Insert into Clientes.cliente values ('Fernando','Escate','Escalante', 'GuerraSA', 'Lima', 'Lima', 90567,'Per',056665544, '564433VFT',5,5, 56,23, 5 ) Insert into Clientes.cliente values ('Jose','Jauregui','Fernandez', 'Davides', 'Miraflores', 'Lima', 94349,'Per',056534564, '1234FTRC',6,6, 40,24, 6 ) Insert into Clientes.cliente values ('Bernardo','Bonilla','Farfan', 'GuionZ', 'Palpa', 'Ica', 90123,'Per',056223344, '1234TRE',7,7, 78,25, 7 ) Insert into Clientes.cliente values ('Jose','Guerrero','Jauregui', 'FuLham', 'Callao', 'Lima', 90654,'Per',056431212, '1234FRS',8,8,76,26, 8 ) Insert into Clientes.cliente values ('Victoria','Gallegos','Hurtado', 'Hurtado.SA', 'Huacho', 'Lima', 67890,'Per',12334234, '1232RAS',9,9, 45,27, 9 ) Insert into Clientes.cliente values ('Kiara','Mayoli','Moratta', 'HuilaCV', 'Cuzco', 'Cuzco', 87543,'Per',9873234, '432RFG',10,10, 56,28, 10 ) Insert into Clientes.cliente values ('Dante','Mateo','Moquillaza', 'Valdez', 'Cuzco', 'Cuzco', 12111,'Per',9845323, '1234GGG',11,11, 21,29, 11 ) Insert into Clientes.cliente values ('Luis','Labarthe','Mendoza', 'Kiosko', 'Lima', 'Lima', 90567,'Per',01234567, '1234FFF',12,12, 22,30, 12 ) Insert into Clientes.cliente values ('Carlos','Izaguirre','Loarra', 'UlisesFG', 'ICA', 'Ica', 90111,'Per',0566543, '1234WWW',13,13, 23,31, 13 ) Insert into Clientes.cliente values ('Umberto','Morel','Morales', 'NORAZ', 'ICA', 'Ica', 90111,'Per',05643433, '1234FDS',14,14,32,32, 14 ) Insert into Clientes.cliente values ('Juvenal','Serna','Dominguez', 'JKHER', 'chincha', 'Ica', 90444,'Per',056443322, '1234FXX',15,15, 55,33, 15 ) Insert into Clientes.cliente values ('Omar','Lizarbe','kukori', 'HIEL', 'ICA', 'Ica', 90111,'Per',056776655, '1237TYG',16,16, 62,34, 16 ) Insert into Clientes.cliente values ('Diego','Andia','Acevedo', '123KU', 'ICA', 'Ica', 90111,'Per',056898780, '1234AWQ',17,17, 72,35, 17 ) Insert into Clientes.cliente values ('Humberto','Legua','Vargas', 'K.A.', 'Chincha', 'Ica', 90444,'Per',056432111, '1234FGR',18,18, 82,36, 18 )

SELECT*from Compras.detallecompra

15

insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert insert

into into into into into into into into into into into into into into into into into into into into

Compras.detallecompra Compras.detallecompra Compras.detallecompra Compras.detallecompra Compras.detallecompra Compras.detallecompra Compras.detallecompra Compras.detallecompra Compras.detallecompra Compras.detallecompra Compras.detallecompra Compras.detallecompra Compras.detallecompra Compras.detallecompra Compras.detallecompra Compras.detallecompra Compras.detallecompra Compras.detallecompra Compras.detallecompra Compras.detallecompra

values values values values values values values values values values values values values values values values values values values values

('CATG', ('FERO', ('TUBE', ('FRER', ('FESA', ('CCCC', ('CACT', ('FERT', ('DATR', ('FERT', ('CARR', ('CATG', ('CATG', ('CATG', ('CATG', ('CRFT', ('CEWQ', ('QWER', ('QWER', ('CARY',

'2009/10/11') '2009/12/29') '2009/09/23') '2009/06/30') '2009/04/20') '2009/11/24') '2009/02/13') '2009/12/30') '2009/11/11') '2009/01/25') '2009/12/12') '2010/06/30') '2010/10/02') '2011/12/08') '2011/02/24') '2012/02/12') '2012/02/11') '2013/03/23') '2013/07/22') '2013/01/22')

insert into Compras.detallecompra values ('CVRE', '2013/01/30')

Select*from Empleados.EmplCateg Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert into into into into into into into into into into into into into into into into into into into into Empleados.EmplCateg Empleados.EmplCateg Empleados.EmplCateg Empleados.EmplCateg Empleados.EmplCateg Empleados.EmplCateg Empleados.EmplCateg Empleados.EmplCateg Empleados.EmplCateg Empleados.EmplCateg Empleados.EmplCateg Empleados.EmplCateg Empleados.EmplCateg Empleados.EmplCateg Empleados.EmplCateg Empleados.EmplCateg Empleados.EmplCateg Empleados.EmplCateg Empleados.EmplCateg Empleados.EmplCateg values('S.Ferrari','BUENEMPLEADO') values('A.gurora','MALEMPLEADO') values('A.Hurtad','MUYBUENOEMPLEADO') values('G.Jurior','MUYMALOEMPLEADO') values('G.Hertedo','REGULAREMPLEADO') values('G.Juliac','PESIMOEMPLEADO') values('G.Kiors','BUENEMPLEADO') values('L.Luiga','MUYBUENEMPLEADO') values('O.Orscar','BUENEMPLEADO') values('D.Gerra','MALEMPLEADO') values('H.Loperz','REGULAREMPLEADO') values('X.Fernas','PESIMOEMPLEADO') values('B.bernar','BUENEMPLEADO') values('G.Gernar','BUENEMPLEADO') values('V.Valen','BUENEMPLEADO') values('G.Loars','MALEMPLEADO') values('B.gerx','BUENEMPLEADO') values('S.Ferrari','BUENEMPLEADO') values('S.Fernand','PESIMOEMPLEADO') values('S.Juirer','MALEMPLEADO')

Insert into Empleados.EmplCateg values('F.aerte','BUENEMPLEADO')

16

SElect*from Empleados.EmplDescrip go

Insert into 9000, 'A') Insert into 5677, 'B') Insert into 5000, 'B') Insert into 6788, 'C') Insert into 7888, 'A') Insert into 4557, 'C') Insert into 9456, 'B') Insert into 8888, 'C') Insert into 5678, 'B') Insert into 5678, 'B') Insert into 6700, 'A') Insert into 8770, 'A') Insert into 8000, 'A') Insert into 8700, 'A') Insert into 6500, 'B') Insert into 7800, 'B') Insert into 7800, 'B')

Empleados.EmplDescrip values ('2013/07/22', '2014/07/22', Empleados.EmplDescrip values ('2013/02/12', '2015/02/12', Empleados.EmplDescrip values ('2013/01/11', '2014/01/11', Empleados.EmplDescrip values ('2013/03/13', '2016/03/22', Empleados.EmplDescrip values ('2013/07/22', '2014/07/22', Empleados.EmplDescrip values ('2013/02/23', '2015/02/23', Empleados.EmplDescrip values ('2013/02/23', '2014/02/23', Empleados.EmplDescrip values ('2013/01/21', '2014/01/21', Empleados.EmplDescrip values ('2013/01/23', '2014/01/23', Empleados.EmplDescrip values ('2013/03/23', '2014/03/23', Empleados.EmplDescrip values ('2013/09/12', '2016/09/12', Empleados.EmplDescrip values ('2013/01/21', '2014/01/21', Empleados.EmplDescrip values ('2013/04/26', '2014/04/26', Empleados.EmplDescrip values ('2013/02/23', '2014/02/23', Empleados.EmplDescrip values ('2013/01/21', '2014/01/21', Empleados.EmplDescrip values ('2013/01/11', '2016/01/11', Empleados.EmplDescrip values ('2013/07/21', '2016/07/21',

Insert into Empleados.EmplDescrip values ('2014/01/21', '2016/01/21', 6700, 'B')

SELECT*FROM Empleados.Empleado Insert into Empleados.Empleado values ('Fernando', 'Avalos', 'Gerente de ventas','Ms', '1990/06/18','2013/07/22', 'San pedro Mz B Lote 26','Pisco', 'Ica',90111,'Peru',056536016,1,1)

17

Insert into Empleados.Empleado values ('Armando', 'Gutierrez', 'Vicepresidente de ventas','Mg', '1990/09/20','2013/02/12', 'Av. Cutervo 345','Ica', 'Ica',90222,'Peru',98765433,2,2) Insert into Empleados.Empleado values ('Guillermo', 'Herrera', 'CEO','Ms', '1989/01/11','2013/01/11', 'Urb. Las malvinas','Callao', 'Lima',94345,'Peru',234456,3,3) Insert into Empleados.Empleado values ('Hector', 'Perez', 'Secretario de ventas','Mh', '1988/01/11','2013/03/13', 'Av. Aviacion','Ica', 'Ica',90222,'Peru',6776655,4,4) Insert into Empleados.Empleado values ('Luis', 'Morientes', 'Administrador de ventas','HT', '1980/03/14','2013/07/22', 'San pedro Mz B Lote 26','Pisco', 'Ica',90111,'Peru',056536016,5,5) Insert into Empleados.Empleado values ('Jorge', 'Gallardo', 'Contador de Ventas','Mf', '1985/01/18','2010/05/21', 'Av. La Marina','Chincha', 'Ica',665543,'Per',91000,6,6) Insert into Empleados.Empleado values ('Juliana', 'Gutierrez', 'Administrador de ventas','Mj', '1988/07/10','2012/01/21', 'Av. Jose de san Martin','Lima', 'Lima',90100,'Peru',6544433,7,7) Insert into Empleados.Empleado values ('Kiara', 'Cevallos', 'Gerente de ventas','MC', '1987/03/24','2011/01/21', 'AV. Hurtados','Palpa', 'Ica',90500,'Peru',4344556,8,8) Insert into Empleados.Empleado values ('Oscar', 'Cabrera', 'Administrador de ventas','MH', '1986/06/17','2009/03/21', 'Jr. Jose Olaya','Callao', 'Callao',90000,'Peru',01212334,9,9) Insert into Empleados.Empleado values ('Victoria', 'Huamani', 'Administrador de ventas','My', '1980/01/11','2002/01/21', 'Av. Simon Bolivar','Pisco', 'Ica',90111,'Peru',056534455,13,10) Insert into Empleados.Empleado values ('Elias', 'Guevara', 'Contador de ventas','Ms', '1983/11/16','2010/05/25', 'La victoria 123','Lima', 'Lima',90113,'Peru',012342234,18,11) Insert into Empleados.Empleado values ('Orlando', 'Acevedo', 'secretario de ventas','MV', '1975/06/19','1990/01/21', 'Av. Juan Perez','Chincha', 'Ica',90101,'Peru',099877322,19,12) Insert into Empleados.Empleado values ('Diego', 'Yzaguirre', 'CEO','Mt', '1990/06/18','2013/04/22', 'Jr. Gastiabur 342','Ica', 'Ica',90000,'Peru',056234543,20,13) Insert into Empleados.Empleado values ('Felix', 'Flores', 'CEO','Ut', '1986/06/12','2009/01/23', 'La esperanza 234','Pisco', 'Ica',90111,'Peru',056534412,22,14) Insert into Empleados.Empleado values ('Bernardo', 'Acevedo', 'Administrador de ventas','Ms', '1979/09/12','2004/01/12', 'Jr. Hurtado 341','Ica', 'Ica',90222,'Peru',056112255,23,15) Insert into Empleados.Empleado values ('Felicita', 'Ramirez', 'CEO','Ms', '1987/06/08','2010/04/13', 'Av. Cascanueces','Ica', 'Ica',90222,'Peru',056434323,24,16) Insert into Empleados.Empleado values ('Marco', 'Gutierrez', 'CEO','Mn', '1986/02/13','2009/02/24', 'Av. La libertad','Pisco', 'Ica',90111,'Peru',056534433,25,17) Insert into Empleados.Empleado values ('Mirella', 'Espino', 'Administradora de ventas','JO', '1979/06/13','2005/03/23', 'Av. Arequipa 33445','Lima', 'Lima',90444,'Peru',012345432,26,18) Insert into Empleados.Empleado values ('Fernando', 'Escate', 'Administrador','IH', '1989/02/12','2010/02/21', 'Casalla 234','Pisco', 'Ica',90111,'Peru',056533333,27,19) Insert into Empleados.Empleado values ('Gabriel', 'Curi', 'Gerente de ventas','Ms', '1990/06/18','2013/07/22', 'Av. Simon Bolivar','Pisco', 'Ica',90111,'Peru',056533422,28,20)

18

Select*from Insert into Insert into Insert into Insert into Insert into Insert into Insert into Insert into Insert into Insert into Insert into Insert into Insert into Insert into Insert into Insert into Insert into Insert into Insert into Insert into

Produccion.Productcateg Produccion.Productcateg Produccion.Productcateg Produccion.Productcateg Produccion.Productcateg Produccion.Productcateg Produccion.Productcateg Produccion.Productcateg Produccion.Productcateg Produccion.Productcateg Produccion.Productcateg Produccion.Productcateg Produccion.Productcateg Produccion.Productcateg Produccion.Productcateg Produccion.Productcateg Produccion.Productcateg Produccion.Productcateg Produccion.Productcateg Produccion.Productcateg Produccion.Productcateg

values values values values values values values values values values values values values values values values values values values values

('CategoriaA', ('CategoriaB', ('CategoriaC', ('CategoriaA', ('CategoriaC', ('CategoriaA', ('CategoriaD', ('CategoriaA', ('CategoriaB', ('CategoriaD', ('CategoriaA', ('CategoriaC', ('CategoriaB', ('CategoriaA', ('CategoriaB', ('CategoriaC', ('CategoriaB', ('CategoriaC', ('CategoriaB', ('CategoriaB',

'XG') 'CF') 'TR') 'XG') 'TR') 'XG') 'DF') 'XG') 'CF') 'DF') 'XG') 'TR') 'CF') 'XG') 'CF') 'TR') 'CF') 'TR') 'CF') 'CF')

Select*from Produccion.producto Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert into into into into into into into into into into into into into into into into into into Produccion.producto Produccion.producto Produccion.producto Produccion.producto Produccion.producto Produccion.producto Produccion.producto Produccion.producto Produccion.producto Produccion.producto Produccion.producto Produccion.producto Produccion.producto Produccion.producto Produccion.producto Produccion.producto Produccion.producto Produccion.producto values('Libros', 1,1, 345,1, 1) values('Cuadernos', 2,2, 340,2, 2) values('Lapiceros', 3,3, 333,3, 3) values('Folders', 4,4, 234,4, 4) values('hojas', 5,5, 378,5, 5) values('Zapatos', 6,6, 234,6, 6) values('Zapatillas', 7,7, 125,7, 7) values('Shorts', 8,8, 123,8, 8) values('Camisas', 9,9, 565,9, 9) values('Faldas', 10,10, 234,10, 10) values('Vasos', 11,11, 344,11, 11) values('Platos', 12,12, 356,12, 12) values('Plancha', 13,13, 789,13, 13) values('Lavadora', 14,14, 1234,14, 14) values('Meza', 15,15, 325,15, 15) values('Sillas', 16,16, 343,16, 16) values('Telefono', 17,17, 554,17, 17) values('Ollas', 18,18, 543,18, 18)

19

Select*from proveedores.proveedor Insert into proveedores.proveedor values('Jos', 'Ramos', 'RamosSA', 'As. La alborada 233', 'Palpa', 'AC', 1) Insert into proveedores.proveedor values('Paolo', 'Camasacari', 'PA.Z', 'Jr. Huancayo', 'Lima', 'AD', 2) Insert into proveedores.proveedor values('Juan', 'Ramirez', 'RMJaun', 'Av. Lambayeque', 'Chincha', 'DD', 3) Insert into proveedores.proveedor values('Digoberto', 'Diaz', 'DiazS', 'Calle los Jimenez 123', 'Ica', 'DD', 4) Insert into proveedores.proveedor values('Franco', 'Fernandez', 'FAfra', 'Urb. Joses', 'Caete', 'RR', 5) Insert into proveedores.proveedor values('Pablo', 'Escate', 'Juan Pablo', 'Urb. Paracas 343', 'Paracas', 'FF', 6 ) Insert into proveedores.proveedor values('Liliano', 'Ramos', 'LLSA', 'AV. San Martin', 'Pisco', 'GG', 7) Insert into proveedores.proveedor values('Emiliano', 'Zegarra', 'ZegarraZ', 'Av. La molina 333', 'Ica', 'DD', 8) Insert into proveedores.proveedor values('Oscar', 'Leon', 'LeonesSA', 'Av. Los libertadores 888', 'Chincha', 'BB', 9) Insert into proveedores.proveedor values('Maria', 'Morales', 'MoralesTGE', 'Calle beatita de Humay 321', 'Lima', 'AA', 10) Insert into proveedores.proveedor values('Joseia', 'Navarrete', 'RegorSA', 'Av. La libertad 3122', 'Nazca', 'FF', 11) Insert into proveedores.proveedor values('Antonio', 'aez', 'aezRE', 'Calle Los bolivar 44444', 'Ayacucho', 'RR', 12) Insert into proveedores.proveedor values('Gilberto', 'Rosales', 'RosalesCorp.', 'Jr. Los Juanes 3312', 'Callao', 'TT', 13) Insert into proveedores.proveedor values('Hector', 'Hurtado', 'Hurtadito ooo ', 'Av. Los Camellos 1212', 'Chincha', 'RR', 14) Insert into proveedores.proveedor values('Moises', 'Marrufo', 'Moises SA', 'Av. La Alameda 111123', 'Pisco', 'GG', 15) Insert into proveedores.proveedor values('Josue', 'Escalante', 'EscalantesSA', 'As. Kioro 431221', 'Ica', 'RR', 16) Insert into proveedores.proveedor values('Joel', 'Avil', 'Avilesses ', 'As. Hurtadio 4444', 'Pisco', 'TRE', 17) Insert into proveedores.proveedor values('Rafael', 'Enciso', 'LosChorrys', 'Jr. Callao 3434', 'Caete', 'DD', 18)

Select*from transportes.transportCategoria Insert into transportes.transportCategoria ('Guerrilla','Buena') Insert into transportes.transportCategoria Insert into transportes.transportCategoria ('Husband','MalBuena') Insert into transportes.transportCategoria ('Jurbet','mUyBuena') Insert into transportes.transportCategoria ('Husbent','MalBuena') Insert into transportes.transportCategoria ('Kolbet','BienBuena') Insert into transportes.transportCategoria ('Bilbat','ExceBuena') Insert into transportes.transportCategoria Insert into transportes.transportCategoria ('Loopes','MuyBuena') values values ('Husbert','MBuena') values values values values values values ('Pertar','MaBuena') values

20

Insert into transportes.transportCategoria ('Kikire','ExcelBuena') Insert into transportes.transportCategoria Insert into transportes.transportCategoria Insert into transportes.transportCategoria ('Jollanea','ExceBuena') Insert into transportes.transportCategoria ('Nanari','MalBuena') Insert into transportes.transportCategoria ('Guerrera','MalBuena') Insert into transportes.transportCategoria ('tundra','MuymalBuena') Insert into transportes.transportCategoria ('Bernar','MalBuena') Insert into transportes.transportCategoria ('MarBor','ExcBuena') Insert into transportes.transportCategoria Insert into transportes.transportCategoria Insert into transportes.transportCategoria Insert into transportes.transportCategoria

values values ('Cellera','Buena') values ('Parata','Buena') values values values values values values values values values values ('Lopaz','MalBuena') ('Baeer','MuyBuena') ('Biers','Buena') ('Lopaes','Buena')

Select*from transportes.transportEnvio Insert into transportes.transportEnvio values ('HermanosJacobs','2013/03/13','2013/03/14') Insert into transportes.transportEnvio values ('Ayar','2013/04/11','2013/04/12') Insert into transportes.transportEnvio values ('Jirones','2013/04/13','2013/03/14') Insert into transportes.transportEnvio values ('Flores','2013/03/17','2013/03/18') Insert into transportes.transportEnvio values ('Heraldos','2013/05/15','2013/05/16') Insert into transportes.transportEnvio values ('Civas','2013/03/19','2013/03/20') Insert into transportes.transportEnvio values ('Quispes','2013/07/17','2013/07/18') Insert into transportes.transportEnvio values ('HurtadoTransport','2013/06/16','2013/06/17') Insert into transportes.transportEnvio values ('SolMar','2013/05/22','2013/05/23') Insert into transportes.transportEnvio values ('VientosSeguros','2013/03/19','2013/03/20') Insert into transportes.transportEnvio values ('CarreteraSCalida','2013/08/18','2013/08/19') Insert into transportes.transportEnvio values ('HermanosMamani','2013/06/16','2013/06/17') Insert into transportes.transportEnvio values ('TransportLA','2013/05/15','2013/05/16') Insert into transportes.transportEnvio values ('JeRardos','2013/01/11','2013/01/12') Insert into transportes.transportEnvio values ('CalmarQuispe','2013/05/15','2013/05/16') Insert into transportes.transportEnvio values ('GerardoSosaya','2013/07/17','2013/07/18') Insert into transportes.transportEnvio values ('JimenezHU','2013/07/18','2013/07/19') Insert into transportes.transportEnvio values ('JoseEliasSA','2013/07/17','2013/07/18')

21

Insert into transportes.transportEnvio values ('SolMar','2013/07/17','2013/07/18') Insert into transportes.transportEnvio values ('VillegasRUP','2013/07/17','2013/07/18') Select*from transportes.TransportDettalleEnvio

Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert

into into into into into into into into into into into into into into into into into into into into

transportes.TransportDettalleEnvio transportes.TransportDettalleEnvio transportes.TransportDettalleEnvio transportes.TransportDettalleEnvio transportes.TransportDettalleEnvio transportes.TransportDettalleEnvio transportes.TransportDettalleEnvio transportes.TransportDettalleEnvio transportes.TransportDettalleEnvio transportes.TransportDettalleEnvio transportes.TransportDettalleEnvio transportes.TransportDettalleEnvio transportes.TransportDettalleEnvio transportes.TransportDettalleEnvio transportes.TransportDettalleEnvio transportes.TransportDettalleEnvio transportes.TransportDettalleEnvio transportes.TransportDettalleEnvio transportes.TransportDettalleEnvio transportes.TransportDettalleEnvio

values values values values values values values values values values values values values values values values values values values values

( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (

'A',1,1) 'C',2,2) 'B',3,3) 'B',4,4) 'Z',5,5) 'T',6,6) 'G',7,7) 'H',8,8) 'J',9,9) 'U',10,10) 'I',11,11) 'K',12,12) 'L',13,13) 'O',14,14) 'W',15,15) 'Q',16,16) 'K',17,17) '',18,18) 'N',19,19) 'M',20,20)

Select*from ventas.Distribuidor Insert into ventas.Distribuidor Insert into ventas.Distribuidor Insert into ventas.Distribuidor Insert into ventas.Distribuidor Insert into ventas.Distribuidor Insert into ventas.Distribuidor Insert into ventas.Distribuidor Insert into ventas.Distribuidor Insert into ventas.Distribuidor Insert into ventas.Distribuidor Insert into ventas.Distribuidor Insert into ventas.Distribuidor Insert into ventas.Distribuidor 08878789,13) Insert into ventas.Distribuidor Insert into ventas.Distribuidor Insert into ventas.Distribuidor Insert into ventas.Distribuidor Insert into ventas.Distribuidor Insert into ventas.Distribuidor Insert into ventas.Distribuidor values values values values values values values values values values values values values values values values values values values values ('VoletineSA', 08988778,1) ('SandTR', 04532345,2) ('JoseHTR', 07654321,3) ('CalteroJU', 08432122,4) ('Vallenta', 08341212,5) ('Austral', 08112233,6) ('SacoSanchez', 03212321,7) ('AceroBerde', 04534499,8) ('ViontaboGUt', 03414567,9) ('BellavistaSA', 04567788,10) ('HuamvitaOP', 05645648,11) ('GuerreroS', 08656789,12) ('LopezEscalanteTI', ('GherrelFT', 08686787,14) ('JiraldosGT', 08678678,15) ('VotenoTO', 08767778,16) ('LosHERmanos', 08987668,17) ('VGuillerm', 03434455,18) ('inkaCup', 0456786,19) ('KoloCupe', 0987432,20)

22

SElect*from ventas.pedido

Insert into ventas.pedido values ('2013/04/13', '2013/04/13', '2013/03/23', 34.60,'Av. los libertadores 3234', 'Pisco','Ica', 90111,'Peru',1, 2,1) Insert into ventas.pedido values ('2013/03/07', '2013/01/02', '2013/03/20',50.60,'Av. Cascanueces 5555', 'Ica','Ica', 90222,'Peru',2, 3,2) Insert into ventas.pedido values ('2013/03/21', '2013/05/13', '2013/04/10', 89.10,'Jr. Las Malvinas 3346', 'Ica','Ica', 90111,'Peru',9, 9,6) Insert into ventas.pedido values ('2013/03/21', '2013/05/13', '2013/04/10', 89.10,'Jr. Las Malvinas 3346', 'Ica','Ica', 90111,'Peru',9, 9,6) Insert into ventas.pedido values ('2013/03/21', '2013/05/13', '2013/04/10', 89.10,'Jr. Las Malvinas 3346', 'Ica','Ica', 90111,'Peru',9, 9,6) Insert into ventas.pedido values ('2013/03/21', '2013/05/13', '2013/04/10', 89.10,'Jr. Las Malvinas 3346', 'Ica','Ica', 90111,'Peru',9, 9,6) Insert into ventas.pedido values ('2013/05/11', '2013/05/29', '2013/05/20', 67.18,'Urb. La alborada 4444', 'Callao','Lima', 94345,'Peru',10, 10,7) Insert into ventas.pedido values ('2013/04/19', '2013/05/19', '2013/04/29', 78.18,'Av. Los Heraldos 7800', 'Lima','Lima', 94345,'Peru',11, 11,8) Insert into ventas.pedido values ('2013/07/27', '2013/08/18', '2013/08/11', 77.70,'Av. Inca Garcilazo 5333', 'Ica','Ica', 90111,'Peru',13, 12,9) Insert into ventas.pedido values ('2013/11/11', '2013/12/20', '2013/11/29', 55.10,'Urb. Los Aquijes 3412', 'Chincha','Ica', 90444,'Peru',14, 13,10) Insert into ventas.pedido values ('2013/06/26', '2013/07/17', '2013/07/01', 67.17,'Av. Cascanueces 4523', 'Chincha','Ica', 90444,'Peru',15, 16,11) Insert into ventas.pedido values ('2013/02/22', '2013/03/23', '2013/02/27', 55.33,'Calle La esperanza 333', 'Pisco','Ica', 90111,'Peru',16, 18,12) Insert into ventas.pedido values ('2013/05/15', '2013/06/15', '2013/05/27', 97.11,'Av. Las americas 666', 'Callao','Lima', 94345,'Peru',17, 19,13) Insert into ventas.pedido values ('2013/06/16', '2013/07/17', '2013/06/24', 55.55,'Av. San Pedro 4545', 'Ica','Ica', 90111,'Peru',18, 20,14) Insert into ventas.pedido values ('2013/06/26', '2013/07/17', '2013/04/14', 45.15,'Calle Las Malvinas 3434', 'Pisco','Ica', 90111,'Peru',19, 21,15) Insert into ventas.pedido values ('2013/07/27', '2013/08/17', '2013/07/29', 67.56,'Calle Los Juanetes 5656 ', 'Ica','Ica', 90111,'Peru',20, 22,16) Insert into ventas.pedido values ('2013/08/28', '2013/09/17', '2013/09/04', 67.47,'Calle Acevedo 4566', 'Chincha','Ica', 90444,'Peru',21, 23,17) Insert into ventas.pedido values ('2013/06/18', '2013/07/17', '2013/06/04', 77.17,'Av. Juan Pablo 445', 'Ica','Ica', 90111,'Peru',22, 24,18)

23

SElect*from Ventas.DetallePedido Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert into into into into into into into into into into into into into into into into into into into Ventas.DetallePedido Ventas.DetallePedido Ventas.DetallePedido Ventas.DetallePedido Ventas.DetallePedido Ventas.DetallePedido Ventas.DetallePedido Ventas.DetallePedido Ventas.DetallePedido Ventas.DetallePedido Ventas.DetallePedido Ventas.DetallePedido Ventas.DetallePedido Ventas.DetallePedido Ventas.DetallePedido Ventas.DetallePedido Ventas.DetallePedido Ventas.DetallePedido Ventas.DetallePedido values values values values values values values values values values values values values values values values values values values ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( 23,66,0.20,1) 34,45,0.13,2) 44,45,0.27,3) 56,57,0.18,4) 67,78,0.19,5) 35,38,0.25,6) 78,68,0.12,7) 14,64,0.11,8) 24,9,0.10,9) 45,78,0.12,10) 44,70,0.11,11) 42,80,0.12,12) 40,66,0.09,13) 38,55,0.07,14) 35,44,0.07,15) 33,234,0.17,16) 32,34,0.18,17) 56,78,0.13,18) 53,56,0.17,19)

SElect*from compras.compra Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert into into into into into into into into into into into into into into into into into into compras.compra compras.compra compras.compra compras.compra compras.compra compras.compra compras.compra compras.compra compras.compra compras.compra compras.compra compras.compra compras.compra compras.compra compras.compra compras.compra compras.compra compras.compra values values values values values values values values values values values values values values values values values values (234,2010, (200,2010, (180,2010, (176,2011, (189,2011, (199,2011, (199,2012, (200,2013, (345,2012, (344,2011, (378,2013, (321,2012, (322,2011, (322,2011, (311,2012, (123,2012, (167,2013, (188,2012, 'ABT',1,1,1,2) 'ACC',2,2,2,3) 'AAA',3,3,3,4) 'ACC',4,4,4,6) 'ATT',5,5,5,8) 'ABT',6,6,6,9) 'ACT',7,7,7,10) 'ACC',8,8,8,11) 'AAA',9,9,9,12) 'AAA',10,10,10,13) 'ACC',11,11,11,16) 'ABT',12,12,12,18) 'AAA',13,13,13,19) 'ACT',14,14,14,20) 'AAA',15,15,15,21) 'ABT',16,16,16,22) 'ACT',17,17,17,23) 'ACC',18,18,18,24)

SElect*from

documentos.factura

Insert into documentos.factura values ('Av. los libertadores 3234','2013/03/23',1,1,2.53, 1.31, 0.20,3.52) Insert into documentos.factura values ('Av. Cascanueces 5555','2013/03/11',2,2,2.11, 2.22, 0.12,2.12) Insert into documentos.factura values ('Jr. Las Malvinas 3346','2013/12/12',3,3,2.22, 1.31, 0.11,2.42) Insert into documentos.factura values ('Av. Los Heraldos 7800','2012/02/22',4,4,1.26, 1.31, 0.14,3.12) Insert into documentos.factura values ('Av. Inca Garcilazo 5333','2013/11/11',5,5,5.55, 1.31, 0.18,1.11) Insert into documentos.factura values ('Urb. Los Aquijes 3412','2013/10/10',9,6,2.53, 6.36, 0.19,3.23) Insert into documentos.factura values ('Calle La esperanza 333','2013/01/12',10,7,2.53, 7.11, 0.20,2.22)

24

Insert into documentos.factura values ('Calle La esperanza 333','2013/01/12',11,8,3.22, 1.16, 0.23,1.21) Insert into documentos.factura values ('Calle La esperanza 333','2013/01/12',13,9,1.14, 2.12, 0.12,2.21) Insert into documentos.factura values ('Calle La esperanza 333','2013/01/12',14,10,3.56, 2.13, 0.11,1.10) Insert into documentos.factura values ('Calle La esperanza 333','2013/01/12',15,11,2.23, 4.34, 0.15,3.33) Insert into documentos.factura values ('Calle La esperanza 333','2013/01/12',16,12,3.34, 3.34, 0.16,4.12) Insert into documentos.factura values ('Calle La esperanza 333','2013/01/12',17,13,3.33, 3.33, 0.18,2.11) Insert into documentos.factura values ('Av. San Pedro 4545','2013/01/12',18,14,1.51, 2.16, 0.12,2.10) Insert into documentos.factura values ('Calle Las Malvinas 3434','2013/01/12',19,15,2.11, 3.11, 0.22,1.11) Insert into documentos.factura values ('Calle Los Juanetes 5656 ','2013/01/12',20,16,2.53, 1.12, 0.22,1.14) Insert into documentos.factura values ('Calle Acevedo 4566','2013/01/12',21,17,2.53, 3.13, 0.21,1.17) Insert into documentos.factura values ('Av. Juan Pablo 445','2013/01/12',22,18,2.53, 2.22, 0.24,1.11) SElect*from documentos.guia Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert Insert into into into into into into into into into into into into into into into into into into documentos.guia documentos.guia documentos.guia documentos.guia documentos.guia documentos.guia documentos.guia documentos.guia documentos.guia documentos.guia documentos.guia documentos.guia documentos.guia documentos.guia documentos.guia documentos.guia documentos.guia documentos.guia values('2013/01/12',1) values('2013/02/24',2) values('2013/03/05',3) values('2013/04/11',4) values('2013/02/12',5) values('2013/03/19',6) values('2013/05/17',7) values('2013/06/18',8) values('2013/07/11',9) values('2013/08/16',10) values('2013/03/11',11) values('2013/04/23',12) values('2013/05/12',13) values('2013/06/22',14) values('2013/03/26',15) values('2013/04/29',16) values('2013/06/27',17) values('2013/05/26',18)

25

DICCCIONARIO DE DATOS

26

También podría gustarte