32
2013 Grupo Nº2 Telecomunicaciones 18/05/2013 [Base de Datos CAPT2013] IMPLEMENTACIO N DE BASE DE Alumnos : - Acevedo Tornero, Aldair Alemao - Cusi Alvarado, Julio ING. YESSICA PUCHURI

Proceso de Creacion Base de Datos CAPT2013

Embed Size (px)

Citation preview

Grupo Nº2

Telecomunicaciones

18/05/2013

2013[Base de Datos CAPT2013]

IMPLEMENTACION DE BASE

Alumnos:

- Acevedo Tornero, Aldair Alemao

- Cusi Alvarado, Julio Cesar

- Paucca Inca,

ING. YESSICA

1

Para Nuestra Docente Ing.

Yessica Puchuri Manco Por

La gran Labor Que

Desempeña, A pesar de

Los Imprevistos y

Ocurrencias que se

Suscitan en clase.

2

INDICE

I.- BREVE DESCRIPCION DE LA EMPRESA Y LA BASE DE DATOS…………..Pag. 3I.1.- Historia del Nombre de La Empresa o Base de Datos:………………… Pag. 3II.- DIAGRAMA DE LA BASE DE DATOS CAPT2013 …………………………….. Pag. 4III.- TRANSACT SQL USADO PARA LA CREACION DE LA BASE DE DATOS…Pag 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. 62. Creando La Tabla: ' Amortizacion.saldo ' ……………………………… Pag. 63. Creando La Tabla: ' Amortizacion.Deuda '…………………………… Pag. 64. Creando La Tabla: ' Produccion.productcateg '……………………… Pag. 65. Creando La Tabla: ' Empleados.EmplDescrip…………………………… Pag. 66. Creando La Tabla: ' Empleados.EmplCateg ……………………………… Pag. 67. Creando La Tabla: ' Clientes.CategoriaCliente…………………………… Pag. 78. Creando La Tabla: ' Almacenes.Almacen '………………………………… Pag. 79. Creando La Tabla: ' Compras.DetalleCompra '…………………………… Pag. 710. Creando La Tabla: ' Transportes.TransportCategoria '…………………… Pag. 711. Creando La Tabla: ' Transportes.TransportEnvio '………………………… Pag. 712. Creando La Tabla: 'Transportes.TransportDettalleEnvio …'……………… Pag. 713. Creando La Tabla: ' Clientes.Cliente '……………………………………… Pag. 814. Creando La Tabla: ' Ventas.Distribuidor '…………………………………… Pag. 815. Creando La Tabla: ' Empleados.empleado '……………………………… Pag. 816. Creando La Tabla: ' Proveedores.proveedor ' …………………………… Pag.9.17. Creando La Tabla: ' Produccion.producto '……………………………..… Pag.9.18. Creando La Tabla: ' Ventas.Pedido '…………………………………..…… Pag. 919. Creando La Tabla: ' Documentos.guia ' …………………………………… Pag.9.20. Creando La Tabla: ' Documentos.factura '………………………………… Pag.1021. Creando La Tabla: ' Ventas.DetallePedido '……………………………… Pag.1022. Creando La Tabla: ' Compras.Compra '…………………………………… Pag.10

-- SECCION D – INSERTANDO DATOS A LA BASE DE DATOSBASE…………………. DE DATOS

.

3

BASE DE DATOS CAPT2013

I. BREVE DESCRIPCION DE LA EMPRESA Y BD

CAPT Es Una Empresa Dedicada a Adquisición de la compra, Venta y Transporte de

Múltiples Productos desde Maquinarias Pesadas, artefactos y productos Tecnológicos

hasta Materias Primas a Gran Escala.

Además 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 Combinación de Las Iniciales

de Los Apellidos de Los Integrantes del Grupo del Curso de Implementación de Base de

Datos de La Facultad de Ingeniería 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

4

II. DIAGRAMA DE LA BASE DE DATOS CAPT2013

5

6

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 código siguiente para crear una base de datos vacía llamada TSQL2012USE master;

-- Si La Base de Datos Ya Existe EliminarIF DB_ID('CAPT2013') IS NOT NULL DROP DATABASE CAPT2013;

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

-- Creando La Base de DatosCREATE 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

7

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

-- 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,AñoContratacEmpl 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),)

8

-- 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), );

9

-- 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,NombreCompañia 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),)

10

-- 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,Compañía 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),

)

11

-- 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), )

12

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

-- SECCION D – INSERTANDO DATOS A LA BASE DE DATOS---------------------------------------------------------------------

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

SELECT*FROM Amortizacion.deuda

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

13

SELECT*FROM Amortizacion.pagogo

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

SELECT*FROM Amortizacion.saldogo

Insert into Amortizacion.saldo values (12345, 45549646)

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

14

SELECT*FROM clientes.categoriaclientego

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

15

Select*from clientes.clientegoInsert 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 )

16

SELECT*from Compras.detallecomprainsert into Compras.detallecompra values ('CATG', '2009/10/11')insert into Compras.detallecompra values ('FERO', '2009/12/29')insert into Compras.detallecompra values ('TUBE', '2009/09/23')insert into Compras.detallecompra values ('FRER', '2009/06/30')insert into Compras.detallecompra values ('FESA', '2009/04/20')insert into Compras.detallecompra values ('CCCC', '2009/11/24')insert into Compras.detallecompra values ('CACT', '2009/02/13')insert into Compras.detallecompra values ('FERT', '2009/12/30')insert into Compras.detallecompra values ('DATR', '2009/11/11')insert into Compras.detallecompra values ('FERT', '2009/01/25')insert into Compras.detallecompra values ('CARR', '2009/12/12')insert into Compras.detallecompra values ('CATG', '2010/06/30')insert into Compras.detallecompra values ('CATG', '2010/10/02')insert into Compras.detallecompra values ('CATG', '2011/12/08')insert into Compras.detallecompra values ('CATG', '2011/02/24')insert into Compras.detallecompra values ('CRFT', '2012/02/12')insert into Compras.detallecompra values ('CEWQ', '2012/02/11')insert into Compras.detallecompra values ('QWER', '2013/03/23')insert into Compras.detallecompra values ('QWER', '2013/07/22')insert into Compras.detallecompra values ('CARY', '2013/01/22')

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

Select*from Empleados.EmplCateg

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

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

17

SElect*from Empleados.EmplDescripgo

Insert into Empleados.EmplDescrip values ('2013/07/22', '2014/07/22', 9000, 'A')Insert into Empleados.EmplDescrip values ('2013/02/12', '2015/02/12', 5677, 'B')Insert into Empleados.EmplDescrip values ('2013/01/11', '2014/01/11', 5000, 'B')Insert into Empleados.EmplDescrip values ('2013/03/13', '2016/03/22', 6788, 'C')Insert into Empleados.EmplDescrip values ('2013/07/22', '2014/07/22', 7888, 'A')Insert into Empleados.EmplDescrip values ('2013/02/23', '2015/02/23', 4557, 'C')Insert into Empleados.EmplDescrip values ('2013/02/23', '2014/02/23', 9456, 'B')Insert into Empleados.EmplDescrip values ('2013/01/21', '2014/01/21', 8888, 'C')Insert into Empleados.EmplDescrip values ('2013/01/23', '2014/01/23', 5678, 'B')Insert into Empleados.EmplDescrip values ('2013/03/23', '2014/03/23', 5678, 'B')Insert into Empleados.EmplDescrip values ('2013/09/12', '2016/09/12', 6700, 'A')Insert into Empleados.EmplDescrip values ('2013/01/21', '2014/01/21', 8770, 'A')Insert into Empleados.EmplDescrip values ('2013/04/26', '2014/04/26', 8000, 'A')Insert into Empleados.EmplDescrip values ('2013/02/23', '2014/02/23', 8700, 'A')Insert into Empleados.EmplDescrip values ('2013/01/21', '2014/01/21', 6500, 'B')Insert into Empleados.EmplDescrip values ('2013/01/11', '2016/01/11', 7800, 'B')Insert into Empleados.EmplDescrip values ('2013/07/21', '2016/07/21', 7800, 'B')

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

SELECT*FROM Empleados.Empleado

18

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)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)

19

Select*from Produccion.ProductcategInsert into Produccion.Productcateg values ('CategoriaA', 'XG')Insert into Produccion.Productcateg values ('CategoriaB', 'CF')Insert into Produccion.Productcateg values ('CategoriaC', 'TR')Insert into Produccion.Productcateg values ('CategoriaA', 'XG')Insert into Produccion.Productcateg values ('CategoriaC', 'TR')Insert into Produccion.Productcateg values ('CategoriaA', 'XG')Insert into Produccion.Productcateg values ('CategoriaD', 'DF')Insert into Produccion.Productcateg values ('CategoriaA', 'XG')Insert into Produccion.Productcateg values ('CategoriaB', 'CF')Insert into Produccion.Productcateg values ('CategoriaD', 'DF')Insert into Produccion.Productcateg values ('CategoriaA', 'XG')Insert into Produccion.Productcateg values ('CategoriaC', 'TR')Insert into Produccion.Productcateg values ('CategoriaB', 'CF')Insert into Produccion.Productcateg values ('CategoriaA', 'XG')Insert into Produccion.Productcateg values ('CategoriaB', 'CF')Insert into Produccion.Productcateg values ('CategoriaC', 'TR')Insert into Produccion.Productcateg values ('CategoriaB', 'CF')Insert into Produccion.Productcateg values ('CategoriaC', 'TR')Insert into Produccion.Productcateg values ('CategoriaB', 'CF')Insert into Produccion.Productcateg values ('CategoriaB', 'CF')

Select*from Produccion.producto

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

20

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', 'Cañete', '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', 'Ñañez', 'ÑañezRE', '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. Hurtadiño 4444', 'Pisco', 'TRE', 17)Insert into proveedores.proveedor values('Rafael', 'Enciso', 'LosChorrys', 'Jr. Callao 3434', 'Cañete', 'DD', 18)

Select*from transportes.transportCategoria

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

21

Insert into transportes.transportCategoria values ('Loopes','MuyBuena')Insert into transportes.transportCategoria values ('Kikire','ExcelBuena')Insert into transportes.transportCategoria values ('Cellera','Buena')Insert into transportes.transportCategoria values ('Parata','Buena')Insert into transportes.transportCategoria values ('Jollanea','ExceBuena')Insert into transportes.transportCategoria values ('Nanari','MalBuena')Insert into transportes.transportCategoria values ('Guerrera','MalBuena')Insert into transportes.transportCategoria values ('tundra','MuymalBuena')Insert into transportes.transportCategoria values ('Bernar','MalBuena')Insert into transportes.transportCategoria values ('MarBor','ExcBuena')Insert into transportes.transportCategoria values ('Lopaz','MalBuena')Insert into transportes.transportCategoria values ('Baeer','MuyBuena')Insert into transportes.transportCategoria values ('Biers','Buena')Insert into transportes.transportCategoria values ('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 ('Hurtado-Transport','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')

22

Insert into transportes.transportEnvio values ('JoseEliasSA','2013/07/17','2013/07/18')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 into transportes.TransportDettalleEnvio values ( 'A',1,1)Insert into transportes.TransportDettalleEnvio values ( 'C',2,2)Insert into transportes.TransportDettalleEnvio values ( 'B',3,3)Insert into transportes.TransportDettalleEnvio values ( 'B',4,4)Insert into transportes.TransportDettalleEnvio values ( 'Z',5,5)Insert into transportes.TransportDettalleEnvio values ( 'T',6,6)Insert into transportes.TransportDettalleEnvio values ( 'G',7,7)Insert into transportes.TransportDettalleEnvio values ( 'H',8,8)Insert into transportes.TransportDettalleEnvio values ( 'J',9,9)Insert into transportes.TransportDettalleEnvio values ( 'U',10,10)Insert into transportes.TransportDettalleEnvio values ( 'I',11,11)Insert into transportes.TransportDettalleEnvio values ( 'K',12,12)Insert into transportes.TransportDettalleEnvio values ( 'L',13,13)Insert into transportes.TransportDettalleEnvio values ( 'O',14,14)Insert into transportes.TransportDettalleEnvio values ( 'W',15,15)Insert into transportes.TransportDettalleEnvio values ( 'Q',16,16)Insert into transportes.TransportDettalleEnvio values ( 'K',17,17)Insert into transportes.TransportDettalleEnvio values ( 'Ñ',18,18)Insert into transportes.TransportDettalleEnvio values ( 'N',19,19)Insert into transportes.TransportDettalleEnvio values ( 'M',20,20)

Select*from ventas.Distribuidor

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

23

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)

24

SElect*from Ventas.DetallePedido

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

SElect*from compras.compra

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

25

Insert into documentos.factura values ('Calle La esperanza 333','2013/01/12',10,7,2.53, 7.11, 0.20,2.22)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 into documentos.guia values('2013/01/12',1)Insert into documentos.guia values('2013/02/24',2)Insert into documentos.guia values('2013/03/05',3)Insert into documentos.guia values('2013/04/11',4)Insert into documentos.guia values('2013/02/12',5)Insert into documentos.guia values('2013/03/19',6)Insert into documentos.guia values('2013/05/17',7)Insert into documentos.guia values('2013/06/18',8)Insert into documentos.guia values('2013/07/11',9)Insert into documentos.guia values('2013/08/16',10)Insert into documentos.guia values('2013/03/11',11)Insert into documentos.guia values('2013/04/23',12)Insert into documentos.guia values('2013/05/12',13)Insert into documentos.guia values('2013/06/22',14)Insert into documentos.guia values('2013/03/26',15)Insert into documentos.guia values('2013/04/29',16)Insert into documentos.guia values('2013/06/27',17)Insert into documentos.guia values('2013/05/26',18)

26

DICCCIONARIO DE DATOS