Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- SQLyog Ultimate v11.28 (32 bit)
- MySQL - 5.0.51b-community-nt-log : Database - fazunp
- *********************************************************************
- */
- /*!40101 SET NAMES utf8 */;
- /*!40101 SET SQL_MODE=''*/;
- /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
- /*!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' */;
- /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
- CREATE DATABASE /*!32312 IF NOT EXISTS*/`fazunp` /*!40100 DEFAULT CHARACTER SET utf8 */;
- /*Table structure for table `produccion` */
- DROP TABLE IF EXISTS `produccion`;
- CREATE TABLE `produccion` (
- `id` int(10) NOT NULL auto_increment,
- `codigo` int(10) NOT NULL,
- `fecha` date default NULL,
- `mañana` longtext,
- `tarde` longtext,
- `total` longtext,
- `error` varchar(30) default NULL,
- `tipo` varchar(10) default NULL,
- `observacion` varchar(300) default NULL,
- `densidad_m` varchar(10) default NULL,
- `densidad_t` varchar(10) default NULL,
- `densidad_total` varchar(10) default NULL,
- `unidad` varchar(10) default NULL,
- `camp` varchar(2) default NULL,
- PRIMARY KEY (`id`),
- KEY `codigo` (`codigo`),
- CONSTRAINT `produccion_ibfk_1` FOREIGN KEY (`codigo`) REFERENCES `vacunos` (`codigo`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE=InnoDB AUTO_INCREMENT=157 DEFAULT CHARSET=utf8;
- /*Data for the table `produccion` */
- /*Table structure for table `reproduccion` */
- DROP TABLE IF EXISTS `reproduccion`;
- CREATE TABLE `reproduccion` (
- `id` int(10) unsigned NOT NULL auto_increment,
- `codigo` int(10) unsigned NOT NULL,
- `Servicio` int(10) unsigned NOT NULL,
- `diagnostico` int(10) unsigned NOT NULL,
- `Parto` int(10) unsigned NOT NULL,
- `aborto` int(10) unsigned NOT NULL,
- `numero` varchar(10) NOT NULL,
- PRIMARY KEY (`id`),
- KEY `codigo` (`codigo`),
- KEY `diagnostico` (`diagnostico`),
- KEY `parto` (`Parto`),
- KEY `aborto` (`aborto`),
- KEY `servicio` (`Servicio`),
- CONSTRAINT `reproduccion_ibfk_1` FOREIGN KEY (`Servicio`) REFERENCES `servicios` (`Servicio`) ON DELETE CASCADE ON UPDATE CASCADE
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*Data for the table `reproduccion` */
- /*Table structure for table `servicios` */
- DROP TABLE IF EXISTS `servicios`;
- CREATE TABLE `servicios` (
- `id` int(10) NOT NULL auto_increment,
- `Servicio` int(10) unsigned NOT NULL,
- `vacunocod` int(10) default NULL,
- `fecha` date default NULL,
- `hora` time default NULL,
- `tipo` varchar(100) default NULL,
- `toro` varchar(50) default NULL,
- `operador` varchar(100) default NULL,
- `observacion` longtext,
- PRIMARY KEY (`id`),
- KEY `Servicio` (`Servicio`)
- ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
- /*Data for the table `servicios` */
- /*Table structure for table `abortos` */
- DROP TABLE IF EXISTS `abortos`;
- CREATE TABLE `abortos` (
- `id` tinyint(4) NOT NULL auto_increment,
- `codigo` varchar(10) NOT NULL,
- `fecha` date default NULL,
- `operador` varchar(100) default NULL,
- `observacion` text NOT NULL,
- UNIQUE KEY `id` (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
- /*Data for the table `abortos` */
- /*Table structure for table `campanas` */
- DROP TABLE IF EXISTS `diag`;
- CREATE TABLE `diag` (
- `diagnosticoid` tinyint(4) NOT NULL auto_increment,
- `vacunocod` tinyint(4) default NULL,
- `fecha` date default NULL,
- `veterinario` varchar(100) default NULL,
- `preñez` varchar(10) default NULL,
- `fpparto` date default NULL,
- `observacion` longtext,
- PRIMARY KEY (`diagnosticoid`)
- ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
- /*Data for the table `diag` */
- /*Table structure for table `parto` */
- DROP TABLE IF EXISTS `parto`;
- CREATE TABLE `parto` (
- `partoid` tinyint(4) NOT NULL auto_increment,
- `vacunocod` tinyint(4) default NULL,
- `fecha` date default NULL,
- `sexo` varchar(10) default NULL,
- `operador` varchar(100) default NULL,
- `hijocod` varchar(10) default NULL,
- `observacion` longtext,
- PRIMARY KEY (`partoid`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*Data for the table `parto` */
- /*Table structure for table `sanidad` */
- DROP TABLE IF EXISTS `sanidad`;
- CREATE TABLE `sanidad` (
- `id` tinyint(4) NOT NULL auto_increment,
- `vacunocod` varchar(10) default NULL,
- `control` varchar(50) default NULL,
- `fecha` date default NULL,
- `edad` varchar(20) default NULL,
- `tratamiento` varchar(100) default NULL,
- `dosis` varchar(100) default NULL,
- `operador` varchar(100) default NULL,
- `reporte` text,
- `programar` varchar(10) default NULL,
- `realizo` varchar(10) default NULL,
- KEY `id` (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
- /*Data for the table `sanidad` */
- /*Table structure for table `sanidad_control` */
- DROP TABLE IF EXISTS `sanidad_control`;
- CREATE TABLE `sanidad_control` (
- `idvac` tinyint(3) NOT NULL auto_increment,
- `control` varchar(100) default NULL,
- `descripcion` varchar(500) default NULL,
- KEY `idvac` (`idvac`)
- ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
- /*Data for the table `sanidad_control` */
- insert into `sanidad_control`(`idvac`,`control`,`descripcion`) values (1,'TBC','TUBERCULOSIS'),(2,'Mastitis','para la mastitis');
- /*Table structure for table `vacunos` */
- DROP TABLE IF EXISTS `vacunos`;
- CREATE TABLE `vacunos` (
- `codigo` int(10) NOT NULL,
- `nombre` varchar(50) NOT NULL,
- `nacimiento` date default NULL,
- `sexo` varchar(50) default NULL,
- `raza` tinyint(10) default NULL,
- `peso` varchar(10) default NULL,
- `madrecod` varchar(100) NOT NULL,
- `padrecod` varchar(100) NOT NULL,
- `foto` varchar(500) default NULL,
- `pesoUND` varchar(10) default NULL,
- PRIMARY KEY (`codigo`),
- KEY `codigo` (`codigo`),
- KEY `raza` (`raza`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
- /*Data for the table `vacunos` */
- insert into `vacunos`(`codigo`,`nombre`,`nacimiento`,`sexo`,`raza`,`peso`,`madrecod`,`padrecod`,`foto`,`pesoUND`) values (1,'X-11','2009-08-18','HEMBRA',1,'500','','','','KG'),(2,'X-14','2009-12-25','HEMBRA',1,'500','','','','KG'),(3,'X-13','2009-12-20','HEMBRA',1,'500','','','','KG'),(4,'186','2009-09-28','HEMBRA',1,'500','','','','KG'),(5,'214','2010-05-01','HEMBRA',1,'500','','','','KG'),(6,'204','2010-02-26','HEMBRA',1,'500','','','','KG'),(7,'182','2009-12-05','HEMBRA',1,'500','','','','KG');
- /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
- /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
- /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
- /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement