Sie sind auf Seite 1von 6

/*

Navicat MySQL Data Transfer

Source Server : conexion1


Source Server Version : 50505
Source Host : localhost:3306
Source Database : laboratorio12

Target Server Type : MYSQL


Target Server Version : 50505
File Encoding : 65001

Date: 2018-04-24 14:53:38


*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for `articulo`
-- ----------------------------
DROP TABLE IF EXISTS `articulo`;
CREATE TABLE `articulo` (
`id_art` int(11) NOT NULL AUTO_INCREMENT,
`tit_art` varchar(100) DEFAULT NULL,
`aut_art` varchar(100) DEFAULT NULL,
`edi_art` varchar(300) DEFAULT NULL,
`prec_art` decimal(18,0) DEFAULT NULL,
PRIMARY KEY (`id_art`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;

-- ----------------------------
-- Records of articulo
-- ----------------------------
INSERT INTO `articulo` VALUES ('1', 'Redes cisco', 'Ernesto Arigasello',
'Alfaomega-Rama', '60000');
INSERT INTO `articulo` VALUES ('2', 'Facebook y twitter para adultos', 'Veloso
Claudio', 'Alfaomega', '52000');
INSERT INTO `articulo` VALUES ('3', 'Creación de un portal con php y mysql',
'Jacobo Pavón Puertas', 'Alfaomega-Rama', '40000');
INSERT INTO `articulo` VALUES ('4', 'Administración de sistemas operativos', 'Julio
Gómez López', 'Alfaomega-Rama', '55000');

-- ----------------------------
-- Table structure for `articuloxpedido`
-- ----------------------------
DROP TABLE IF EXISTS `articuloxpedido`;
CREATE TABLE `articuloxpedido` (
`id_ped_artped` int(11) DEFAULT NULL,
`id_art_artped` int(11) DEFAULT NULL,
`can_art_artped` int(11) DEFAULT NULL,
`val_ven_art_artped` decimal(11,0) DEFAULT NULL,
KEY `articuloxpedido_ibfk_1` (`id_ped_artped`),
KEY `articuloxpedido_ibfk_2` (`id_art_artped`),
CONSTRAINT `articuloxpedido_ibfk_1` FOREIGN KEY (`id_ped_artped`) REFERENCES
`pedido` (`id_ped`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `articuloxpedido_ibfk_2` FOREIGN KEY (`id_art_artped`) REFERENCES
`articulo` (`id_art`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- ----------------------------
-- Records of articuloxpedido
-- ----------------------------
INSERT INTO `articuloxpedido` VALUES ('1', '3', '5', '40000');
INSERT INTO `articuloxpedido` VALUES ('1', '4', '12', '55000');
INSERT INTO `articuloxpedido` VALUES ('2', '1', '5', '65000');
INSERT INTO `articuloxpedido` VALUES ('3', '2', '10', '55000');
INSERT INTO `articuloxpedido` VALUES ('3', '3', '12', '45000');
INSERT INTO `articuloxpedido` VALUES ('4', '1', '20', '65000');

-- ----------------------------
-- Table structure for `aseguramientos`
-- ----------------------------
DROP TABLE IF EXISTS `aseguramientos`;
CREATE TABLE `aseguramientos` (
`asecodigo` int(6) NOT NULL AUTO_INCREMENT,
`asefechainicio` date DEFAULT NULL,
`asefechaexpiracion` date DEFAULT NULL,
`asevalorasegurado` int(11) DEFAULT NULL,
`aseestado` varchar(255) DEFAULT NULL,
`asecosto` int(11) DEFAULT NULL,
`aseplaca` varchar(20) DEFAULT NULL,
PRIMARY KEY (`asecodigo`),
KEY `aseplaca` (`aseplaca`),
CONSTRAINT `aseguramientos_ibfk_1` FOREIGN KEY (`aseplaca`) REFERENCES
`automotores` (`autoplaca`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

-- ----------------------------
-- Records of aseguramientos
-- ----------------------------
INSERT INTO `aseguramientos` VALUES ('1', '2012-09-30', '2013-09-30', '30000000',
'Vigente', '500000', 'FLL420');
INSERT INTO `aseguramientos` VALUES ('2', '2012-09-27', '2013-09-27', '35000000',
'Vigente', '600000', 'DKZ820');
INSERT INTO `aseguramientos` VALUES ('3', '2011-09-28', '2012-09-28', '50000000',
'Vencido', '800000', 'KJQ920');

-- ----------------------------
-- Table structure for `automotores`
-- ----------------------------
DROP TABLE IF EXISTS `automotores`;
CREATE TABLE `automotores` (
`autoplaca` varchar(6) NOT NULL,
`automarca` varchar(30) DEFAULT NULL,
`autotipo` int(11) DEFAULT NULL,
`automodelo` int(11) DEFAULT NULL,
`autonumpasajeros` int(11) DEFAULT NULL,
`autocilindraje` int(11) DEFAULT NULL,
`autonumchasis` varchar(20) DEFAULT NULL,
PRIMARY KEY (`autoplaca`),
KEY `autotipo` (`autotipo`),
CONSTRAINT `automotores_ibfk_1` FOREIGN KEY (`autotipo`) REFERENCES
`tiposautomotores` (`auttipo`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- ----------------------------
-- Records of automotores
-- ----------------------------
INSERT INTO `automotores` VALUES ('DKZ820', 'renault stepway', '1', '2008', '5',
'1600', 'wywwzz157kk009d45');
INSERT INTO `automotores` VALUES ('FLL420', 'chevrolet corsa', '1', '2003', '5',
'1400', 'wywzzz167kk009d25');
INSERT INTO `automotores` VALUES ('KJQ920', 'kia sportage', '2', '2009', '7',
'2000', 'wywzzz157kk009d25');

-- ----------------------------
-- Table structure for `cliente`
-- ----------------------------
DROP TABLE IF EXISTS `cliente`;
CREATE TABLE `cliente` (
`id_cli` varchar(11) NOT NULL,
`nom_cli` varchar(30) DEFAULT NULL,
`ape_cli` varchar(30) DEFAULT NULL,
`dir_cli` varchar(100) DEFAULT NULL,
`dep_cli` varchar(20) DEFAULT NULL,
`mes_cum_cli` varchar(10) DEFAULT NULL,
PRIMARY KEY (`id_cli`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- ----------------------------
-- Records of cliente
-- ----------------------------
INSERT INTO `cliente` VALUES ('1098765789', 'Catalina', 'Zapata', 'Av el Libertador
No.30-14', 'Cauca', 'Marzo');
INSERT INTO `cliente` VALUES ('13890234', 'Roger', 'Ariza', 'Cra 30 No.13-45',
'Antioquia', 'Junio');
INSERT INTO `cliente` VALUES ('63502718', 'Maritza', 'Rojas', 'Calle 34 No.14-45',
'Santander', 'Abril');
INSERT INTO `cliente` VALUES ('77191956', 'Juan Carlos', 'Arenas', 'Diagonal 23
No.12-34 apto 101', 'Valle', 'Marzo');

-- ----------------------------
-- Table structure for `compañia`
-- ----------------------------
DROP TABLE IF EXISTS `compañia`;
CREATE TABLE `compañia` (
`comnit` varchar(11) NOT NULL,
`comnombre` varchar(30) DEFAULT NULL,
`comañofun` int(11) DEFAULT NULL,
`comreplegal` varchar(100) DEFAULT NULL,
PRIMARY KEY (`comnit`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- ----------------------------
-- Records of compañia
-- ----------------------------
INSERT INTO `compañia` VALUES ('800890890-2', 'Seguros Atlantida', '1998', 'Carlos
López');
INSERT INTO `compañia` VALUES ('899999999-1', 'Aseguradora Rojas', '1991', 'Luis
Fernando Rojas');
INSERT INTO `compañia` VALUES ('899999999-5', 'Seguros del Estadio', '2001', 'Maria
Margarita Pérez');

-- ----------------------------
-- Table structure for `curso`
-- ----------------------------
DROP TABLE IF EXISTS `curso`;
CREATE TABLE `curso` (
`cod_curs` int(11) NOT NULL AUTO_INCREMENT,
`nom_curs` varchar(100) DEFAULT NULL,
`horas_cur` int(11) DEFAULT NULL,
`valor_cur` decimal(18,0) DEFAULT NULL,
PRIMARY KEY (`cod_curs`)
) ENGINE=InnoDB AUTO_INCREMENT=345672 DEFAULT CHARSET=latin1;

-- ----------------------------
-- Records of curso
-- ----------------------------
INSERT INTO `curso` VALUES ('149842', 'Fundamentos de Bases de datos', '40',
'500000');
INSERT INTO `curso` VALUES ('250067', 'Fundamentos de SQL', '20', '700000');
INSERT INTO `curso` VALUES ('289011', 'Manejo de Mysql', '45', '550000');
INSERT INTO `curso` VALUES ('345671', 'Fundamentals of Oracle', '60', '3000000');

-- ----------------------------
-- Table structure for `estudiante`
-- ----------------------------
DROP TABLE IF EXISTS `estudiante`;
CREATE TABLE `estudiante` (
`doc_est` varchar(11) NOT NULL,
`nom_est` varchar(30) DEFAULT NULL,
`ape_est` varchar(30) DEFAULT NULL,
`edad_est` int(11) DEFAULT NULL,
PRIMARY KEY (`doc_est`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- ----------------------------
-- Records of estudiante
-- ----------------------------
INSERT INTO `estudiante` VALUES ('1.098.098.0', 'Jonatan', 'Ardila', '17');
INSERT INTO `estudiante` VALUES ('1.098.765.6', 'Carlos', 'Martinez', '19');
INSERT INTO `estudiante` VALUES ('63.502.720', 'María', 'perez', '23');
INSERT INTO `estudiante` VALUES ('91.245.678', 'Carlos José', 'Lopez', '25');

-- ----------------------------
-- Table structure for `estudiantexcurso`
-- ----------------------------
DROP TABLE IF EXISTS `estudiantexcurso`;
CREATE TABLE `estudiantexcurso` (
`cod_cur_estcur` int(11) DEFAULT NULL,
`doc_est_estcur` varchar(11) DEFAULT NULL,
`fec_ini_estcur` date DEFAULT NULL,
KEY `cod_cur_estcur` (`cod_cur_estcur`),
KEY `doc_est_estcur` (`doc_est_estcur`),
CONSTRAINT `estudiantexcurso_ibfk_1` FOREIGN KEY (`cod_cur_estcur`) REFERENCES
`curso` (`cod_curs`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `estudiantexcurso_ibfk_2` FOREIGN KEY (`doc_est_estcur`) REFERENCES
`estudiante` (`doc_est`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- ----------------------------
-- Records of estudiantexcurso
-- ----------------------------
INSERT INTO `estudiantexcurso` VALUES ('289011', '1.098.765.6', '2011-02-01');
INSERT INTO `estudiantexcurso` VALUES ('250067', '63.502.720', '2011-03-01');
INSERT INTO `estudiantexcurso` VALUES ('289011', '1.098.098.0', '2011-02-01');
INSERT INTO `estudiantexcurso` VALUES ('345671', '63.502.720', '2011-04-01');

-- ----------------------------
-- Table structure for `incidentes`
-- ----------------------------
DROP TABLE IF EXISTS `incidentes`;
CREATE TABLE `incidentes` (
`incicodigo` int(11) NOT NULL,
`incifecha` date DEFAULT NULL,
`inciplaca` varchar(6) DEFAULT NULL,
`incilugar` varchar(40) DEFAULT NULL,
`incicantheridos` int(11) DEFAULT NULL,
`incicanfatalidades` int(11) DEFAULT NULL,
`incicanautosinvolucrados` int(11) DEFAULT NULL,
PRIMARY KEY (`incicodigo`),
KEY `inciplaca` (`inciplaca`),
CONSTRAINT `incidentes_ibfk_1` FOREIGN KEY (`inciplaca`) REFERENCES `automotores`
(`autoplaca`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- ----------------------------
-- Records of incidentes
-- ----------------------------
INSERT INTO `incidentes` VALUES ('1', '2012-09-30', 'DKZ820', 'Bucaramanga', '0',
'0', '2');
INSERT INTO `incidentes` VALUES ('2', '2012-09-27', 'FLL420', 'Girón', '1', '0',
'1');
INSERT INTO `incidentes` VALUES ('3', '2011-09-28', 'KJQ920', 'Bucaramanga', '1',
'0', '2');

-- ----------------------------
-- Table structure for `pedido`
-- ----------------------------
DROP TABLE IF EXISTS `pedido`;
CREATE TABLE `pedido` (
`id_ped` int(11) NOT NULL AUTO_INCREMENT,
`id_cli_ped` varchar(11) DEFAULT NULL,
`fec_ped` date DEFAULT NULL,
`val_ped` decimal(18,0) DEFAULT NULL,
PRIMARY KEY (`id_ped`),
KEY `id_cli_ped` (`id_cli_ped`),
CONSTRAINT `pedido_ibfk_1` FOREIGN KEY (`id_cli_ped`) REFERENCES `cliente`
(`id_cli`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;

-- ----------------------------
-- Records of pedido
-- ----------------------------
INSERT INTO `pedido` VALUES ('1', '63502718', '2012-02-25', '120000');
INSERT INTO `pedido` VALUES ('2', '77191956', '2012-04-30', '55000');
INSERT INTO `pedido` VALUES ('3', '63502718', '2011-12-10', '260000');
INSERT INTO `pedido` VALUES ('4', '1098765789', '2012-02-25', '1800000');

-- ----------------------------
-- Table structure for `profesor`
-- ----------------------------
DROP TABLE IF EXISTS `profesor`;
CREATE TABLE `profesor` (
`doc_prof` varchar(11) NOT NULL,
`nom_prof` varchar(30) DEFAULT NULL,
`ape_prof` varchar(30) DEFAULT NULL,
`cate_prof` int(11) DEFAULT NULL,
`sal_prof` int(11) DEFAULT NULL,
PRIMARY KEY (`doc_prof`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- ----------------------------
-- Records of profesor
-- ----------------------------
INSERT INTO `profesor` VALUES ('1.098.765.7', 'Alejandra', 'Torres', '4',
'1100000');
INSERT INTO `profesor` VALUES ('13.826.789', 'Maritza', 'Angarita', '1', '550000');
INSERT INTO `profesor` VALUES ('63.502.720', 'martha', 'rojas', '2', '690000');
INSERT INTO `profesor` VALUES ('91.216,904', 'carlos', 'perez', '3', '950000');

-- ----------------------------
-- Table structure for `tiposautomotores`
-- ----------------------------
DROP TABLE IF EXISTS `tiposautomotores`;
CREATE TABLE `tiposautomotores` (
`auttipo` int(11) NOT NULL,
`autnombre` varchar(30) DEFAULT NULL,
PRIMARY KEY (`auttipo`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- ----------------------------
-- Records of tiposautomotores
-- ----------------------------
INSERT INTO `tiposautomotores` VALUES ('1', 'Automóviles');
INSERT INTO `tiposautomotores` VALUES ('2', 'Camperos');
INSERT INTO `tiposautomotores` VALUES ('3', 'Camiones');

Das könnte Ihnen auch gefallen