/* SQLyog Community Edition- MySQL GUI v6.05 Host - 5.0.24a-community-nt-log : Database - egresados ********************************************************************* Server version : 5.0.24a-community-nt-log */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; create database if not exists `egresados`; USE `egresados`; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*Table structure for table `correo` */ DROP TABLE IF EXISTS `correo`; CREATE TABLE `correo` ( `cod_correo` decimal(10,0) NOT NULL, `correo` varchar(50) NOT NULL, `cod_egresado` decimal(10,0) NOT NULL, PRIMARY KEY (`cod_correo`), KEY `egresado` (`cod_egresado`), CONSTRAINT `FK_correo` FOREIGN KEY (`cod_egresado`) REFERENCES `egresado` (`cod_egresado`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC; /*Data for the table `correo` */ insert into `correo`(`cod_correo`,`correo`,`cod_egresado`) values ('101','sandra@heaven.net','1001'),('102','sandrita@gordita.com','1001'); /*Table structure for table `curso` */ DROP TABLE IF EXISTS `curso`; CREATE TABLE `curso` ( `cod_curso` decimal(10,0) NOT NULL, `nombre` varchar(50) NOT NULL, `institucion` varchar(120) NOT NULL, `ciudad` varchar(80) NOT NULL, `departamento` varchar(60) NOT NULL, `pais` varchar(30) NOT NULL, `fecha_inicio` varchar(10) NOT NULL, `fecha_final` varchar(10) NOT NULL, `cod_egresado` decimal(10,0) NOT NULL, PRIMARY KEY (`cod_curso`), KEY `cod_egresado` (`cod_egresado`), CONSTRAINT `FK_curso` FOREIGN KEY (`cod_egresado`) REFERENCES `egresado` (`cod_egresado`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC; /*Data for the table `curso` */ insert into `curso`(`cod_curso`,`nombre`,`institucion`,`ciudad`,`departamento`,`pais`,`fecha_inicio`,`fecha_final`,`cod_egresado`) values ('1','C++','Builder C++','Medellin','Antioquia','Colombia','2005-10-25','2011-11-25','1001'); /*Table structure for table `egresado` */ DROP TABLE IF EXISTS `egresado`; CREATE TABLE `egresado` ( `cod_egresado` decimal(10,0) NOT NULL, `nombre` varchar(50) NOT NULL, `apellidos` varchar(80) NOT NULL, `cedula` varchar(20) NOT NULL, `fecha_nacimiento` date NOT NULL, `direccion` varchar(40) NOT NULL, `ciudad` varchar(40) NOT NULL, `pais` varchar(40) NOT NULL, `estado_civil` varchar(40) NOT NULL, `genero` varchar(1) NOT NULL, `clave` varchar(8) NOT NULL, PRIMARY KEY (`cod_egresado`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC; /*Data for the table `egresado` */ insert into `egresado`(`cod_egresado`,`nombre`,`apellidos`,`cedula`,`fecha_nacimiento`,`direccion`,`ciudad`,`pais`,`estado_civil`,`genero`,`clave`) values ('1001','SANDRA MILENA','RODRIGUEZ MONCADA','37440532','1981-10-24','Colinas Hermosas','Bogota','Colombia','1','F','soy15'),('1002','san','san','292387','1982-08-03','alkj','kjh','kjh','soltera','F','soso'); /*Table structure for table `egresadoxidiomaxhabilidad` */ DROP TABLE IF EXISTS `egresadoxidiomaxhabilidad`; CREATE TABLE `egresadoxidiomaxhabilidad` ( `cod_egresado` decimal(10,0) NOT NULL, `cod_idioma` decimal(10,0) NOT NULL, `cod_habilidad` decimal(10,0) NOT NULL, PRIMARY KEY (`cod_egresado`,`cod_idioma`,`cod_habilidad`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC; /*Data for the table `egresadoxidiomaxhabilidad` */ insert into `egresadoxidiomaxhabilidad`(`cod_egresado`,`cod_idioma`,`cod_habilidad`) values ('1001','1','1'),('1001','1','2'),('1001','2','1'),('1001','2','3'),('1001','3','1'); /*Table structure for table `estudio_academico` */ DROP TABLE IF EXISTS `estudio_academico`; CREATE TABLE `estudio_academico` ( `cod_estudio` decimal(10,0) NOT NULL, `institucion` varchar(120) NOT NULL, `ciudad` varchar(50) NOT NULL, `departamento` varchar(80) NOT NULL, `pais` varchar(80) NOT NULL, `modalidad` varchar(30) NOT NULL, `titulo` varchar(120) NOT NULL, `fecha` varchar(10) NOT NULL, `cod_egresado` decimal(10,0) NOT NULL, PRIMARY KEY (`cod_estudio`), KEY `cod_egresado` (`cod_egresado`), CONSTRAINT `FK_estudio_academico` FOREIGN KEY (`cod_egresado`) REFERENCES `egresado` (`cod_egresado`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC; /*Data for the table `estudio_academico` */ insert into `estudio_academico`(`cod_estudio`,`institucion`,`ciudad`,`departamento`,`pais`,`modalidad`,`titulo`,`fecha`,`cod_egresado`) values ('10001','Universidad Libre de Colombia','Norte de Santander','Norte de Santander','colombia','pregrado','Ingeniero Industrial','2000-1','1001'),('10002','Sena','Norte de Santander','Norte de Santander','Colombia','pregrado','Supervisora de Censos','2000-1','1001'),('10003','Universidad Libre de Colombia','Cucuta','Norte de Santander','Colombia','2','Auditora Industrial','2010-9','1001'); /*Table structure for table `evento` */ DROP TABLE IF EXISTS `evento`; CREATE TABLE `evento` ( `cod_evento` decimal(10,0) NOT NULL, `nombre` varchar(150) NOT NULL, `ciudad` varchar(80) NOT NULL, `departamento` varchar(60) NOT NULL, `pais` varchar(30) NOT NULL, `fecha_inicio` varchar(10) NOT NULL, `fecha_final` varchar(10) NOT NULL, `rol` varchar(20) NOT NULL, `cod_egresado` decimal(10,0) NOT NULL, PRIMARY KEY (`cod_evento`), KEY `cod_egresado` (`cod_egresado`), CONSTRAINT `FK_evento` FOREIGN KEY (`cod_egresado`) REFERENCES `egresado` (`cod_egresado`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC; /*Data for the table `evento` */ insert into `evento`(`cod_evento`,`nombre`,`ciudad`,`departamento`,`pais`,`fecha_inicio`,`fecha_final`,`rol`,`cod_egresado`) values ('101','Congreso Comunicacion','Cali','Valle del Cauca','Colombia','2003-04-05','2003-04-10','participante','1001'),('102','Congreso IA','Norte de Santander','Norte de Santander','Colombia','2000-1','2000-1','organizador','1001'); /*Table structure for table `experiencia` */ DROP TABLE IF EXISTS `experiencia`; CREATE TABLE `experiencia` ( `cod_experiencia` decimal(10,0) NOT NULL, `empresa` varchar(70) NOT NULL, `cargo` varchar(80) NOT NULL, `fecha_inicio` varchar(10) NOT NULL, `fecha_final` varchar(10) NOT NULL, `ciudad` varchar(60) NOT NULL, `departamento` varchar(60) NOT NULL, `pais` varchar(30) NOT NULL, `direccion` varchar(70) NOT NULL, `telefono` varchar(20) NOT NULL, `cod_egresado` decimal(10,0) NOT NULL, PRIMARY KEY (`cod_experiencia`), KEY `cod_egresado` (`cod_egresado`), CONSTRAINT `FK_experiencia` FOREIGN KEY (`cod_egresado`) REFERENCES `egresado` (`cod_egresado`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC; /*Data for the table `experiencia` */ insert into `experiencia`(`cod_experiencia`,`empresa`,`cargo`,`fecha_inicio`,`fecha_final`,`ciudad`,`departamento`,`pais`,`direccion`,`telefono`,`cod_egresado`) values ('10001','Progreso','Gerentes','2000-1','2000-1','Cucuta','Norte de Santander','colombia','Cenabastos Galpon Azumarillo','5781917','1001'),('10002','IBM','Gerente General','2008-7','2008-7','Barcelona','Cataluña','España','Calle Reina','+09546823934','1001'); /*Table structure for table `habilidad` */ DROP TABLE IF EXISTS `habilidad`; CREATE TABLE `habilidad` ( `cod_habilidad` decimal(10,0) NOT NULL, `habilidad` varchar(30) NOT NULL, PRIMARY KEY (`cod_habilidad`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC; /*Data for the table `habilidad` */ insert into `habilidad`(`cod_habilidad`,`habilidad`) values ('1','Lectura'),('2','Escritura'),('3','Conversacion'); /*Table structure for table `idioma` */ DROP TABLE IF EXISTS `idioma`; CREATE TABLE `idioma` ( `cod_idioma` decimal(10,0) NOT NULL, `idioma` varchar(50) NOT NULL, PRIMARY KEY (`cod_idioma`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC; /*Data for the table `idioma` */ insert into `idioma`(`cod_idioma`,`idioma`) values ('1','Ingles'),('2','Frances'),('3','Italiano'),('4','Portugues'),('5','Aleman'); /*Table structure for table `idiomaxegresado` */ DROP TABLE IF EXISTS `idiomaxegresado`; CREATE TABLE `idiomaxegresado` ( `cod_egresado` decimal(10,0) NOT NULL, `cod_idioma` decimal(10,0) NOT NULL, PRIMARY KEY (`cod_egresado`,`cod_idioma`), KEY `idioma` (`cod_idioma`), CONSTRAINT `FK_idiomaxegresado` FOREIGN KEY (`cod_idioma`) REFERENCES `idioma` (`cod_idioma`), CONSTRAINT `FK_idiomaxegresado23` FOREIGN KEY (`cod_egresado`) REFERENCES `egresado` (`cod_egresado`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC; /*Data for the table `idiomaxegresado` */ insert into `idiomaxegresado`(`cod_egresado`,`cod_idioma`) values ('1001','1'),('1001','2'),('1001','3'); /*Table structure for table `maxcodcorreo` */ DROP TABLE IF EXISTS `maxcodcorreo`; /*!50001 DROP VIEW IF EXISTS `maxcodcorreo` */; /*!50001 DROP TABLE IF EXISTS `maxcodcorreo` */; /*!50001 CREATE TABLE `maxcodcorreo` ( `cod` decimal(11,0) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 */; /*Table structure for table `maxcodcurso` */ DROP TABLE IF EXISTS `maxcodcurso`; /*!50001 DROP VIEW IF EXISTS `maxcodcurso` */; /*!50001 DROP TABLE IF EXISTS `maxcodcurso` */; /*!50001 CREATE TABLE `maxcodcurso` ( `cod` decimal(11,0) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 */; /*Table structure for table `maxcodestudio` */ DROP TABLE IF EXISTS `maxcodestudio`; /*!50001 DROP VIEW IF EXISTS `maxcodestudio` */; /*!50001 DROP TABLE IF EXISTS `maxcodestudio` */; /*!50001 CREATE TABLE `maxcodestudio` ( `cod` decimal(11,0) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 */; /*Table structure for table `maxcodevento` */ DROP TABLE IF EXISTS `maxcodevento`; /*!50001 DROP VIEW IF EXISTS `maxcodevento` */; /*!50001 DROP TABLE IF EXISTS `maxcodevento` */; /*!50001 CREATE TABLE `maxcodevento` ( `cod` decimal(11,0) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 */; /*Table structure for table `maxcodexperiencia` */ DROP TABLE IF EXISTS `maxcodexperiencia`; /*!50001 DROP VIEW IF EXISTS `maxcodexperiencia` */; /*!50001 DROP TABLE IF EXISTS `maxcodexperiencia` */; /*!50001 CREATE TABLE `maxcodexperiencia` ( `cod` decimal(11,0) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 */; /*Table structure for table `maxcodtelefono` */ DROP TABLE IF EXISTS `maxcodtelefono`; /*!50001 DROP VIEW IF EXISTS `maxcodtelefono` */; /*!50001 DROP TABLE IF EXISTS `maxcodtelefono` */; /*!50001 CREATE TABLE `maxcodtelefono` ( `cod` decimal(11,0) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 */; /*Table structure for table `sessions` */ DROP TABLE IF EXISTS `sessions`; CREATE TABLE `sessions` ( `session_id` varchar(100) NOT NULL default '', `session_data` text NOT NULL, `expires` int(11) NOT NULL default '0', `ip` varchar(12) NOT NULL, PRIMARY KEY (`session_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*Data for the table `sessions` */ insert into `sessions`(`session_id`,`session_data`,`expires`,`ip`) values ('e225638e0b2f1ba311d26f47dc70aef9','1002',1192766231,'127.0.0.1'); /*Table structure for table `telefono` */ DROP TABLE IF EXISTS `telefono`; CREATE TABLE `telefono` ( `cod_telefono` decimal(10,0) NOT NULL, `telefono` varchar(20) NOT NULL, `cod_egresado` decimal(10,0) NOT NULL, PRIMARY KEY (`cod_telefono`), KEY `cod_egresado` (`cod_egresado`), CONSTRAINT `FK_telefono` FOREIGN KEY (`cod_egresado`) REFERENCES `egresado` (`cod_egresado`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC; /*Data for the table `telefono` */ insert into `telefono`(`cod_telefono`,`telefono`,`cod_egresado`) values ('101','0975753763','1001'),('102','3103446622','1001'); /*View structure for view maxcodcorreo */ /*!50001 DROP TABLE IF EXISTS `maxcodcorreo` */; /*!50001 DROP VIEW IF EXISTS `maxcodcorreo` */; /*!50001 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `maxcodcorreo` AS (select max((`correo`.`cod_correo` + 1)) AS `cod` from `correo`) */; /*View structure for view maxcodcurso */ /*!50001 DROP TABLE IF EXISTS `maxcodcurso` */; /*!50001 DROP VIEW IF EXISTS `maxcodcurso` */; /*!50001 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `maxcodcurso` AS (select max((`curso`.`cod_curso` + 1)) AS `cod` from `curso`) */; /*View structure for view maxcodestudio */ /*!50001 DROP TABLE IF EXISTS `maxcodestudio` */; /*!50001 DROP VIEW IF EXISTS `maxcodestudio` */; /*!50001 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `maxcodestudio` AS (select max((`estudio_academico`.`cod_estudio` + 1)) AS `cod` from `estudio_academico`) */; /*View structure for view maxcodevento */ /*!50001 DROP TABLE IF EXISTS `maxcodevento` */; /*!50001 DROP VIEW IF EXISTS `maxcodevento` */; /*!50001 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `maxcodevento` AS (select max((`evento`.`cod_evento` + 1)) AS `cod` from `evento`) */; /*View structure for view maxcodexperiencia */ /*!50001 DROP TABLE IF EXISTS `maxcodexperiencia` */; /*!50001 DROP VIEW IF EXISTS `maxcodexperiencia` */; /*!50001 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `maxcodexperiencia` AS (select max((`experiencia`.`cod_experiencia` + 1)) AS `cod` from `experiencia`) */; /*View structure for view maxcodtelefono */ /*!50001 DROP TABLE IF EXISTS `maxcodtelefono` */; /*!50001 DROP VIEW IF EXISTS `maxcodtelefono` */; /*!50001 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `maxcodtelefono` AS (select max((`telefono`.`cod_telefono` + 1)) AS `cod` from `telefono`) */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;