-- MySQL dump 10.13  Distrib 5.5.31, for debian-linux-gnu (x86_64)
--
-- Host: localhost    Database: stage_area
-- ------------------------------------------------------
-- Server version	5.5.31-0+wheezy1

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!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 */;

--
-- Table structure for table `beneficiarios`
--

DROP TABLE IF EXISTS `beneficiarios`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `beneficiarios` (
  `rif` varchar(10) DEFAULT NULL,
  `pais` varchar(200) NOT NULL,
  `nombre` varchar(100) NOT NULL,
  `ventas` int(11) NOT NULL,
  `ue_rif` varchar(10) NOT NULL,
  `anho_r` int(4) NOT NULL,
  `ciiu_principal` varchar(13) NOT NULL,
  `ue_tipo` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `bien`
--

DROP TABLE IF EXISTS `bien`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `bien` (
  `id` int(11) NOT NULL,
  `nombre` varchar(100) NOT NULL,
  `esp_tec` text NOT NULL,
  `codigo_aran` varchar(13) NOT NULL,
  `unidad_medida` varchar(100) NOT NULL,
  `peso` double NOT NULL,
  `planta_id` int(11) NOT NULL,
  `n_consumidores` int(11) NOT NULL,
  `marca` varchar(100) DEFAULT NULL,
  `cantidad_vendida` int(11) DEFAULT NULL,
  `cantidad_producida` int(11) DEFAULT NULL,
  `anyo` varchar(45) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `bien_comercializadonofabricado`
--

DROP TABLE IF EXISTS `bien_comercializadonofabricado`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `bien_comercializadonofabricado` (
  `id` int(11) NOT NULL,
  `nombre` varchar(100) NOT NULL,
  `marca` varchar(100) NOT NULL,
  `codigo_aran_id` varchar(13) NOT NULL,
  `esp_tec` text NOT NULL,
  `unidad_medida` varchar(100) NOT NULL,
  `nacional` char(1) NOT NULL,
  `peso` double NOT NULL,
  `ue_rif` varchar(10) NOT NULL,
  `cantidad` int(11) NOT NULL,
  `anyo` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `cantturnos_municipio_tipoturno_tipoempresa`
--

DROP TABLE IF EXISTS `cantturnos_municipio_tipoturno_tipoempresa`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `cantturnos_municipio_tipoturno_tipoempresa` (
  `ue_ciiu` int(11) DEFAULT NULL,
  `ue_estado` varchar(45) DEFAULT NULL,
  `ue_municipio` varchar(5) DEFAULT NULL,
  `ue_tipo_turno` varchar(60) DEFAULT NULL,
  `ue_tipo_empresa` varchar(150) DEFAULT NULL,
  `cantidad_ues` int(11) DEFAULT NULL,
  `cantidad_turnos` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `cantues_ciiuinsumo_tipoempresa`
--

DROP TABLE IF EXISTS `cantues_ciiuinsumo_tipoempresa`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `cantues_ciiuinsumo_tipoempresa` (
  `ciiu_insumo` varchar(5) NOT NULL,
  `tipo_empresa` varchar(70) NOT NULL,
  `cantidad_ues` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `cantues_ciiuproducto_tipoempresa`
--

DROP TABLE IF EXISTS `cantues_ciiuproducto_tipoempresa`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `cantues_ciiuproducto_tipoempresa` (
  `ciiu_producto` varchar(5) NOT NULL,
  `tipo_empresa` varchar(70) NOT NULL,
  `cantidad_ues` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `consumoenerg_ciiu_tipoempresa`
--

DROP TABLE IF EXISTS `consumoenerg_ciiu_tipoempresa`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `consumoenerg_ciiu_tipoempresa` (
  `ciiu` varchar(5) DEFAULT NULL,
  `tipo_empresa` varchar(70) DEFAULT NULL,
  `sede_consumo_agua` double DEFAULT NULL,
  `sede_consumo_electrico` double DEFAULT NULL,
  `sede_consumo_gas` double DEFAULT NULL,
  `planta_consumo_agua` double DEFAULT NULL,
  `planta_consumo_electrico` double DEFAULT NULL,
  `planta_consumo_gas` double DEFAULT NULL,
  `sucursal_consumo_agua` double DEFAULT NULL,
  `sucursal_consumo_electrico` double DEFAULT NULL,
  `sucursal_consumo_gas` double DEFAULT NULL,
  `total_consumo_agua` double DEFAULT NULL,
  `total_consumo_electrico` double DEFAULT NULL,
  `total_consumo_gas` double DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `consumoenerg_planta_ciiu_tipoempresa`
--

DROP TABLE IF EXISTS `consumoenerg_planta_ciiu_tipoempresa`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `consumoenerg_planta_ciiu_tipoempresa` (
  `ciiu` varchar(5) DEFAULT NULL,
  `tipo_empresa` varchar(70) DEFAULT NULL,
  `consumo_agua` double DEFAULT NULL,
  `consumo_electrico` double DEFAULT NULL,
  `consumo_gas` double DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `consumoenerg_sedeprincipal_ciiu_tipoempresa`
--

DROP TABLE IF EXISTS `consumoenerg_sedeprincipal_ciiu_tipoempresa`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `consumoenerg_sedeprincipal_ciiu_tipoempresa` (
  `ciiu` varchar(5) DEFAULT NULL,
  `tipo_empresa` varchar(70) DEFAULT NULL,
  `consumo_agua` double DEFAULT NULL,
  `consumo_electrico` double DEFAULT NULL,
  `consumo_gas` double DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `consumoenerg_sucursal_ciiu_tipoempresa`
--

DROP TABLE IF EXISTS `consumoenerg_sucursal_ciiu_tipoempresa`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `consumoenerg_sucursal_ciiu_tipoempresa` (
  `ciiu` varchar(5) DEFAULT NULL,
  `tipo_empresa` varchar(70) DEFAULT NULL,
  `consumo_agua` double DEFAULT NULL,
  `consumo_electrico` double DEFAULT NULL,
  `consumo_gas` double DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `correspondencia_codigoaran_ciiu`
--

DROP TABLE IF EXISTS `correspondencia_codigoaran_ciiu`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `correspondencia_codigoaran_ciiu` (
  `codigo_arancelario` varchar(13) NOT NULL,
  `ciiu` varchar(5) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `edadmaquinaria_ciiu_estadomaquinaria_tipoempresa`
--

DROP TABLE IF EXISTS `edadmaquinaria_ciiu_estadomaquinaria_tipoempresa`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `edadmaquinaria_ciiu_estadomaquinaria_tipoempresa` (
  `ue_ciiu` varchar(5) NOT NULL,
  `estado_maquinaria` varchar(45) NOT NULL,
  `tipo_empresa` varchar(70) NOT NULL,
  `sumatoria_edad` int(11) DEFAULT NULL,
  `sumatoria_cantidad_maquinarias` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `insumo`
--

DROP TABLE IF EXISTS `insumo`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `insumo` (
  `id` int(11) NOT NULL,
  `nombre` varchar(100) NOT NULL,
  `esp_tec` text NOT NULL,
  `codigo_aran` varchar(13) NOT NULL,
  `unidad_medida_id` int(11) NOT NULL,
  `peso` double NOT NULL,
  `planta_id` int(11) NOT NULL,
  `n_proveedores` int(11) NOT NULL,
  `marca` varchar(100) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `maquinaria`
--

DROP TABLE IF EXISTS `maquinaria`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `maquinaria` (
  `id` int(15) NOT NULL,
  `nombre` varchar(100) NOT NULL,
  `descripcion` varchar(200) NOT NULL,
  `consumo_electrico` decimal(20,2) NOT NULL,
  `voltaje` decimal(20,2) NOT NULL,
  `potencia` decimal(20,2) NOT NULL,
  `litros_agua` decimal(20,2) NOT NULL,
  `tipo_combustible` varchar(100) DEFAULT NULL,
  `distribucion_componente_id` int(11) NOT NULL,
  `pais_id` int(11) NOT NULL,
  `anho_adq` int(11) NOT NULL,
  `anho_fabricacion` int(4) NOT NULL,
  `vida_util` int(11) NOT NULL,
  `estado_maq_id` int(11) NOT NULL,
  `planta_id` int(11) NOT NULL,
  `anho` int(4) NOT NULL,
  `fecha_insercion` date NOT NULL,
  `fecha_situacion` date NOT NULL,
  `cantidad` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `maquinaria_extra`
--

DROP TABLE IF EXISTS `maquinaria_extra`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `maquinaria_extra` (
  `id` int(15) NOT NULL,
  `nombre` varchar(100) NOT NULL,
  `descripcion` varchar(200) NOT NULL,
  `anho_adq` int(11) NOT NULL,
  `anho_fabricacion` int(4) NOT NULL,
  `vida_util` int(11) NOT NULL,
  `estado_maquinaria` varchar(200) NOT NULL,
  `ue_rif` varchar(13) NOT NULL,
  `ue_ciiu` varchar(20) NOT NULL,
  `ue_planta` varchar(200) NOT NULL,
  `ue_ciudad_planta` varchar(150) NOT NULL,
  `ue_parroquia_planta` varchar(6) NOT NULL,
  `anho` int(4) NOT NULL,
  `cantidad` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `marca`
--

DROP TABLE IF EXISTS `marca`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `marca` (
  `nombre` varchar(250) NOT NULL,
  PRIMARY KEY (`nombre`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `personalocupado`
--

DROP TABLE IF EXISTS `personalocupado`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `personalocupado` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `indirectos` int(11) DEFAULT NULL,
  `tipo_turno` varchar(70) NOT NULL,
  `turnos` int(11) NOT NULL,
  `horas_turnos` int(11) NOT NULL,
  `femeninosf` int(11) NOT NULL,
  `femeninosc` int(11) NOT NULL,
  `masculinof` int(11) NOT NULL,
  `masculinoc` int(11) NOT NULL,
  `administrativo` int(11) NOT NULL,
  `operativo` int(11) NOT NULL,
  `unidad_economica_rif` varchar(10) NOT NULL,
  `anyo` int(11) NOT NULL,
  `activo` varchar(45) DEFAULT NULL,
  UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=961 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `planta`
--

DROP TABLE IF EXISTS `planta`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `planta` (
  `id` int(15) NOT NULL,
  `ue_rif` varchar(10) CHARACTER SET big5 NOT NULL,
  `nombre` varchar(100) NOT NULL,
  `telefono` varchar(20) CHARACTER SET big5 NOT NULL,
  `fax` varchar(20) CHARACTER SET big5 DEFAULT NULL,
  `pag_web` varchar(100) DEFAULT NULL,
  `email` varchar(75) DEFAULT NULL,
  `ciudad` varchar(100) NOT NULL,
  `parroquia_codigo` varchar(6) CHARACTER SET big5 NOT NULL,
  `tipo_tenencia_id` int(11) NOT NULL,
  `tenencia_otra` varchar(100) DEFAULT NULL,
  `m2_terreno` double NOT NULL,
  `m2_construccion` double NOT NULL,
  `tipo_ambito_industrial_id` int(11) DEFAULT NULL,
  `ambito_industrial_otro` varchar(100) DEFAULT NULL,
  `autonomia_electrica` tinyint(1) NOT NULL,
  `dir1` varchar(54) NOT NULL,
  `dir2` varchar(54) NOT NULL,
  `dir3` varchar(54) DEFAULT NULL,
  `dir4` varchar(54) NOT NULL,
  `activo` tinyint(1) NOT NULL,
  `consumo_electrico` decimal(20,2) NOT NULL,
  `consumo_agua` decimal(20,2) NOT NULL,
  `consumo_gas` decimal(20,2) NOT NULL,
  `capacidad_utilizada` decimal(20,2) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id_UNIQUE` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `proveedor`
--

DROP TABLE IF EXISTS `proveedor`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `proveedor` (
  `id` int(11) NOT NULL,
  `nombre` varchar(100) NOT NULL,
  `rif` varchar(10) DEFAULT NULL,
  `pais_origen` varchar(150) DEFAULT NULL,
  `pais_procedencia` varchar(150) DEFAULT NULL,
  `nacional` char(1) NOT NULL,
  `planta_id` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `proveedor_extra`
--

DROP TABLE IF EXISTS `proveedor_extra`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `proveedor_extra` (
  `nombre` varchar(100) NOT NULL,
  `rif` varchar(10) DEFAULT NULL,
  `pais_origen` varchar(150) DEFAULT NULL,
  `pais_procedencia` varchar(150) DEFAULT NULL,
  `nacional` char(1) NOT NULL,
  `planta_id` int(11) NOT NULL,
  `ue_rif` varchar(10) NOT NULL,
  `ue_ciiu` varchar(5) NOT NULL,
  `ue_tipo` varchar(150) NOT NULL,
  `ue_estado` varchar(50) NOT NULL,
  `ue_municipio` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `registro_mercantil`
--

DROP TABLE IF EXISTS `registro_mercantil`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `registro_mercantil` (
  `ue_rif` varchar(10) DEFAULT NULL,
  `capital_social` decimal(25,2) DEFAULT NULL,
  `capital_pagado` decimal(25,2) DEFAULT NULL,
  `capital_contable` decimal(25,2) DEFAULT NULL,
  `naturalezajuridica` varchar(150) DEFAULT NULL,
  `dist_cap_publico_nacional` double DEFAULT NULL,
  `dist_cap_privado_nacional` double DEFAULT NULL,
  `dist_cap_publico_extranjero` double DEFAULT NULL,
  `dist_cap_privado_extranjero` varchar(45) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `representantelegal`
--

DROP TABLE IF EXISTS `representantelegal`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `representantelegal` (
  `id` int(11) NOT NULL,
  `rif` varchar(10) NOT NULL,
  `nacionalidad` char(1) NOT NULL,
  `unidad_economica_rif` varchar(10) NOT NULL,
  `nombre` varchar(140) DEFAULT NULL,
  `cargo` varchar(50) NOT NULL,
  `telefono` varchar(20) NOT NULL,
  `fax` varchar(20) DEFAULT NULL,
  `email` varchar(50) NOT NULL,
  `fecha_insercion` date NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `responsabilidadsocial`
--

DROP TABLE IF EXISTS `responsabilidadsocial`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `responsabilidadsocial` (
  `id` int(11) NOT NULL,
  `ue_rif` varchar(10) NOT NULL,
  `responsabilidad` varchar(45) NOT NULL,
  `aporte_anual` double DEFAULT NULL,
  `descripcion` varchar(255) DEFAULT NULL,
  `beneficiario` varchar(45) DEFAULT NULL,
  `otro_beneficiario` varchar(100) DEFAULT NULL,
  `ue_ciiu` varchar(45) DEFAULT NULL,
  `ue_tipo` varchar(45) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sede_principal`
--

DROP TABLE IF EXISTS `sede_principal`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `sede_principal` (
  `id` int(15) NOT NULL,
  `ue_rif` varchar(10) CHARACTER SET big5 NOT NULL,
  `nombre` varchar(100) NOT NULL,
  `telefono` varchar(20) CHARACTER SET big5 NOT NULL,
  `fax` varchar(20) CHARACTER SET big5 DEFAULT NULL,
  `pag_web` varchar(100) DEFAULT NULL,
  `email` varchar(75) DEFAULT NULL,
  `ciudad` varchar(100) NOT NULL,
  `parroquia_codigo` varchar(6) CHARACTER SET big5 NOT NULL,
  `tipo_tenencia_id` int(11) NOT NULL,
  `tenencia_otra` varchar(100) DEFAULT NULL,
  `m2_terreno` double NOT NULL,
  `m2_construccion` double NOT NULL,
  `tipo_ambito_industrial_id` int(11) DEFAULT NULL,
  `ambito_industrial_otro` varchar(100) DEFAULT NULL,
  `autonomia_electrica` tinyint(1) NOT NULL,
  `dir1` varchar(60) NOT NULL,
  `dir2` varchar(60) NOT NULL,
  `dir3` varchar(60) DEFAULT NULL,
  `dir4` varchar(60) NOT NULL,
  `activo` tinyint(1) NOT NULL,
  `consumo_electrico` decimal(20,2) NOT NULL,
  `consumo_agua` decimal(20,2) NOT NULL,
  `consumo_gas` decimal(20,2) NOT NULL,
  `capacidad_utilizada` decimal(20,2) DEFAULT NULL,
  `tipo_tenencia` varchar(45) DEFAULT NULL,
  `municipio_codigo` varchar(4) DEFAULT NULL,
  `entidad_codigo` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id_UNIQUE` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `servicio`
--

DROP TABLE IF EXISTS `servicio`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `servicio` (
  `id` int(11) NOT NULL,
  `descripcion` varchar(200) NOT NULL,
  `codigo_ciiu` varchar(5) NOT NULL,
  `ue_rif` varchar(10) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `similares`
--

DROP TABLE IF EXISTS `similares`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `similares` (
  `rif` varchar(10) DEFAULT NULL,
  `pais` varchar(200) NOT NULL,
  `nombre` varchar(100) NOT NULL,
  `ue_rif` varchar(10) NOT NULL,
  `anho_r` int(4) NOT NULL,
  `ciiu_principal` varchar(13) NOT NULL,
  `ue_tipo` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `socio`
--

DROP TABLE IF EXISTS `socio`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `socio` (
  `id` int(11) NOT NULL,
  `rif` varchar(30) DEFAULT NULL,
  `ue_rif` varchar(10) NOT NULL,
  `nombre` varchar(140) NOT NULL,
  `nacionalidad` varchar(1) NOT NULL,
  `tipo_persona_id` int(11) NOT NULL,
  `porcentaje` double NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `sucursal`
--

DROP TABLE IF EXISTS `sucursal`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `sucursal` (
  `id` int(15) NOT NULL,
  `ue_rif` varchar(10) CHARACTER SET big5 NOT NULL,
  `nombre` varchar(100) NOT NULL,
  `telefono` varchar(20) CHARACTER SET big5 NOT NULL,
  `fax` varchar(20) CHARACTER SET big5 DEFAULT NULL,
  `pag_web` varchar(100) CHARACTER SET big5 DEFAULT NULL,
  `email` varchar(75) DEFAULT NULL,
  `ciudad` varchar(100) NOT NULL,
  `parroquia_codigo` varchar(6) CHARACTER SET big5 NOT NULL,
  `tipo_tenencia_id` int(11) NOT NULL,
  `tenencia_otra` varchar(100) DEFAULT NULL,
  `m2_terreno` double NOT NULL,
  `m2_construccion` double NOT NULL,
  `tipo_ambito_industrial_id` int(11) DEFAULT NULL,
  `ambito_industrial_otro` varchar(100) DEFAULT NULL,
  `autonomia_electrica` tinyint(1) NOT NULL,
  `dir1` varchar(54) NOT NULL,
  `dir2` varchar(54) NOT NULL,
  `dir3` varchar(54) DEFAULT NULL,
  `dir4` varchar(54) NOT NULL,
  `activo` tinyint(1) NOT NULL,
  `consumo_electrico` decimal(20,2) NOT NULL,
  `consumo_agua` decimal(20,2) NOT NULL,
  `consumo_gas` decimal(20,2) NOT NULL,
  `capacidad_utilizada` decimal(20,2) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id_UNIQUE` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `tipo_actividad_ad_sede_planta`
--

DROP TABLE IF EXISTS `tipo_actividad_ad_sede_planta`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tipo_actividad_ad_sede_planta` (
  `id` int(11) DEFAULT NULL,
  `subunidad_economica_id` int(11) DEFAULT NULL,
  `tipo_actividad_id` int(11) DEFAULT NULL,
  `nombre_actividad_ad` varchar(60) CHARACTER SET utf8 DEFAULT NULL,
  `ue_rif` varchar(10) CHARACTER SET utf8 DEFAULT NULL,
  `tipo_subunidad` varchar(2) CHARACTER SET utf8 DEFAULT NULL,
  `parroquia_codigo` varchar(6) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=big5;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `tipo_ambito`
--

DROP TABLE IF EXISTS `tipo_ambito`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tipo_ambito` (
  `id` int(11) NOT NULL,
  `nombre` varchar(60) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id_UNIQUE` (`id`),
  UNIQUE KEY `nombre_UNIQUE` (`nombre`)
) ENGINE=InnoDB DEFAULT CHARSET=big5;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `tipo_combustible`
--

DROP TABLE IF EXISTS `tipo_combustible`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tipo_combustible` (
  `tipo_combustible` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `tipo_tenencia`
--

DROP TABLE IF EXISTS `tipo_tenencia`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tipo_tenencia` (
  `id` int(11) NOT NULL,
  `nombre` varchar(60) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id_UNIQUE` (`id`),
  UNIQUE KEY `nombre_UNIQUE` (`nombre`)
) ENGINE=InnoDB DEFAULT CHARSET=big5;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `traduccion_dir`
--

DROP TABLE IF EXISTS `traduccion_dir`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `traduccion_dir` (
  `letra` char(1) NOT NULL,
  `traduccion` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`letra`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ue_ciiu_ambito_tipoempresa`
--

DROP TABLE IF EXISTS `ue_ciiu_ambito_tipoempresa`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ue_ciiu_ambito_tipoempresa` (
  `ue_ciiu` varchar(5) CHARACTER SET big5 NOT NULL,
  `ue_ambito` varchar(60) NOT NULL,
  `ue_tipo_empresa` varchar(150) DEFAULT NULL,
  `cantidad_ues` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ue_diff`
--

DROP TABLE IF EXISTS `ue_diff`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ue_diff` (
  `rif` varchar(10) CHARACTER SET latin1 NOT NULL,
  `nombre` varchar(200) CHARACTER SET latin1 DEFAULT NULL,
  `personal_indirecto` int(11) DEFAULT NULL,
  `personal_femenino_contratado` int(11) DEFAULT NULL,
  `personal_femenino_fijo` int(11) DEFAULT NULL,
  `personal_masculino_contratado` int(11) DEFAULT NULL,
  `personal_masculino_fijo` int(11) DEFAULT NULL,
  `tipo_empresa` varchar(150) NOT NULL,
  PRIMARY KEY (`rif`),
  UNIQUE KEY `rif_UNIQUE` (`rif`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ue_full`
--

DROP TABLE IF EXISTS `ue_full`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ue_full` (
  `rif` varchar(10) CHARACTER SET latin1 NOT NULL,
  `nombre` varchar(200) CHARACTER SET latin1 DEFAULT NULL,
  `personal_indirecto` int(11) DEFAULT NULL,
  `personal_femenino_contratado` int(11) DEFAULT NULL,
  `personal_femenino_fijo` int(11) DEFAULT NULL,
  `personal_masculino_contratado` int(11) DEFAULT NULL,
  `personal_masculino_fijo` int(11) DEFAULT NULL,
  `tipo_empresa` varchar(150) NOT NULL,
  `ciiu_principal` varchar(5) DEFAULT NULL,
  PRIMARY KEY (`rif`),
  UNIQUE KEY `rif_UNIQUE` (`rif`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ues_competidoras_y_productos`
--

DROP TABLE IF EXISTS `ues_competidoras_y_productos`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ues_competidoras_y_productos` (
  `nombre_competidora` varchar(100) DEFAULT NULL,
  `rif_competidora` varchar(10) DEFAULT NULL,
  `desc_prod_competidor` longtext,
  `unidad_economica_rif` varchar(10) DEFAULT NULL,
  `anho_r` int(11) DEFAULT NULL,
  `nombre_pais` varchar(100) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ues_parroquia_representantelegal`
--

DROP TABLE IF EXISTS `ues_parroquia_representantelegal`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ues_parroquia_representantelegal` (
  `rif_representante` varchar(10) NOT NULL,
  `ue_rif` varchar(10) NOT NULL,
  `ue_razon_social` varchar(255) NOT NULL,
  `se_estado` varchar(50) NOT NULL,
  `se_municipio` varchar(50) NOT NULL,
  `se_parroquia` varchar(80) NOT NULL,
  `se_direccion` varchar(316) NOT NULL,
  `se_telefono` varchar(20) NOT NULL,
  `se_email` varchar(75) DEFAULT NULL,
  `nombre_representante` varchar(140) DEFAULT NULL,
  `cargo_representante` varchar(50) NOT NULL,
  `telefono_representante` varchar(20) NOT NULL,
  `email_representante` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `ues_parroquia_socio`
--

DROP TABLE IF EXISTS `ues_parroquia_socio`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ues_parroquia_socio` (
  `rif_pasaporte_socio` varchar(30) DEFAULT NULL,
  `ue_rif` varchar(10) NOT NULL,
  `ue_razon_social` varchar(255) NOT NULL,
  `se_estado` varchar(50) NOT NULL,
  `se_municipio` varchar(50) NOT NULL,
  `se_parroquia` varchar(80) NOT NULL,
  `se_direccion` varchar(316) NOT NULL,
  `se_telefono` varchar(20) NOT NULL,
  `se_email` varchar(75) DEFAULT NULL,
  `nombre_socio` varchar(140) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `unidadecon_bien_venta`
--

DROP TABLE IF EXISTS `unidadecon_bien_venta`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `unidadecon_bien_venta` (
  `id` int(11) NOT NULL,
  `nombre` varchar(100) NOT NULL,
  `marca` varchar(100) NOT NULL,
  `codigo_aran_id` varchar(13) NOT NULL,
  `esp_tec` text NOT NULL,
  `unidad_medida_id` int(11) NOT NULL,
  `nacional` tinyint(1) NOT NULL,
  `peso` double NOT NULL,
  `ue_rif` varchar(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=big5;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2013-07-25 10:56:55
