-- phpMyAdmin SQL Dump
-- version 3.3.9
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tempo de Geração: Abr 05, 2011 as 09:40 
-- Versão do Servidor: 5.5.8
-- Versão do PHP: 5.3.5

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";


/*!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 */;

--
-- Banco de Dados: `adm_exerc_sql`
--

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

--
-- Estrutura da tabela `acoes`
--

DROP TABLE IF EXISTS `acoes`;
CREATE TABLE IF NOT EXISTS `acoes` (
  `id_acao` smallint(6) NOT NULL,
  `tx_nome_acao` char(15) COLLATE utf8_bin NOT NULL,
  `tx_descricao_acao` varchar(45) COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`id_acao`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `acoes`
--

INSERT INTO `acoes` (`id_acao`, `tx_nome_acao`, `tx_descricao_acao`) VALUES
(10, 'Gerenciar', 'Gerenciar/Advertir'),
(20, 'Or', 'Estimar or'),
(30, 'Definir', 'Definir Especifica'),
(40, 'Lid_erar', 'Lid_erar times de programa'),
(50, 'Especificar', 'Documentador de Especifica'),
(60, 'An.Neg', 'Descritor das regras de neg'),
(70, 'Codificar', 'Codificar linhas de programas'),
(80, 'Testar Progrs', 'Teste de programas conclu'),
(90, 'AdmPesqSist', 'Administrar o Sistema de Pesquisa (Prospec'),
(100, 'Ensinar', 'Dar aulas de TI'),
(110, 'Montar Cursos', 'Desenvolver material de Cursos'),
(120, 'Suporte Pessoal', 'Surporte de Pessoal'),
(130, 'Operar', 'Operar sistemas de informa'),
(140, 'Manutenir', 'Fazer a manuten'),
(150, 'AdmSistInfor', 'Administrar Sistemas de Informa'),
(160, 'AdmDataBase', 'Administrar Bases de Dados'),
(170, 'Adm Com. Dados', 'Administrar a rede de Dados'),
(180, 'Documentar', 'Documentar as opera');

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

--
-- Estrutura da tabela `acoes_projetos`
--

DROP TABLE IF EXISTS `acoes_projetos`;
CREATE TABLE IF NOT EXISTS `acoes_projetos` (
  `id_projeto` char(6) COLLATE utf8_bin NOT NULL,
  `id_acao` smallint(6) NOT NULL,
  PRIMARY KEY (`id_projeto`,`id_acao`),
  KEY `id_projeto` (`id_projeto`),
  KEY `id_acao` (`id_acao`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `acoes_projetos`
--

INSERT INTO `acoes_projetos` (`id_projeto`, `id_acao`) VALUES
('AD2323', 10),
('AD3100', 10),
('AD3110', 10),
('AD3112', 10),
('AD3113', 10),
('AD9999', 10),
('IF1000', 10),
('IF2000', 10),
('MA2100', 10),
('MA2110', 10),
('MA2111', 10),
('MA2112', 10),
('MA2113', 10),
('OP2000', 10),
('OP2010', 10),
('OP2011', 10),
('OP2012', 10),
('OP2013', 10),
('PL2100', 10),
('AD2323', 20),
('AD3100', 20),
('AD3110', 20),
('AD3112', 20),
('AD3113', 20),
('AD9999', 20),
('IF1000', 20),
('IF2000', 20),
('MA2100', 20),
('MA2110', 20),
('MA2111', 20),
('MA2112', 20),
('MA2113', 20),
('OP2000', 20),
('OP2010', 20),
('OP2011', 20),
('OP2012', 20),
('OP2013', 20),
('PL2100', 20),
('AD3100', 30),
('IF1000', 30),
('MA2100', 30),
('MA2110', 30),
('MA2112', 30),
('PL2100', 30),
('AD3100', 40),
('IF1000', 40),
('MA2100', 40),
('MA2110', 40),
('MA2111', 40),
('MA2112', 40),
('PL2100', 40),
('AD3100', 50),
('IF1000', 50),
('MA2100', 50),
('MA2110', 50),
('MA2111', 50),
('MA2112', 50),
('PL2100', 50),
('AD3100', 60),
('AD3112', 60),
('AD3113', 60),
('AD9999', 60),
('IF1000', 60),
('MA2100', 60),
('MA2110', 60),
('MA2111', 60),
('MA2112', 60),
('MA2113', 60),
('PL2100', 60),
('AD3100', 70),
('AD3112', 70),
('AD3113', 70),
('AD9999', 70),
('IF1000', 70),
('MA2100', 70),
('MA2110', 70),
('MA2112', 70),
('MA2113', 70),
('PL2100', 70),
('AD3100', 80),
('AD3112', 80),
('AD3113', 80),
('AD9999', 80),
('IF1000', 80),
('MA2100', 80),
('MA2110', 80),
('MA2112', 80),
('MA2113', 80),
('PL2100', 80),
('AD3100', 90),
('IF1000', 90),
('MA2100', 90),
('MA2110', 90),
('MA2112', 90),
('PL2100', 90),
('AD3100', 100),
('IF1000', 100),
('IF2000', 100),
('MA2100', 100),
('MA2110', 100),
('MA2112', 100),
('PL2100', 100),
('AD3100', 110),
('IF1000', 110),
('IF2000', 110),
('MA2100', 110),
('MA2110', 110),
('MA2112', 110),
('PL2100', 110),
('AD3100', 120),
('IF1000', 120),
('MA2100', 120),
('MA2110', 120),
('MA2112', 120),
('PL2100', 120),
('AD3100', 130),
('IF1000', 130),
('MA2100', 130),
('MA2110', 130),
('MA2112', 130),
('PL2100', 130),
('AD3100', 140),
('IF1000', 140),
('MA2100', 140),
('MA2110', 140),
('MA2112', 140),
('OP2011', 140),
('OP2013', 140),
('PL2100', 140),
('AD3100', 150),
('IF1000', 150),
('MA2100', 150),
('MA2110', 150),
('MA2112', 150),
('OP2011', 150),
('PL2100', 150),
('AD3100', 160),
('IF1000', 160),
('MA2100', 160),
('MA2110', 160),
('MA2112', 160),
('OP2012', 160),
('PL2100', 160),
('AD3100', 170),
('IF1000', 170),
('MA2100', 170),
('MA2110', 170),
('MA2112', 170),
('OP2013', 170),
('PL2100', 170),
('AD3100', 180),
('AD3112', 180),
('AD3113', 180),
('AD9999', 180),
('IF1000', 180),
('MA2100', 180),
('MA2110', 180),
('MA2112', 180),
('MA2113', 180),
('PL2100', 180);

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

--
-- Estrutura da tabela `area_conhecimento_livros`
--

DROP TABLE IF EXISTS `area_conhecimento_livros`;
CREATE TABLE IF NOT EXISTS `area_conhecimento_livros` (
  `id_area_conhecimento` int(3) NOT NULL,
  `id_livro` int(9) NOT NULL,
  PRIMARY KEY (`id_area_conhecimento`,`id_livro`),
  KEY `id_area_conhecimento` (`id_area_conhecimento`),
  KEY `id_livro` (`id_livro`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `area_conhecimento_livros`
--


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

--
-- Estrutura da tabela `area_de_conhecimento`
--

DROP TABLE IF EXISTS `area_de_conhecimento`;
CREATE TABLE IF NOT EXISTS `area_de_conhecimento` (
  `id_area_conhecimento` int(3) NOT NULL,
  `tx_nome_area` varchar(250) COLLATE utf8_bin NOT NULL,
  `dt_cadastro` date NOT NULL,
  PRIMARY KEY (`id_area_conhecimento`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `area_de_conhecimento`
--

INSERT INTO `area_de_conhecimento` (`id_area_conhecimento`, `tx_nome_area`, `dt_cadastro`) VALUES
(1, 'exatas', '2001-01-01'),
(2, 'humanid_ades', '2001-01-01'),
(3, 'biom', '2001-01-01'),
(4, 'ciencias ambientais', '2001-01-01'),
(5, 'ciencias exatas', '2010-12-16'),
(6, 'humanas', '2010-12-16'),
(7, 'Astronomia', '1960-10-12');

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

--
-- Estrutura da tabela `armazens`
--

DROP TABLE IF EXISTS `armazens`;
CREATE TABLE IF NOT EXISTS `armazens` (
  `id_armazem` int(4) NOT NULL,
  `tx_nome_armazem` varchar(20) COLLATE utf8_bin NOT NULL,
  `id_regiao` int(3) DEFAULT NULL,
  `tx_endereco` varchar(120) COLLATE utf8_bin NOT NULL,
  `qt_area` double(15,2) NOT NULL,
  PRIMARY KEY (`id_armazem`),
  KEY `id_regiao` (`id_regiao`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `armazens`
--

INSERT INTO `armazens` (`id_armazem`, `tx_nome_armazem`, `id_regiao`, `tx_endereco`, `qt_area`) VALUES
(1, 'São domingos', 1, 'Rod. Anhaguera, 25 - Vila Siqueira', 20000.00),
(2, 'São Sebastião', 1, 'Rod. Castelo Branco, 35 - Camp', 50000.00),
(3, 'Rio de Janeiro - 01', 1, 'Av. Vital Brasil, 6500', 20000.00),
(5, 'Dois Irmãos', 1, 'R. Pelotas, 985', 15000.00);

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

--
-- Estrutura da tabela `atividades`
--

DROP TABLE IF EXISTS `atividades`;
CREATE TABLE IF NOT EXISTS `atividades` (
  `id_atividade` int(4) NOT NULL,
  `tx_nome_atividade` varchar(200) COLLATE utf8_bin NOT NULL,
  `dt_cadastro` date NOT NULL,
  PRIMARY KEY (`id_atividade`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `atividades`
--


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

--
-- Estrutura da tabela `atribuicoes`
--

DROP TABLE IF EXISTS `atribuicoes`;
CREATE TABLE IF NOT EXISTS `atribuicoes` (
  `id_professor` int(3) NOT NULL,
  `id_disciplina` int(4) NOT NULL,
  `dt_atribuicao` date NOT NULL,
  PRIMARY KEY (`id_professor`,`id_disciplina`),
  KEY `id_professor` (`id_professor`),
  KEY `id_disciplina` (`id_disciplina`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `atribuicoes`
--

INSERT INTO `atribuicoes` (`id_professor`, `id_disciplina`, `dt_atribuicao`) VALUES
(1, 1, '0000-00-00'),
(1, 2, '0000-00-00'),
(1, 3, '0000-00-00'),
(1, 4, '0000-00-00'),
(2, 1, '0000-00-00'),
(2, 2, '0000-00-00'),
(2, 3, '0000-00-00'),
(2, 4, '0000-00-00'),
(3, 5, '0000-00-00'),
(3, 6, '0000-00-00'),
(3, 7, '0000-00-00'),
(3, 8, '0000-00-00'),
(4, 5, '0000-00-00'),
(4, 6, '0000-00-00'),
(4, 7, '0000-00-00'),
(4, 8, '0000-00-00'),
(5, 5, '0000-00-00'),
(5, 6, '0000-00-00'),
(5, 7, '0000-00-00'),
(5, 8, '0000-00-00'),
(6, 9, '0000-00-00'),
(6, 10, '0000-00-00'),
(7, 9, '0000-00-00'),
(7, 10, '0000-00-00'),
(7, 17, '0000-00-00'),
(7, 18, '0000-00-00'),
(7, 19, '0000-00-00'),
(7, 20, '0000-00-00'),
(7, 21, '0000-00-00'),
(7, 22, '0000-00-00'),
(8, 11, '0000-00-00'),
(8, 12, '0000-00-00'),
(9, 11, '0000-00-00'),
(9, 12, '0000-00-00'),
(10, 11, '0000-00-00'),
(11, 13, '0000-00-00'),
(11, 14, '0000-00-00'),
(12, 13, '0000-00-00'),
(12, 14, '0000-00-00'),
(13, 13, '0000-00-00'),
(13, 14, '0000-00-00'),
(14, 13, '0000-00-00'),
(14, 14, '0000-00-00'),
(15, 15, '0000-00-00'),
(15, 16, '0000-00-00'),
(16, 15, '0000-00-00'),
(16, 16, '0000-00-00'),
(17, 15, '0000-00-00'),
(17, 16, '0000-00-00'),
(18, 15, '0000-00-00'),
(18, 16, '0000-00-00'),
(19, 17, '0000-00-00'),
(19, 18, '0000-00-00'),
(20, 17, '0000-00-00'),
(20, 18, '0000-00-00'),
(21, 17, '0000-00-00'),
(22, 19, '0000-00-00'),
(22, 20, '0000-00-00'),
(23, 19, '0000-00-00'),
(23, 20, '0000-00-00'),
(24, 19, '0000-00-00'),
(24, 20, '0000-00-00'),
(25, 19, '0000-00-00'),
(25, 20, '0000-00-00'),
(27, 21, '0000-00-00'),
(27, 22, '0000-00-00'),
(28, 21, '0000-00-00'),
(28, 22, '0000-00-00');

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

--
-- Estrutura da tabela `atuacoes`
--

DROP TABLE IF EXISTS `atuacoes`;
CREATE TABLE IF NOT EXISTS `atuacoes` (
  `id_projeto` char(6) COLLATE utf8_bin NOT NULL,
  `id_funcionario` int(6) NOT NULL,
  `dt_inicio` date NOT NULL DEFAULT '0000-00-00',
  `dt_termino` date DEFAULT NULL,
  `qt_tempo_duracao` decimal(5,2) NOT NULL,
  PRIMARY KEY (`id_projeto`,`id_funcionario`,`dt_inicio`),
  KEY `id_projeto` (`id_projeto`),
  KEY `id_funcionario` (`id_funcionario`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `atuacoes`
--

INSERT INTO `atuacoes` (`id_projeto`, `id_funcionario`, `dt_inicio`, `dt_termino`, `qt_tempo_duracao`) VALUES
('AD2333', 10, '2009-01-20', '2009-02-10', 80.00),
('AD2333', 20, '2009-02-11', '2009-03-02', 80.00),
('AD2333', 50, '2009-01-20', '2009-02-10', 80.00),
('AD2333', 60, '2009-04-01', '2009-04-30', 80.00),
('AD2333', 90, '2009-03-10', '2009-03-31', 80.00),
('AD2333', 130, '2009-03-10', '2009-03-31', 80.00),
('AD2333', 160, '2009-06-01', '2009-06-30', 80.00),
('AD2333', 170, '2009-01-20', '2009-02-10', 80.00),
('AD2333', 180, '2009-01-20', '2009-02-10', 80.00),
('AD2333', 190, '2009-02-11', '2009-03-02', 80.00),
('AD2333', 200, '2009-03-10', '2009-03-31', 80.00),
('AD2333', 210, '2009-03-10', '2009-03-31', 80.00),
('AD2333', 220, '2009-03-10', '2009-03-31', 80.00),
('AD2333', 240, '2009-06-01', '2009-06-30', 80.00),
('AD2333', 270, '2009-01-20', '2009-02-10', 80.00),
('AD2333', 280, '2009-02-11', '2009-03-02', 80.00),
('AD2333', 300, '2009-03-10', '2009-03-31', 80.00),
('AD2333', 310, '2009-04-01', '2009-04-30', 80.00),
('AD2333', 340, '2009-05-02', '2009-05-30', 80.00),
('AD2333', 360, '2009-05-02', '2009-05-30', 80.00),
('AD2333', 370, '2009-02-11', '2009-03-02', 80.00),
('AD2333', 380, '2009-02-11', '2009-03-02', 80.00),
('AD2333', 390, '2009-02-11', '2009-03-02', 80.00),
('AD2333', 400, '2009-04-01', '2009-04-30', 80.00),
('AD2333', 410, '2009-04-01', '2009-04-30', 80.00),
('AD2333', 420, '2009-04-01', '2009-04-30', 80.00),
('AD2333', 430, '2009-06-30', '2009-07-25', 80.00),
('AD2333', 440, '2009-02-11', '2009-03-02', 80.00),
('AD3100', 10, '2009-02-11', '2009-03-02', 120.00),
('AD3100', 20, '2009-03-03', '2009-03-30', 120.00),
('AD3100', 50, '2009-02-11', '2009-03-02', 120.00),
('AD3100', 60, '2009-05-02', '2009-05-30', 120.00),
('AD3100', 90, '2009-04-01', '2009-04-30', 120.00),
('AD3100', 130, '2009-04-01', '2009-04-30', 120.00),
('AD3100', 160, '2009-06-30', '2009-07-25', 120.00),
('AD3100', 170, '2009-02-11', '2009-03-02', 120.00),
('AD3100', 180, '2009-02-11', '2009-03-02', 120.00),
('AD3100', 190, '2009-03-03', '2009-03-30', 120.00),
('AD3100', 200, '2009-04-01', '2009-04-30', 120.00),
('AD3100', 210, '2009-04-01', '2009-04-30', 120.00),
('AD3100', 220, '2009-04-01', '2009-04-30', 120.00),
('AD3100', 240, '2009-05-02', '2009-05-30', 120.00),
('AD3100', 270, '2009-02-11', '2009-03-02', 120.00),
('AD3100', 280, '2009-03-03', '2009-03-30', 120.00),
('AD3100', 300, '2009-02-11', '2009-03-02', 120.00),
('AD3100', 300, '2009-03-03', '2009-03-30', 100.00),
('AD3100', 310, '2009-03-10', '2009-03-31', 120.00),
('AD3100', 340, '2009-04-01', '2009-04-30', 120.00),
('AD3100', 360, '2009-05-02', '2009-05-30', 120.00),
('AD3100', 360, '2009-06-30', '2009-07-25', 100.00),
('AD3100', 370, '2009-03-03', '2009-03-30', 120.00),
('AD3100', 380, '2009-03-03', '2009-03-30', 120.00),
('AD3100', 390, '2009-03-03', '2009-03-30', 120.00),
('AD3100', 400, '2009-05-02', '2009-05-30', 120.00),
('AD3100', 410, '2009-05-02', '2009-05-30', 120.00),
('AD3100', 420, '2009-05-02', '2009-05-30', 120.00),
('AD3100', 430, '2009-06-01', '2009-06-30', 120.00),
('AD3100', 440, '2009-01-20', '2009-02-10', 120.00),
('AD3110', 10, '2009-03-03', '2009-03-30', 120.00),
('AD3110', 20, '2009-01-20', '2009-02-10', 120.00),
('AD3110', 50, '2009-03-03', '2009-03-30', 120.00),
('AD3110', 60, '2009-03-10', '2009-03-31', 120.00),
('AD3110', 90, '2009-05-02', '2009-05-30', 120.00),
('AD3110', 130, '2009-05-02', '2009-05-30', 120.00),
('AD3110', 160, '2009-05-02', '2009-05-30', 120.00),
('AD3110', 170, '2009-03-03', '2009-03-30', 120.00),
('AD3110', 180, '2009-03-03', '2009-03-30', 120.00),
('AD3110', 190, '2009-01-20', '2009-02-10', 120.00),
('AD3110', 200, '2009-05-02', '2009-05-30', 120.00),
('AD3110', 210, '2009-05-02', '2009-05-30', 120.00),
('AD3110', 220, '2009-05-02', '2009-05-30', 120.00),
('AD3110', 240, '2009-06-30', '2009-07-25', 120.00),
('AD3110', 270, '2009-03-03', '2009-03-30', 120.00),
('AD3110', 280, '2009-01-20', '2009-02-10', 120.00),
('AD3110', 300, '2009-04-01', '2009-04-30', 120.00),
('AD3110', 310, '2009-05-02', '2009-05-30', 120.00),
('AD3110', 340, '2009-03-10', '2009-03-31', 120.00),
('AD3110', 360, '2009-06-01', '2009-06-30', 120.00),
('AD3110', 370, '2009-01-20', '2009-02-10', 120.00),
('AD3110', 380, '2009-01-20', '2009-02-10', 120.00),
('AD3110', 390, '2009-03-10', '2009-03-31', 120.00),
('AD3110', 400, '2009-03-10', '2009-03-31', 120.00),
('AD3110', 410, '2009-03-10', '2009-03-31', 120.00),
('AD3110', 420, '2009-05-02', '2009-05-30', 120.00),
('AD3110', 430, '2009-01-20', '2009-02-10', 120.00),
('AD3110', 440, '2009-03-03', '2009-03-30', 120.00),
('PL2100', 300, '2009-01-20', '2009-02-10', 200.00),
('PL2100', 360, '2009-01-20', '2009-02-10', 200.00);

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

--
-- Estrutura da tabela `autores`
--

DROP TABLE IF EXISTS `autores`;
CREATE TABLE IF NOT EXISTS `autores` (
  `id_autor` int(6) NOT NULL,
  `tx_nome_autor` char(90) COLLATE utf8_bin NOT NULL,
  `dt_cadastro` date NOT NULL,
  PRIMARY KEY (`id_autor`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `autores`
--

INSERT INTO `autores` (`id_autor`, `tx_nome_autor`, `dt_cadastro`) VALUES
(1, 'Joao Mauricio Hypolito', '2010-12-10'),
(2, 'Inacio de Loyola Brand', '2010-12-10'),
(4, 'Vladimir Tolstoi', '2010-12-10');

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

--
-- Estrutura da tabela `autorias`
--

DROP TABLE IF EXISTS `autorias`;
CREATE TABLE IF NOT EXISTS `autorias` (
  `id_livro` int(9) NOT NULL,
  `id_autor` int(6) NOT NULL,
  KEY `id_livro` (`id_livro`),
  KEY `id_autor` (`id_autor`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `autorias`
--

INSERT INTO `autorias` (`id_livro`, `id_autor`) VALUES
(1, 1),
(3, 2),
(4, 4),
(3, 1),
(4, 1);

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

--
-- Estrutura da tabela `bibliografia`
--

DROP TABLE IF EXISTS `bibliografia`;
CREATE TABLE IF NOT EXISTS `bibliografia` (
  `id_disciplina` int(4) NOT NULL,
  `id_livro` int(9) NOT NULL,
  PRIMARY KEY (`id_disciplina`,`id_livro`),
  KEY `id_livro` (`id_livro`),
  KEY `id_disciplina` (`id_disciplina`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `bibliografia`
--

INSERT INTO `bibliografia` (`id_disciplina`, `id_livro`) VALUES
(20, 1);

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

--
-- Estrutura da tabela `capacitacoes`
--

DROP TABLE IF EXISTS `capacitacoes`;
CREATE TABLE IF NOT EXISTS `capacitacoes` (
  `id_curso` int(5) NOT NULL,
  `id_funcionario` int(6) NOT NULL,
  `dt_capacitacao` date NOT NULL,
  `dt_registro` date NOT NULL,
  PRIMARY KEY (`id_curso`,`id_funcionario`,`dt_capacitacao`),
  KEY `id_curso` (`id_curso`),
  KEY `id_funcionario` (`id_funcionario`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `capacitacoes`
--


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

--
-- Estrutura da tabela `carros`
--

DROP TABLE IF EXISTS `carros`;
CREATE TABLE IF NOT EXISTS `carros` (
  `id_carro` int(6) NOT NULL,
  `id_placa` char(7) COLLATE utf8_bin NOT NULL,
  `id_funcionario` int(6) NOT NULL,
  `id_modelo` int(4) NOT NULL,
  `id_cor` int(11) DEFAULT NULL,
  `nu_ano_fabricacao` int(11) NOT NULL,
  `dt_cadastro` date NOT NULL,
  PRIMARY KEY (`id_placa`),
  KEY `id_funcionario` (`id_funcionario`),
  KEY `id_cor` (`id_cor`),
  KEY `id_modelo` (`id_modelo`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `carros`
--

INSERT INTO `carros` (`id_carro`, `id_placa`, `id_funcionario`, `id_modelo`, `id_cor`, `nu_ano_fabricacao`, `dt_cadastro`) VALUES
(1, 'ABC1234', 330, 2, 3, 2010, '2009-01-20'),
(2, 'ABC2345', 270, 1, 3, 2010, '2009-10-20'),
(3, 'QAZ1234', 80, 4, 3, 2001, '2001-01-20'),
(4, 'XSW4354', 70, 3, 3, 2002, '2003-01-20');

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

--
-- Estrutura da tabela `cidades`
--

DROP TABLE IF EXISTS `cidades`;
CREATE TABLE IF NOT EXISTS `cidades` (
  `id_cidade` int(4) NOT NULL,
  `tx_nome` varchar(250) COLLATE utf8_bin DEFAULT NULL,
  `qt_populacao` double(10,0) NOT NULL,
  `qt_area` double(6,0) NOT NULL,
  PRIMARY KEY (`id_cidade`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `cidades`
--

INSERT INTO `cidades` (`id_cidade`, `tx_nome`, `qt_populacao`, `qt_area`) VALUES
(1, 'Sao Paulo', 0, 0),
(2, 'Osasco', 0, 0),
(3, 'Barueri', 0, 0),
(4, 'Sao Bernardo', 0, 0),
(5, 'Sao Caetano', 0, 0),
(6, 'Diadema', 0, 0),
(7, 'Guarulhos', 0, 0),
(8, 'Santana do Parnaiba', 0, 0);

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

--
-- Estrutura da tabela `clientes`
--

DROP TABLE IF EXISTS `clientes`;
CREATE TABLE IF NOT EXISTS `clientes` (
  `id_cliente` int(6) NOT NULL,
  `tx_nome` varchar(250) COLLATE utf8_bin DEFAULT NULL,
  `tx_razao_social` varchar(250) COLLATE utf8_bin DEFAULT NULL,
  `tx_logradouro` varchar(90) COLLATE utf8_bin NOT NULL,
  `tx_bairro` varchar(40) COLLATE utf8_bin NOT NULL,
  `id_cidade` int(4) DEFAULT NULL,
  `vl_limite_compra` double(15,2) NOT NULL,
  `dt_cadastro` date NOT NULL,
  PRIMARY KEY (`id_cliente`),
  KEY `id_cidade` (`id_cidade`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `clientes`
--

INSERT INTO `clientes` (`id_cliente`, `tx_nome`, `tx_razao_social`, `tx_logradouro`, `tx_bairro`, `id_cidade`, `vl_limite_compra`, `dt_cadastro`) VALUES
(1, 'Mc Donalds', 'Rest Com S/A ', 'Av. Ruben Berta, 234', 'Centro', 1, 100000.00, '2008-01-20'),
(2, 'Tratoria do Pirata', 'Ristoranti tre fratelli S.A.', 'Alameda Pamplona, 1243', 'Pinheiros', 2, 30000.00, '2007-01-20'),
(3, 'Tratoria do Sargento', 'Ristoranti Il Tratoria do Sargento', 'R. Augusta, 1400', 'Pinheiros', 1, 25000.00, '2007-02-02'),
(4, 'Restaurante Bom Vivan', 'Restaurante "O Bom Vivan" S/C Ltda.', 'R. Paulo S', 'Centro', 1, 5000.00, '2009-12-10');

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

--
-- Estrutura da tabela `consultas`
--

DROP TABLE IF EXISTS `consultas`;
CREATE TABLE IF NOT EXISTS `consultas` (
  `id_funcionario` int(6) NOT NULL,
  `id_medico` int(6) NOT NULL,
  `dt_hora_consulta` datetime NOT NULL,
  `id_plano_de_saude` int(4) NOT NULL,
  `ao_situacao_consulta` char(1) COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`id_funcionario`,`id_medico`,`dt_hora_consulta`),
  KEY `id_medico` (`id_medico`),
  KEY `id_funcionario` (`id_funcionario`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `consultas`
--

INSERT INTO `consultas` (`id_funcionario`, `id_medico`, `dt_hora_consulta`, `id_plano_de_saude`, `ao_situacao_consulta`) VALUES
(10, 2, '2010-12-10 14:30:00', 2, 'a'),
(150, 2, '2010-12-10 14:00:00', 2, 'c'),
(150, 3, '2010-12-10 14:00:00', 4, 'c'),
(250, 2, '2010-12-10 15:00:00', 2, 'a');

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

--
-- Estrutura da tabela `cores`
--

DROP TABLE IF EXISTS `cores`;
CREATE TABLE IF NOT EXISTS `cores` (
  `id_cor` int(6) NOT NULL,
  `tx_nome_cor` varchar(250) COLLATE utf8_bin NOT NULL,
  `nu_pantone` int(6) NOT NULL,
  `dt_cadastro` date NOT NULL,
  UNIQUE KEY `id_cor` (`id_cor`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `cores`
--

INSERT INTO `cores` (`id_cor`, `tx_nome_cor`, `nu_pantone`, `dt_cadastro`) VALUES
(3, 'Verde', 23, '2010-10-10'),
(4, 'Vermelho', 1452, '2010-10-10'),
(5, 'Branco', 14785, '2010-10-10'),
(6, 'Preto', 451256, '2010-10-10'),
(7, 'Amarelo', 451256, '2010-10-10'),
(8, 'Azul', 415636, '2010-10-10');

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

--
-- Estrutura da tabela `cursos`
--

DROP TABLE IF EXISTS `cursos`;
CREATE TABLE IF NOT EXISTS `cursos` (
  `id_curso` int(5) NOT NULL,
  `tx_nome_curso` varchar(200) COLLATE utf8_bin NOT NULL,
  `id_instituicao` int(3) DEFAULT NULL,
  `id_area_conhecimento` int(3) DEFAULT NULL,
  `dt_cadastro` date NOT NULL,
  PRIMARY KEY (`id_curso`),
  KEY `id_instituicao` (`id_instituicao`),
  KEY `id_area_conhecimento` (`id_area_conhecimento`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `cursos`
--

INSERT INTO `cursos` (`id_curso`, `tx_nome_curso`, `id_instituicao`, `id_area_conhecimento`, `dt_cadastro`) VALUES
(3, 'alterando o t', 5, 5, '2001-10-10'),
(4, 'teste agora de INCLUSAO', 5, 4, '2010-10-10'),
(5, 'Como construir um software com gambiarra', 3, 3, '2010-10-10');

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

--
-- Estrutura da tabela `departamentos`
--

DROP TABLE IF EXISTS `departamentos`;
CREATE TABLE IF NOT EXISTS `departamentos` (
  `id_depto` char(3) COLLATE utf8_bin NOT NULL,
  `tx_nome_depto` varchar(36) COLLATE utf8_bin NOT NULL,
  `id_funcionario_gerente` int(6) DEFAULT NULL,
  `id_depto_superior` char(3) COLLATE utf8_bin NOT NULL,
  `tx_localizacao` varchar(80) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`id_depto`),
  KEY `id_funcionario_gerente` (`id_funcionario_gerente`),
  KEY `id_depto_superior` (`id_depto_superior`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `departamentos`
--

INSERT INTO `departamentos` (`id_depto`, `tx_nome_depto`, `id_funcionario_gerente`, `id_depto_superior`, `tx_localizacao`) VALUES
('A01', 'SPIFFY COMPUTER SERVICE DIV.', 260, 'A01', '-'),
('A11', 'CONTROLE DE CUSTOS1', 70, 'A01', '-'),
('A12', 'CONTROLE DE CUSTOS2', 320, 'A01', '-'),
('B01', 'PLANNING                    ', 250, 'A01', '-'),
('C01', 'INFORMATION CENTER          ', 120, 'A01', '-'),
('D01', 'DEVELOPMENT CENTER          ', 350, 'A01', '-'),
('D11', 'MANUFACTURING SYSTEMS       ', 330, 'D01', '-'),
('E01', 'SUPPORT SERVICES            ', 290, 'A01', '-'),
('E11', 'OPERATIONS                  ', 230, 'E01', '-'),
('E21', 'SOFTWARE SUPPORT            ', 150, 'E01', '-'),
('F22', 'BRANCH OFFICE F2            ', 110, 'E01', 'Paulista Avenue, 2345 - 15 Floor/Set 45'),
('G22', 'BRANCH OFFICE G2            ', 80, 'E01', '-'),
('H22', 'BRANCH OFFICE H2            ', 40, 'E01', '-'),
('I22', 'BRANCH OFFICE I2            ', 30, 'E01', '-'),
('J22', 'BRANCH OFFICE J2            ', 100, 'E01', '-');

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

--
-- Estrutura da tabela `disciplinas`
--

DROP TABLE IF EXISTS `disciplinas`;
CREATE TABLE IF NOT EXISTS `disciplinas` (
  `id_disciplina` int(4) NOT NULL,
  `tx_nome_` varchar(250) COLLATE utf8_bin NOT NULL,
  `id_tipo_disciplina` char(2) COLLATE utf8_bin NOT NULL,
  `dt_cadastro` date NOT NULL,
  PRIMARY KEY (`id_disciplina`),
  KEY `id_tipo_disciplina` (`id_tipo_disciplina`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `disciplinas`
--

INSERT INTO `disciplinas` (`id_disciplina`, `tx_nome_`, `id_tipo_disciplina`, `dt_cadastro`) VALUES
(1, 'CALCULO I', 'A', '0000-00-00'),
(2, 'CALCULO II', 'A', '0000-00-00'),
(3, 'CALCULO IV', 'A', '0000-00-00'),
(4, 'CALCULO III', 'A', '0000-00-00'),
(5, 'FISICA I', 'B', '0000-00-00'),
(6, 'FISICA II', 'B', '0000-00-00'),
(7, 'FISICA III', 'B', '0000-00-00'),
(8, 'FISICA IV', 'B', '0000-00-00'),
(9, 'PORTUGUES I', 'C', '0000-00-00'),
(10, 'PORTUGUES II', 'C', '0000-00-00'),
(11, 'ALGORITMOS DE PROGRAMACAO I', 'P', '0000-00-00'),
(12, 'ALGORITMOS DE PROGRAMACAO II', 'P', '0000-00-00'),
(13, 'LINGUAGEM DE PROGRAMACAO I', 'P', '0000-00-00'),
(14, 'LINGUAGEM DE PROGRAMACAO II', 'P', '0000-00-00'),
(15, 'LINGUAGEM DE PROGRAMACAO III', 'P', '0000-00-00'),
(16, 'LINGUAGEM DE PROGRAMACAO IV', 'P', '0000-00-00'),
(17, 'CALCULO NUMERICO', 'P', '0000-00-00'),
(18, 'APLICACOES DE CALCULO NUMERICO I', 'P', '0000-00-00'),
(19, 'ETICA NA TECNOLOGIA DA INFORMA', 'G', '0000-00-00'),
(20, 'TECNICAS DE APRESENTA', 'G', '0000-00-00'),
(21, 'AVALIACAO DE QUALid_ADE EM FABRICA DE SOFTWARE', 'Q', '0000-00-00'),
(22, 'ENGENHARIA DE SOFTWARE I', 'Q', '0000-00-00');

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

--
-- Estrutura da tabela `disciplinas_tipos`
--

DROP TABLE IF EXISTS `disciplinas_tipos`;
CREATE TABLE IF NOT EXISTS `disciplinas_tipos` (
  `id_tipo_disciplina` char(2) COLLATE utf8_bin NOT NULL,
  `tx_nome` varchar(250) COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`id_tipo_disciplina`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `disciplinas_tipos`
--

INSERT INTO `disciplinas_tipos` (`id_tipo_disciplina`, `tx_nome`) VALUES
('1', 'um teste de inclusao'),
('10', 'asdads'),
('11', 'asdads'),
('A', 'MATEMATICAS'),
('A2', 'Teste'),
('A3', 'asdfasdf'),
('B', 'CIENCIAS NATURAIS'),
('C', 'LINGUAS'),
('G', 'CONHECIMENTOS GERAIS'),
('P', 'TEORIA DA COMPUTACAO'),
('Q', 'ENGENHARIA DE SOFTWARE');

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

--
-- Estrutura da tabela `editoras`
--

DROP TABLE IF EXISTS `editoras`;
CREATE TABLE IF NOT EXISTS `editoras` (
  `id_editora` int(5) NOT NULL,
  `tx_nome_editora` char(70) COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`id_editora`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `editoras`
--

INSERT INTO `editoras` (`id_editora`, `tx_nome_editora`) VALUES
(1, 'Abril Editora S/C Ltda.'),
(2, 'McGraw-Books'),
(3, 'Nova Editora S.A');

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

--
-- Estrutura da tabela `empresas`
--

DROP TABLE IF EXISTS `empresas`;
CREATE TABLE IF NOT EXISTS `empresas` (
  `id_empresa` int(5) NOT NULL,
  `tx_nome_usual` varchar(100) COLLATE utf8_bin NOT NULL,
  `tx_razao_social` varchar(250) COLLATE utf8_bin NOT NULL,
  `tx_logradouro` varchar(200) COLLATE utf8_bin NOT NULL,
  `tx_bairro` varchar(200) COLLATE utf8_bin NOT NULL,
  `id_cidade` int(4) NOT NULL,
  `nu_telefone` char(15) COLLATE utf8_bin NOT NULL,
  `id_setor_atuacao` int(4) NOT NULL,
  PRIMARY KEY (`id_empresa`),
  KEY `id_cidade` (`id_cidade`,`id_setor_atuacao`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `empresas`
--


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

--
-- Estrutura da tabela `especialidades_medicas`
--

DROP TABLE IF EXISTS `especialidades_medicas`;
CREATE TABLE IF NOT EXISTS `especialidades_medicas` (
  `id_especialidade` int(4) NOT NULL,
  `tx_nome_especialidade` varchar(200) COLLATE utf8_bin NOT NULL,
  `dt_cadastro` date NOT NULL,
  PRIMARY KEY (`id_especialidade`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `especialidades_medicas`
--

INSERT INTO `especialidades_medicas` (`id_especialidade`, `tx_nome_especialidade`, `dt_cadastro`) VALUES
(1, 'Cl', '2010-10-05'),
(2, 'Pediatria', '2010-10-05'),
(3, 'Geriatria', '2010-10-05'),
(4, 'Cardiolgia', '2010-10-05'),
(5, 'Ortopedia', '2010-10-05'),
(6, 'Gastroenterologia', '2010-10-05'),
(7, 'Infectologista', '2010-12-10'),
(8, 'Oncloologista', '2010-12-10');

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

--
-- Estrutura da tabela `fabricantes`
--

DROP TABLE IF EXISTS `fabricantes`;
CREATE TABLE IF NOT EXISTS `fabricantes` (
  `id_fabricante` int(3) NOT NULL,
  `tx_nome` varchar(250) COLLATE utf8_bin NOT NULL,
  `tx_logradouro` varchar(200) COLLATE utf8_bin NOT NULL,
  `tx_bairro` varchar(200) COLLATE utf8_bin NOT NULL,
  `nu_telefone` char(15) COLLATE utf8_bin DEFAULT NULL,
  `id_cidade` int(4) NOT NULL,
  `dt_cadastro` date NOT NULL,
  PRIMARY KEY (`id_fabricante`),
  KEY `id_cidade` (`id_cidade`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `fabricantes`
--

INSERT INTO `fabricantes` (`id_fabricante`, `tx_nome`, `tx_logradouro`, `tx_bairro`, `nu_telefone`, `id_cidade`, `dt_cadastro`) VALUES
(1, 'Volkswagen', 'Rodovia Anchieta, 34000', '', NULL, 1, '2001-05-20'),
(2, 'General Motors', 'Av. dos Autonomistas, 2345', '', NULL, 2, '2001-05-20');

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

--
-- Estrutura da tabela `fornecedores`
--

DROP TABLE IF EXISTS `fornecedores`;
CREATE TABLE IF NOT EXISTS `fornecedores` (
  `id_fornecedor` int(6) NOT NULL,
  `tx_nome` varchar(250) COLLATE utf8_bin DEFAULT NULL,
  `tx_razao_social` varchar(250) COLLATE utf8_bin DEFAULT NULL,
  `tx_logradouro` varchar(90) COLLATE utf8_bin NOT NULL,
  `tx_bairro` varchar(40) COLLATE utf8_bin NOT NULL,
  `id_cidade` int(4) DEFAULT NULL,
  `vl_limite_venda` double(15,2) NOT NULL,
  `dt_cadastro` date NOT NULL,
  PRIMARY KEY (`id_fornecedor`),
  KEY `id_cidade` (`id_cidade`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `fornecedores`
--

INSERT INTO `fornecedores` (`id_fornecedor`, `tx_nome`, `tx_razao_social`, `tx_logradouro`, `tx_bairro`, `id_cidade`, `vl_limite_venda`, `dt_cadastro`) VALUES
(1, 'Fazenda Rio Branco', 'Latic', 'Estrada Ibitirama, Km 350', 'Boa Vista', 6, 100000.00, '2008-01-20'),
(2, 'Sab', 'F', 'Estrada do Coco, Km 35', 'Lauro de Freitas', 1, 5000.00, '2009-12-17'),
(3, 'Ensacadora S', 'F', 'Rodovia Br101. K,m 456', 'Distrito Industrial II', 3, 30000.00, '2009-03-11');

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

--
-- Estrutura da tabela `fornecimentos`
--

DROP TABLE IF EXISTS `fornecimentos`;
CREATE TABLE IF NOT EXISTS `fornecimentos` (
  `id_produto` int(6) NOT NULL,
  `id_fornecedor` int(5) NOT NULL,
  PRIMARY KEY (`id_produto`,`id_fornecedor`),
  KEY `id_produto` (`id_produto`),
  KEY `id_fornecedor` (`id_fornecedor`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `fornecimentos`
--


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

--
-- Estrutura da tabela `funcionarios`
--

DROP TABLE IF EXISTS `funcionarios`;
CREATE TABLE IF NOT EXISTS `funcionarios` (
  `id_funcionario` int(6) NOT NULL,
  `tx_primeiro_nome` varchar(12) COLLATE utf8_bin NOT NULL,
  `tx_iniciais_medias` char(1) COLLATE utf8_bin DEFAULT NULL,
  `tx_sobre_nome` varchar(15) COLLATE utf8_bin NOT NULL,
  `id_depto` char(3) COLLATE utf8_bin DEFAULT NULL,
  `nu_telefone` char(4) COLLATE utf8_bin DEFAULT NULL,
  `dt_contratacao` date DEFAULT NULL,
  `id_funcao` int(3) DEFAULT NULL,
  `id_nivel_educacao` int(2) DEFAULT NULL,
  `ao_Sexo` char(1) COLLATE utf8_bin DEFAULT NULL,
  `dt_nascimento` date DEFAULT NULL,
  `vl_salario` decimal(9,2) DEFAULT NULL,
  `vl_bonus` decimal(9,2) DEFAULT NULL,
  `vl_comissao` decimal(9,2) DEFAULT NULL,
  PRIMARY KEY (`id_funcionario`),
  KEY `id_funcao` (`id_funcao`),
  KEY `id_nivel_educacao` (`id_nivel_educacao`),
  KEY `id_depto` (`id_depto`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `funcionarios`
--

INSERT INTO `funcionarios` (`id_funcionario`, `tx_primeiro_nome`, `tx_iniciais_medias`, `tx_sobre_nome`, `id_depto`, `nu_telefone`, `dt_contratacao`, `id_funcao`, `id_nivel_educacao`, `ao_Sexo`, `dt_nascimento`, `vl_salario`, `vl_bonus`, `vl_comissao`) VALUES
(10, 'CHRISTINE', 'I', 'HAAS', 'A01', '3978', '1995-01-01', 1, 18, 'F', '1963-08-24', 152750.00, 1000.00, 4220.00),
(20, 'MICHAEL', 'L', 'THOMPSON', 'B01', '3476', '2003-10-10', 3, 18, 'M', '1978-02-02', 94250.00, 800.00, 3300.00),
(30, 'SALLY', 'A', 'KWAN', 'C01', '4738', '2005-04-05', 2, 20, 'F', '1971-05-11', 98250.00, 800.00, 3060.00),
(40, 'MAUDE', 'F', 'SETRIGHT', 'E11', '3332', '1994-09-12', 10, 99, 'F', '1961-04-21', 35900.00, 300.00, 1272.00),
(50, 'JOHN', 'B', 'GEYER', 'E01', '6789', '1979-08-17', 5, 16, 'M', '1955-09-15', 80175.00, 800.00, 3214.00),
(60, 'IRVING', 'F', 'STERN', 'D11', '6423', '2003-09-14', 4, 16, 'M', '1975-07-07', 72250.00, 500.00, 2580.00),
(70, 'EVA', 'D', 'PULASKI', NULL, '7831', '2005-09-30', 6, 16, 'F', '2003-05-26', 96170.00, 700.00, 2893.00),
(80, 'RAMLAL', 'V', 'MEHTA', 'E21', '9990', '1995-07-07', 10, 16, 'M', '1962-08-11', 39950.00, 400.00, 1596.00),
(90, 'EILEEN', 'W', 'HENDERSON', 'E11', '5498', '2000-08-15', 7, 16, 'F', '1971-05-15', 89750.00, 600.00, 2380.00),
(100, 'THEODORE', 'Q', 'SPENSER', 'E21', '0972', '2000-06-19', 6, 14, 'M', '1980-12-18', 86150.00, 500.00, 2092.00),
(110, 'VINCENZO', 'G', 'LUCCHESSI', 'A01', '3490', '1988-05-16', 7, 19, 'M', '1959-11-05', 66500.00, 900.00, 3720.00),
(120, 'SEAN', '', 'O CONNELL', 'A01', '2167', '1993-12-05', 8, 14, 'M', '1972-10-18', 49250.00, 600.00, 2340.00),
(130, 'DELORES', 'M', 'QUINTANA', 'C01', '4578', '2001-07-28', 7, 16, 'F', '1955-09-15', 73800.00, 500.00, 1904.00),
(150, 'BRUCE', '', 'ADAMSON', 'D11', '4510', '2002-02-12', 7, 16, 'M', '1977-05-17', 55280.00, 500.00, 2022.00),
(160, 'ELIZABETH', 'R', 'PIANKA', 'D11', '3782', '2006-10-11', 6, 17, 'F', '1980-04-12', 62250.00, 400.00, 1780.00),
(170, 'MASATOSHI', 'J', 'YOSHIMURA', 'D11', '2890', '1999-09-15', 7, 16, 'M', '1981-01-05', 44680.00, 500.00, 1974.00),
(180, 'MARILYN', 'S', 'SCOUTTEN', 'D11', '1682', '2003-07-07', 7, 17, 'F', '1979-02-21', 51340.00, 500.00, 1707.00),
(190, 'JAMES', 'H', 'WALKER', 'D11', '2986', '2004-07-26', 9, 16, 'M', '1982-06-25', 50450.00, 400.00, 1636.00),
(200, 'DAVID', '', 'BROWN', 'D11', '4501', '2002-03-03', 9, 16, 'M', '1971-05-29', 57740.00, 600.00, 2217.00),
(210, 'WILLIAM', 'T', 'JONES', 'D11', '0942', '1998-04-11', 10, 17, 'M', '2003-02-23', 68270.00, 400.00, 1462.00),
(220, 'JENNIFER', 'K', 'LUTZ', 'D11', '0672', '1998-08-29', 10, 18, 'F', '1978-03-19', 49840.00, 600.00, 2387.00),
(230, 'JAMES', 'J', 'JEFFERSON', 'A11', '2094', '1996-11-21', 7, 16, 'M', '1980-05-30', 42180.00, 400.00, 1774.00),
(240, 'SALVATORE', 'M', 'MARINO', NULL, '3780', '2004-12-05', 10, 17, 'M', '2002-03-31', 48760.00, 600.00, 2301.00),
(250, 'DANIEL', 'S', 'SMITH', NULL, '0961', '1999-10-30', 9, 15, 'M', '1969-11-12', 49180.00, 400.00, 1534.00),
(260, 'SYBIL', 'P', 'JOHNSON', NULL, '8953', '2005-09-11', 9, 16, 'F', '1976-10-05', 47250.00, 300.00, 1380.00),
(270, 'MARIA', 'L', 'PEREZ', NULL, '9001', '2006-09-30', 10, 15, 'F', '2003-05-26', 37380.00, 500.00, 2190.00),
(280, 'ETHEL', 'R', 'SCHNEid_ER', 'E11', '8997', '1997-03-24', 10, 17, 'F', '1976-03-28', 36250.00, 500.00, 2100.00),
(290, 'JOHN', 'R', 'PARKER', 'E11', '4502', '2006-05-30', 10, 99, 'M', '1985-07-09', 35340.00, 300.00, 1227.00),
(300, 'PHILIP', 'X', 'SMITH', 'E11', '2095', '2002-06-19', 10, 14, 'M', '1976-10-27', 37750.00, 400.00, 1420.00),
(310, 'WING', '', 'LEE', 'E21', '2103', '2006-02-23', 8, 14, 'M', '1971-07-18', 45370.00, 500.00, 2030.00),
(320, 'JASON', 'R', 'GOUNOT', 'E21', '5698', '1977-05-05', 9, 16, 'M', '1956-05-17', 43840.00, 500.00, 1907.00),
(330, 'DIAN', 'J', 'HEMMINGER', 'A01', '3978', '1995-01-01', 8, 18, 'F', '1973-08-14', 46500.00, 1000.00, 4220.00),
(340, 'GREG', '', 'ORLANDO', 'A01', '2167', '2002-05-05', 7, 14, 'M', '1972-10-18', 39250.00, 600.00, 2340.00),
(350, 'KIM', 'N', 'NATZ', 'C01', '1793', '2006-12-15', 8, 18, 'F', '1976-01-19', 68420.00, 600.00, 2274.00),
(360, 'KIYOSHI', '', 'YAMAMOTO', 'D11', '2890', '2005-09-15', 7, 16, 'M', '1981-01-05', 64680.00, 500.00, 1974.00),
(370, 'REBA', 'K', 'JOHN', 'D11', '0672', '2005-08-29', 8, 18, 'F', '1978-03-19', 69840.00, 600.00, 2387.00),
(380, 'ROBERT', 'M', 'MONTEVERDE', NULL, '3780', '2004-12-05', 8, 17, 'M', '1984-03-31', 37760.00, 600.00, 2301.00),
(390, 'EILEEN', 'R', 'SCHWARTZ', 'E11', '8997', '1997-03-24', 9, 17, 'F', '1966-03-28', 46250.00, 500.00, 2100.00),
(400, 'MICHELLE', 'F', 'SPRINGER', 'E11', '3332', '1994-09-12', 9, 99, 'F', '1961-04-21', 35900.00, 300.00, 1272.00),
(410, 'HELENA', '', 'WONG', 'E21', '2103', '2006-02-23', 9, 14, 'F', '1971-07-18', 35370.00, 500.00, 2030.00),
(420, 'ROY', 'R', 'ALONZO', 'E21', '5698', '1997-07-05', 10, 16, 'M', '1956-05-17', 31840.00, 500.00, 1907.00),
(430, 'JOSE', 'A', 'BUENO', 'D01', '2145', '1973-03-27', 9, 14, 'M', '1955-03-28', 1250.00, 100.00, 500.00),
(440, 'Teste', 'd', 'Silva', 'A01', '3232', '2010-05-10', 12, 14, 'M', '1985-10-20', 1600.00, 200.00, 200.00);

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

--
-- Estrutura da tabela `funcionarios_planos`
--

DROP TABLE IF EXISTS `funcionarios_planos`;
CREATE TABLE IF NOT EXISTS `funcionarios_planos` (
  `id_funcionario` int(6) NOT NULL,
  `id_plano_de_saude` int(4) NOT NULL,
  `dt_vinculacao` date NOT NULL,
  `dt_desligamento` date NOT NULL,
  PRIMARY KEY (`id_funcionario`,`id_plano_de_saude`,`dt_vinculacao`),
  KEY `id_funcionario` (`id_funcionario`),
  KEY `id_plano_de_saude` (`id_plano_de_saude`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `funcionarios_planos`
--

INSERT INTO `funcionarios_planos` (`id_funcionario`, `id_plano_de_saude`, `dt_vinculacao`, `dt_desligamento`) VALUES
(10, 1, '2010-12-01', '2015-12-01');

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

--
-- Estrutura da tabela `funcionarios_resenha`
--

DROP TABLE IF EXISTS `funcionarios_resenha`;
CREATE TABLE IF NOT EXISTS `funcionarios_resenha` (
  `id_funcionario` int(6) NOT NULL,
  `tx_nome_curto` varchar(10) COLLATE utf8_bin NOT NULL,
  `tx_resenha` varchar(3000) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`id_funcionario`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `funcionarios_resenha`
--

INSERT INTO `funcionarios_resenha` (`id_funcionario`, `tx_nome_curto`, `tx_resenha`) VALUES
(10, 'CHRISTINE', 'Resenha'),
(20, 'MICHAEL', 'Resenha'),
(30, 'SALLY', 'Resenha'),
(40, 'MAUDE', 'Resenha'),
(50, 'JOHN', 'Resenha'),
(60, 'IRVING', 'Resenha'),
(70, 'EVA', 'Resenha'),
(80, 'RAMLAL', 'Resenha'),
(90, 'EILEEN', 'Resenha'),
(100, 'THEODORE', 'Resenha'),
(110, 'VINCENZO', 'Resenha'),
(120, 'SEAN', 'Resenha'),
(130, 'DELORES', 'Resenha'),
(150, 'BRUCE', 'Ah! Podemos alterar o valor da resenha no campo que permite escrever qualquer besteira'),
(160, 'ELIZABETH', 'Resenha'),
(170, 'MASATOSHI', 'Resenha'),
(180, 'MARILYN', 'Resenha'),
(190, 'JAMES', 'Resenha'),
(200, 'DAVid_', 'Resenha'),
(210, 'WILLIAM', 'Resenha'),
(220, 'JENNIFER', 'Resenha'),
(230, 'JAMES', 'Resenha'),
(240, 'SALVATORE', 'Resenha'),
(250, 'DANIEL', 'Resenha'),
(260, 'SYBIL', 'Resenha'),
(270, 'MARIA', 'Resenha'),
(280, 'ETHEL', 'Resenha'),
(290, 'JOHN', 'Resenha'),
(300, 'PHILIP', 'Resenha'),
(310, 'WING', 'Resenha'),
(320, 'JASON', 'Resenha'),
(330, 'DIAN', 'Resenha'),
(340, 'GREG', 'Resenha'),
(350, 'KIM', 'Resenha'),
(360, 'KIYOSHI', 'Resenha'),
(370, 'REBA', 'Resenha'),
(380, 'ROBERT', 'Resenha'),
(390, 'EILEEN', 'Resenha'),
(400, 'MICHELLE', 'Resenha'),
(410, 'HELENA', 'Resenha'),
(420, 'ROY', 'Resenha'),
(430, 'JOSE', 'Resenha');

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

--
-- Estrutura da tabela `funcoes`
--

DROP TABLE IF EXISTS `funcoes`;
CREATE TABLE IF NOT EXISTS `funcoes` (
  `id_funcao` int(3) NOT NULL,
  `tx_nome_funcao` varchar(60) COLLATE utf8_bin NOT NULL,
  `dt_cadastro` date NOT NULL,
  PRIMARY KEY (`id_funcao`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `funcoes`
--

INSERT INTO `funcoes` (`id_funcao`, `tx_nome_funcao`, `dt_cadastro`) VALUES
(1, 'Presid_ente', '0000-00-00'),
(2, 'Diretor Comercial', '0000-00-00'),
(3, 'Diretor Administrativo', '0000-00-00'),
(4, 'Diretor Produ', '0000-00-00'),
(5, 'Gerente De Vendas', '0000-00-00'),
(6, 'Gerente de Compras', '0000-00-00'),
(7, 'Gerente de contas', '0000-00-00'),
(8, 'Gerente de Recursos Humanos', '0000-00-00'),
(9, 'Gerente de Rela', '0000-00-00'),
(10, 'Gerente de Opera', '0000-00-00'),
(11, 'Professor', '0000-00-00'),
(12, 'Auxiliar Administrativo', '0000-00-00');

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

--
-- Estrutura da tabela `habilitacoes`
--

DROP TABLE IF EXISTS `habilitacoes`;
CREATE TABLE IF NOT EXISTS `habilitacoes` (
  `id_curso` int(5) NOT NULL,
  `id_professor` int(3) NOT NULL,
  `dt_habilitacao` date NOT NULL,
  `dt_registro` date NOT NULL,
  PRIMARY KEY (`id_curso`,`id_professor`,`dt_habilitacao`),
  KEY `id_curso` (`id_curso`),
  KEY `id_professor` (`id_professor`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `habilitacoes`
--


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

--
-- Estrutura da tabela `historico_profissional`
--

DROP TABLE IF EXISTS `historico_profissional`;
CREATE TABLE IF NOT EXISTS `historico_profissional` (
  `id_historico` int(6) NOT NULL,
  `id_funcionario` int(6) NOT NULL,
  `id_empresa` int(5) NOT NULL,
  `id_atividade` int(4) NOT NULL,
  `dt_inicio` date NOT NULL,
  `dt_termino` date NOT NULL,
  `dt_cadastro` date NOT NULL,
  PRIMARY KEY (`id_historico`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `historico_profissional`
--


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

--
-- Estrutura da tabela `instituicoes_de_ensino`
--

DROP TABLE IF EXISTS `instituicoes_de_ensino`;
CREATE TABLE IF NOT EXISTS `instituicoes_de_ensino` (
  `id_instituicao` int(3) NOT NULL,
  `tx_nome_instituicao` varchar(200) COLLATE utf8_bin NOT NULL,
  `tx_logradouro` varchar(200) COLLATE utf8_bin NOT NULL,
  `tx_bairro` varchar(200) COLLATE utf8_bin NOT NULL,
  `nu_telefone` char(15) COLLATE utf8_bin DEFAULT NULL,
  `id_cidade` int(4) NOT NULL,
  `dt_cadastro` date NOT NULL,
  PRIMARY KEY (`id_instituicao`),
  KEY `id_cidade` (`id_cidade`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `instituicoes_de_ensino`
--

INSERT INTO `instituicoes_de_ensino` (`id_instituicao`, `tx_nome_instituicao`, `tx_logradouro`, `tx_bairro`, `nu_telefone`, `id_cidade`, `dt_cadastro`) VALUES
(1, 'Faculdade de Belas Artes', '', '', NULL, 0, '2001-01-10'),
(2, 'Faculdade de Arqitetura de Urbanismo de S', '', '', NULL, 0, '2001-01-10'),
(3, 'Escola Politecnica da USP', '', '', NULL, 0, '2001-10-10'),
(4, 'Faculadade Sabe Tudo S/CLtda.', '', '', NULL, 0, '2007-01-01'),
(5, 'Escola de 1 e 2 Grau Amadeu Amaral', '', '', NULL, 0, '1996-01-01');

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

--
-- Estrutura da tabela `inventarios`
--

DROP TABLE IF EXISTS `inventarios`;
CREATE TABLE IF NOT EXISTS `inventarios` (
  `id_produto` int(6) NOT NULL DEFAULT '0',
  `id_funcionario` int(6) NOT NULL DEFAULT '0',
  `dt_inventario` date NOT NULL,
  `qt_estoque` decimal(12,2) NOT NULL,
  `tx_local` varchar(128) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`id_produto`,`id_funcionario`,`dt_inventario`),
  KEY `id_produto` (`id_produto`),
  KEY `id_funcionario` (`id_funcionario`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `inventarios`
--

INSERT INTO `inventarios` (`id_produto`, `id_funcionario`, `dt_inventario`, `qt_estoque`, `tx_local`) VALUES
(4, 150, '2010-12-10', 1400.00, 'asjdg'),
(5, 150, '2010-12-10', 1200.00, 'sdf');

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

--
-- Estrutura da tabela `livros`
--

DROP TABLE IF EXISTS `livros`;
CREATE TABLE IF NOT EXISTS `livros` (
  `id_livro` int(9) NOT NULL,
  `tx_titulo_acervo` varchar(90) COLLATE utf8_bin NOT NULL,
  `dt_cadastro` date DEFAULT NULL,
  `id_editora` int(5) DEFAULT NULL,
  `dt_publicacao` date DEFAULT NULL,
  PRIMARY KEY (`id_livro`),
  KEY `id_editora` (`id_editora`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `livros`
--

INSERT INTO `livros` (`id_livro`, `tx_titulo_acervo`, `dt_cadastro`, `id_editora`, `dt_publicacao`) VALUES
(1, 'Preparando pratos com Lagostas', '2010-01-24', 1, '2010-10-12'),
(3, 'exercicios de matematica', '2010-12-10', 3, '2008-10-10'),
(4, 'O Alfabeto dos Numeros', '2010-12-10', 1, '2008-10-10');

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

--
-- Estrutura da tabela `medicos`
--

DROP TABLE IF EXISTS `medicos`;
CREATE TABLE IF NOT EXISTS `medicos` (
  `id_medico` int(6) NOT NULL,
  `tx_nome_medico` varchar(200) COLLATE utf8_bin NOT NULL,
  `nu_crm` int(8) NOT NULL,
  `id_especialidade` int(4) NOT NULL,
  `dt_cadastro` date NOT NULL,
  PRIMARY KEY (`id_medico`),
  KEY `id_especialidade` (`id_especialidade`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `medicos`
--

INSERT INTO `medicos` (`id_medico`, `tx_nome_medico`, `nu_crm`, `id_especialidade`, `dt_cadastro`) VALUES
(1, 'Sebasti', 1234, 5, '2010-10-05'),
(2, 'Franco da Rocha hfhf hgf hgf hf', 1233, 1, '2010-10-05'),
(3, 'Rogerio Albuquerque de Oliveira', 12345678, 2, '1986-05-10'),
(4, 'Teste de Inclusao', 12345678, 4, '1970-10-10'),
(5, 'Teste de Inclusao', 12345678, 4, '1970-10-10'),
(6, 'trocando valor', 11111111, 5, '1970-12-15');

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

--
-- Estrutura da tabela `modelos_de_carros`
--

DROP TABLE IF EXISTS `modelos_de_carros`;
CREATE TABLE IF NOT EXISTS `modelos_de_carros` (
  `id_modelo` int(4) NOT NULL,
  `id_fabricante` int(4) NOT NULL,
  `tx_descricao_modelo` varchar(250) COLLATE utf8_bin NOT NULL,
  `dt_cadastro` date NOT NULL,
  PRIMARY KEY (`id_modelo`),
  KEY `id_fabricante` (`id_fabricante`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `modelos_de_carros`
--

INSERT INTO `modelos_de_carros` (`id_modelo`, `id_fabricante`, `tx_descricao_modelo`, `dt_cadastro`) VALUES
(1, 1, 'Gol 1.0', '2002-05-20'),
(2, 1, 'Santana 2.0', '2002-02-02'),
(3, 1, 'voyage 1.6', '2002-02-02'),
(4, 1, 'Golf 2.0', '2002-02-02');

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

--
-- Estrutura da tabela `movimentos`
--

DROP TABLE IF EXISTS `movimentos`;
CREATE TABLE IF NOT EXISTS `movimentos` (
  `id_movimento` int(6) NOT NULL,
  `id_livro` int(9) DEFAULT NULL,
  `id_funcionario` int(5) DEFAULT NULL,
  `dt_movimento` date NOT NULL,
  `id_tipo_movimento` int(3) DEFAULT NULL,
  `dt_prevista_devolucao` date NOT NULL,
  `dt_real_devolucao` date DEFAULT NULL,
  PRIMARY KEY (`id_movimento`),
  KEY `id_livro` (`id_livro`),
  KEY `id_funcionario` (`id_funcionario`),
  KEY `id_tipo_movimento` (`id_tipo_movimento`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `movimentos`
--

INSERT INTO `movimentos` (`id_movimento`, `id_livro`, `id_funcionario`, `dt_movimento`, `id_tipo_movimento`, `dt_prevista_devolucao`, `dt_real_devolucao`) VALUES
(1, 4, 10, '2010-12-10', 2, '2010-12-12', '0000-00-00'),
(2, 4, 150, '2010-12-10', 2, '2010-12-15', '0000-00-00'),
(3, 4, 150, '2010-12-10', 4, '2010-12-15', '0000-00-00'),
(4, 4, 150, '2010-11-10', 2, '2010-11-16', '0000-00-00');

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

--
-- Estrutura da tabela `movimentos_tipos`
--

DROP TABLE IF EXISTS `movimentos_tipos`;
CREATE TABLE IF NOT EXISTS `movimentos_tipos` (
  `id_tipo_movimento` int(3) NOT NULL,
  `tx_nome_tipomov` varchar(80) COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`id_tipo_movimento`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `movimentos_tipos`
--

INSERT INTO `movimentos_tipos` (`id_tipo_movimento`, `tx_nome_tipomov`) VALUES
(1, 'Emprestimo entre Bibliotecas'),
(2, 'Consulta'),
(3, 'Reserva'),
(4, 'Retirada dentro da Biblioteca'),
(5, 'Said_a para digitaliza'),
(6, 'Retorno da Digitalizacao');

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

--
-- Estrutura da tabela `niveis_de_educacao`
--

DROP TABLE IF EXISTS `niveis_de_educacao`;
CREATE TABLE IF NOT EXISTS `niveis_de_educacao` (
  `id_nivel_educacao` int(2) NOT NULL,
  `tx_nome_comum` varchar(30) COLLATE utf8_bin NOT NULL,
  `dt_cadastro` date NOT NULL,
  `qt_anos_de_estudo` int(2) NOT NULL,
  PRIMARY KEY (`id_nivel_educacao`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `niveis_de_educacao`
--

INSERT INTO `niveis_de_educacao` (`id_nivel_educacao`, `tx_nome_comum`, `dt_cadastro`, `qt_anos_de_estudo`) VALUES
(14, 'Ensino fundamental I', '2010-10-10', 4),
(15, 'Ensino Fundamental II', '2010-10-10', 4),
(16, 'Jardim I', '0000-00-00', 1),
(17, 'Jardim II', '2010-10-10', 2),
(18, 'Ensino Medio', '2010-10-10', 3),
(19, 'Superior', '2010-10-10', 5),
(20, 'Pos-Graduacao (Mestrado)', '2010-10-10', 3),
(99, 'Pos-Graduacao (Doutorado)', '2010-10-10', 5),
(100, 'Pos-Graduacao (MBA)', '2010-10-10', 1);

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

--
-- Estrutura da tabela `notas_fiscais_vendas`
--

DROP TABLE IF EXISTS `notas_fiscais_vendas`;
CREATE TABLE IF NOT EXISTS `notas_fiscais_vendas` (
  `nu_nota_fiscal_venda` int(6) NOT NULL,
  `vl_total_nota_venda` double(15,2) DEFAULT NULL,
  `dt_venda` date NOT NULL DEFAULT '0000-00-00',
  `id_funcionario` int(6) DEFAULT NULL,
  `id_regiao` int(3) DEFAULT '0',
  `id_armazem` int(4) DEFAULT NULL,
  `id_cliente` int(4) DEFAULT NULL,
  PRIMARY KEY (`nu_nota_fiscal_venda`),
  KEY `id_regiao` (`id_regiao`),
  KEY `id_armazem` (`id_armazem`),
  KEY `id_cliente` (`id_cliente`),
  KEY `id_funcionario` (`id_funcionario`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `notas_fiscais_vendas`
--

INSERT INTO `notas_fiscais_vendas` (`nu_nota_fiscal_venda`, `vl_total_nota_venda`, `dt_venda`, `id_funcionario`, `id_regiao`, `id_armazem`, `id_cliente`) VALUES
(1, 500.00, '2010-12-10', 10, 1, 1, 1),
(2, 60.00, '2005-12-31', 10, 2, 1, 1),
(3, 80.00, '2005-12-31', 10, 1, 1, 1),
(4, 60.00, '2005-12-31', 10, 2, 3, 1),
(5, 60.00, '2005-12-31', 10, 3, 2, 1),
(6, 60.00, '2005-12-31', 10, 1, 1, 1),
(7, 40.00, '2006-03-29', 10, 1, 2, 1),
(8, 80.00, '2006-03-29', 10, 2, 3, 1),
(9, 80.00, '2006-03-29', 10, 1, 1, 1),
(10, 80.00, '2006-03-29', 10, 2, 2, 1),
(11, 80.00, '2006-03-29', 10, 4, 3, 1),
(12, 60.00, '2006-03-29', 10, 1, 2, 1),
(13, 80.00, '2006-03-29', 10, 2, 1, 1),
(15, 80.00, '2006-03-30', 20, 1, 3, 1),
(16, 60.00, '2006-03-30', 20, 2, 1, 1),
(17, 80.00, '2006-03-30', 20, 3, 2, 1),
(18, 80.00, '2006-03-30', 20, 1, 1, 1),
(19, 80.00, '2006-03-30', 20, 2, 2, 1),
(20, 80.00, '2006-03-30', 20, 3, 3, 1),
(21, 80.00, '2006-04-01', 20, 1, 3, 1),
(22, 80.00, '2006-03-30', 20, 4, 3, 1),
(23, 80.00, '2006-03-31', 20, 1, 1, 1),
(24, 80.00, '2006-03-31', 20, 1, 1, 1),
(25, 60.00, '2006-03-31', 20, 2, 2, 1),
(26, 60.00, '2006-03-31', 20, 3, 3, 1),
(27, 80.00, '2006-03-31', 20, 4, 1, 1),
(28, 80.00, '2006-03-31', 20, 4, 2, 1),
(29, 80.00, '2006-03-31', 30, 1, 2, 1),
(30, 80.00, '2006-03-31', 30, 1, 3, 1),
(31, 80.00, '2006-03-31', 30, 2, 1, 1),
(32, 80.00, '2006-04-01', 30, 1, 2, 1),
(33, 80.00, '2006-04-01', 30, 4, 3, 1),
(34, 80.00, '2006-04-01', 30, 1, 1, 1),
(35, 60.00, '2006-04-01', 30, 1, 3, 1),
(36, 60.00, '2006-04-01', 30, 2, 2, 1),
(37, 80.00, '2006-04-01', 30, 4, 2, 1),
(38, 80.00, '2006-04-01', 30, 1, 1, 1),
(39, 80.00, '1996-03-29', 30, 1, 1, 2),
(40, 80.00, '2005-12-31', NULL, 2, 1, 2),
(41, 80.00, '2005-12-31', NULL, 1, 1, 2),
(42, 80.00, '2005-12-31', NULL, 2, 3, 2),
(43, 40.00, '2005-12-31', NULL, 3, 2, 2),
(44, 80.00, '2005-12-31', NULL, 1, 1, 2),
(45, 80.00, '2006-03-29', NULL, 1, 2, 2),
(46, 80.00, '2006-03-29', NULL, 2, 3, 2),
(47, 80.00, '2006-03-29', NULL, 1, 1, 2),
(48, 60.00, '2006-03-29', NULL, 2, 2, 2),
(49, 80.00, '2006-03-29', NULL, 4, 3, 2),
(50, 80.00, '2006-03-29', NULL, 1, 2, 2),
(51, 80.00, '2006-03-29', NULL, 2, 1, 2),
(53, 80.00, '2006-03-30', NULL, 1, 3, 2),
(54, 80.00, '2006-03-30', NULL, 2, 1, 2),
(55, 80.00, '2006-03-30', NULL, 3, 2, 2),
(56, 80.00, '2006-03-30', NULL, 1, 1, 2),
(57, 40.00, '2006-03-30', NULL, 2, 2, 2),
(58, 80.00, '2006-03-30', NULL, 3, 3, 2),
(59, 80.00, '2006-04-01', NULL, 1, 3, 2),
(60, 80.00, '2006-03-30', NULL, 4, 3, 2),
(61, 40.00, '2006-03-31', NULL, 1, 1, 2),
(62, 80.00, '2006-03-31', NULL, 1, 1, 2),
(63, 80.00, '2006-03-31', NULL, 2, 2, 2),
(64, 80.00, '2006-03-31', NULL, 3, 3, 2),
(65, 80.00, '2006-03-31', NULL, 4, 1, 2),
(66, 60.00, '2006-03-31', NULL, 4, 2, 2),
(67, 40.00, '2006-03-31', NULL, 1, 2, 2),
(68, 80.00, '2006-03-31', NULL, 1, 3, 2),
(69, 80.00, '2006-03-31', NULL, 2, 1, 2),
(70, 80.00, '2006-04-01', NULL, 1, 2, 2),
(71, 60.00, '2006-04-01', NULL, 4, 3, 2),
(72, 60.00, '2006-04-01', NULL, 1, 1, 2),
(73, 80.00, '2006-04-01', NULL, 1, 3, 2),
(74, 80.00, '2006-04-01', NULL, 2, 2, 2),
(75, 80.00, '2006-04-01', NULL, 4, 2, 2),
(76, 80.00, '2006-04-01', NULL, 1, 1, 2),
(77, 40.00, '1996-03-29', NULL, 1, 1, 3),
(78, 80.00, '2005-12-31', NULL, 2, 1, 3),
(79, 80.00, '2005-12-31', NULL, 1, 1, 3),
(80, 80.00, '2005-12-31', NULL, 2, 3, 3),
(81, 60.00, '2005-12-31', NULL, 3, 2, 3),
(82, 60.00, '2005-12-31', NULL, 1, 1, 3),
(83, 60.00, '2006-03-29', NULL, 1, 2, 3),
(84, 80.00, '2006-03-29', NULL, 2, 3, 3),
(85, 80.00, '2006-03-29', NULL, 1, 1, 3),
(86, 60.00, '2006-03-29', NULL, 2, 2, 3),
(87, 60.00, '2006-03-29', NULL, 4, 3, 3),
(88, 60.00, '2006-03-29', NULL, 1, 2, 3),
(89, 80.00, '2006-03-29', NULL, 2, 1, 3),
(91, 80.00, '2006-03-30', NULL, 1, 3, 3),
(92, 80.00, '2006-03-30', NULL, 2, 1, 3),
(93, 80.00, '2006-03-30', NULL, 3, 2, 3),
(94, 40.00, '2006-03-30', NULL, 1, 1, 3),
(95, 80.00, '2006-03-30', NULL, 2, 2, 3),
(96, 40.00, '2006-03-30', NULL, 3, 3, 3),
(97, 60.00, '2006-04-01', NULL, 1, 3, 3),
(98, 60.00, '2006-03-30', NULL, 4, 3, 3),
(99, 60.00, '2006-03-31', NULL, 1, 1, 3),
(100, 60.00, '2006-03-31', NULL, 1, 1, 3),
(101, 40.00, '2006-03-31', NULL, 2, 2, 3),
(102, 60.00, '2006-03-31', NULL, 3, 3, 3),
(103, 60.00, '2006-03-31', NULL, 4, 1, 3),
(104, 40.00, '2006-03-31', NULL, 4, 2, 3),
(105, 40.00, '2006-03-31', NULL, 1, 2, 3),
(106, 60.00, '2006-03-31', NULL, 1, 3, 3),
(107, 60.00, '2006-03-31', NULL, 2, 1, 3),
(108, 80.00, '2006-04-01', NULL, 1, 2, 3),
(109, 60.00, '2006-04-01', NULL, 4, 3, 3),
(110, 80.00, '2006-04-01', NULL, 1, 1, 3),
(111, 80.00, '2006-04-01', NULL, 1, 3, 3),
(112, 60.00, '2006-04-01', NULL, 2, 2, 3),
(113, 60.00, '2006-04-01', NULL, 4, 2, 3),
(114, 60.00, '2006-04-01', NULL, 1, 1, 3),
(115, 60.00, '1996-03-29', NULL, 1, 1, 3),
(116, 60.00, '2005-12-31', NULL, 2, 1, 3),
(117, 80.00, '2005-12-31', NULL, 1, 1, 3),
(118, 40.00, '2005-12-31', NULL, 2, 3, 3),
(119, 80.00, '2005-12-31', NULL, 3, 2, 3),
(120, 40.00, '2005-12-31', NULL, 1, 1, 3),
(121, 60.00, '2006-03-29', NULL, 1, 2, 3),
(122, 60.00, '2006-03-29', NULL, 2, 3, 3),
(123, 40.00, '2006-03-29', NULL, 1, 1, 3),
(124, 60.00, '2006-03-29', NULL, 2, 2, 3),
(125, 60.00, '2006-03-29', NULL, 4, 3, 3),
(126, 40.00, '2006-03-29', NULL, 1, 2, 3),
(127, 80.00, '2006-03-29', NULL, 2, 1, 3),
(129, 80.00, '2006-03-30', NULL, 1, 3, 3),
(130, 80.00, '2006-03-30', NULL, 2, 1, 3),
(131, 80.00, '2006-03-30', NULL, 3, 2, 3),
(132, 40.00, '2006-03-30', NULL, 1, 1, 3),
(133, 80.00, '2006-03-30', NULL, 2, 2, 3),
(134, 40.00, '2006-03-30', NULL, 3, 3, 3),
(135, 80.00, '2006-04-01', NULL, 1, 3, 3),
(136, 40.00, '2006-03-30', NULL, 4, 3, 3),
(137, 80.00, '2006-03-31', NULL, 1, 1, 3),
(138, 40.00, '2006-03-31', NULL, 1, 1, 3),
(139, 80.00, '2006-03-31', NULL, 2, 2, 3),
(140, 60.00, '2006-03-31', NULL, 3, 3, 3),
(141, 60.00, '2006-03-31', NULL, 4, 1, 3),
(142, 60.00, '2006-03-31', NULL, 4, 2, 3),
(143, 60.00, '2006-03-31', NULL, 1, 2, 3),
(144, 40.00, '2006-03-31', NULL, 1, 3, 3),
(145, 60.00, '2006-03-31', NULL, 2, 1, 3),
(146, 80.00, '2006-04-01', NULL, 1, 2, 3),
(147, 80.00, '2006-04-01', NULL, 4, 3, 3),
(148, 80.00, '2006-04-01', NULL, 1, 1, 3),
(149, 80.00, '2006-04-01', NULL, 1, 3, 3),
(150, 40.00, '2006-04-01', NULL, 2, 2, 3),
(151, 80.00, '2006-04-01', NULL, 4, 2, 3),
(8787, 26120.00, '2010-12-10', 10, 1, 3, 1);

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

--
-- Estrutura da tabela `notas_fiscais_vendas_itens`
--

DROP TABLE IF EXISTS `notas_fiscais_vendas_itens`;
CREATE TABLE IF NOT EXISTS `notas_fiscais_vendas_itens` (
  `nu_nota_venda` int(6) NOT NULL,
  `id_produto` int(4) NOT NULL,
  `qt_vendida` int(8) NOT NULL,
  `vl_unitario_venda` double(10,2) NOT NULL,
  PRIMARY KEY (`nu_nota_venda`,`id_produto`),
  KEY `nu_nota_venda` (`nu_nota_venda`),
  KEY `id_produto` (`id_produto`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `notas_fiscais_vendas_itens`
--

INSERT INTO `notas_fiscais_vendas_itens` (`nu_nota_venda`, `id_produto`, `qt_vendida`, `vl_unitario_venda`) VALUES
(1, 1, 10, 10.00),
(1, 2, 20, 20.00),
(2, 1, 10, 2.00),
(2, 3, 10, 2.00),
(2, 4, 10, 2.00),
(3, 1, 10, 2.00),
(3, 2, 10, 2.00),
(3, 3, 10, 2.00),
(3, 4, 10, 2.00),
(4, 1, 10, 2.00),
(4, 3, 10, 2.00),
(4, 4, 10, 2.00),
(5, 1, 10, 2.00),
(5, 2, 10, 2.00),
(5, 4, 10, 2.00),
(6, 1, 10, 2.00),
(6, 2, 10, 2.00),
(6, 4, 10, 2.00),
(7, 1, 10, 2.00),
(7, 2, 10, 2.00),
(8, 1, 10, 2.00),
(8, 2, 10, 2.00),
(8, 3, 10, 2.00),
(8, 4, 10, 2.00),
(9, 1, 10, 2.00),
(9, 2, 10, 2.00),
(9, 3, 10, 2.00),
(9, 4, 10, 2.00),
(10, 1, 10, 2.00),
(10, 2, 10, 2.00),
(10, 3, 10, 2.00),
(10, 4, 10, 2.00),
(11, 1, 10, 2.00),
(11, 2, 10, 2.00),
(11, 3, 10, 2.00),
(11, 4, 10, 2.00),
(12, 1, 10, 2.00),
(12, 2, 10, 2.00),
(12, 3, 10, 2.00),
(13, 1, 10, 2.00),
(13, 2, 10, 2.00),
(13, 3, 10, 2.00),
(13, 4, 10, 2.00),
(15, 1, 10, 2.00),
(15, 2, 10, 2.00),
(15, 3, 10, 2.00),
(15, 4, 10, 2.00),
(16, 1, 10, 2.00),
(16, 2, 10, 2.00),
(16, 3, 10, 2.00),
(17, 1, 10, 2.00),
(17, 2, 10, 2.00),
(17, 3, 10, 2.00),
(17, 4, 10, 2.00),
(18, 1, 10, 2.00),
(18, 2, 10, 2.00),
(18, 3, 10, 2.00),
(18, 4, 10, 2.00),
(19, 1, 10, 2.00),
(19, 2, 10, 2.00),
(19, 3, 10, 2.00),
(19, 4, 10, 2.00),
(20, 1, 10, 2.00),
(20, 2, 10, 2.00),
(20, 3, 10, 2.00),
(20, 4, 10, 2.00),
(21, 1, 10, 2.00),
(21, 2, 10, 2.00),
(21, 3, 10, 2.00),
(21, 4, 10, 2.00),
(22, 1, 10, 2.00),
(22, 2, 10, 2.00),
(22, 3, 10, 2.00),
(22, 4, 10, 2.00),
(23, 1, 10, 2.00),
(23, 2, 10, 2.00),
(23, 3, 10, 2.00),
(23, 4, 10, 2.00),
(24, 1, 10, 2.00),
(24, 2, 10, 2.00),
(24, 3, 10, 2.00),
(24, 4, 10, 2.00),
(25, 1, 10, 2.00),
(25, 3, 10, 2.00),
(25, 4, 10, 2.00),
(26, 1, 10, 2.00),
(26, 3, 10, 2.00),
(26, 4, 10, 2.00),
(27, 1, 10, 2.00),
(27, 2, 10, 2.00),
(27, 3, 10, 2.00),
(27, 4, 10, 2.00),
(28, 1, 10, 2.00),
(28, 2, 10, 2.00),
(28, 3, 10, 2.00),
(28, 4, 10, 2.00),
(29, 1, 10, 2.00),
(29, 2, 10, 2.00),
(29, 3, 10, 2.00),
(29, 4, 10, 2.00),
(30, 1, 10, 2.00),
(30, 2, 10, 2.00),
(30, 3, 10, 2.00),
(30, 4, 10, 2.00),
(31, 1, 10, 2.00),
(31, 2, 10, 2.00),
(31, 3, 10, 2.00),
(31, 4, 10, 2.00),
(32, 1, 10, 2.00),
(32, 2, 10, 2.00),
(32, 3, 10, 2.00),
(32, 4, 10, 2.00),
(33, 1, 10, 2.00),
(33, 2, 10, 2.00),
(33, 3, 10, 2.00),
(33, 4, 10, 2.00),
(34, 1, 10, 2.00),
(34, 2, 10, 2.00),
(34, 3, 10, 2.00),
(34, 4, 10, 2.00),
(35, 2, 10, 2.00),
(35, 3, 10, 2.00),
(35, 4, 10, 2.00),
(36, 2, 10, 2.00),
(36, 3, 10, 2.00),
(36, 4, 10, 2.00),
(37, 1, 10, 2.00),
(37, 2, 10, 2.00),
(37, 3, 10, 2.00),
(37, 4, 10, 2.00),
(38, 1, 10, 2.00),
(38, 2, 10, 2.00),
(38, 3, 10, 2.00),
(38, 4, 10, 2.00),
(39, 1, 10, 2.00),
(39, 2, 10, 2.00),
(39, 3, 10, 2.00),
(39, 4, 10, 2.00),
(40, 1, 10, 2.00),
(40, 2, 10, 2.00),
(40, 3, 10, 2.00),
(40, 4, 10, 2.00),
(41, 1, 10, 2.00),
(41, 2, 10, 2.00),
(41, 3, 10, 2.00),
(41, 4, 10, 2.00),
(42, 1, 10, 2.00),
(42, 2, 10, 2.00),
(42, 3, 10, 2.00),
(42, 4, 10, 2.00),
(43, 2, 10, 2.00),
(43, 4, 10, 2.00),
(44, 1, 10, 2.00),
(44, 2, 10, 2.00),
(44, 3, 10, 2.00),
(44, 4, 10, 2.00),
(45, 1, 10, 2.00),
(45, 2, 10, 2.00),
(45, 3, 10, 2.00),
(45, 4, 10, 2.00),
(46, 1, 10, 2.00),
(46, 2, 10, 2.00),
(46, 3, 10, 2.00),
(46, 4, 10, 2.00),
(47, 1, 10, 2.00),
(47, 2, 10, 2.00),
(47, 3, 10, 2.00),
(47, 4, 10, 2.00),
(48, 1, 10, 2.00),
(48, 2, 10, 2.00),
(48, 4, 10, 2.00),
(49, 1, 10, 2.00),
(49, 2, 10, 2.00),
(49, 3, 10, 2.00),
(49, 4, 10, 2.00),
(50, 1, 10, 2.00),
(50, 2, 10, 2.00),
(50, 3, 10, 2.00),
(50, 4, 10, 2.00),
(51, 1, 10, 2.00),
(51, 2, 10, 2.00),
(51, 3, 10, 2.00),
(51, 4, 10, 2.00),
(53, 1, 10, 2.00),
(53, 2, 10, 2.00),
(53, 3, 10, 2.00),
(53, 4, 10, 2.00),
(54, 1, 10, 2.00),
(54, 2, 10, 2.00),
(54, 3, 10, 2.00),
(54, 4, 10, 2.00),
(55, 1, 10, 2.00),
(55, 2, 10, 2.00),
(55, 3, 10, 2.00),
(55, 4, 10, 2.00),
(56, 1, 10, 2.00),
(56, 2, 10, 2.00),
(56, 3, 10, 2.00),
(56, 4, 10, 2.00),
(57, 3, 10, 2.00),
(57, 4, 10, 2.00),
(58, 1, 10, 2.00),
(58, 2, 10, 2.00),
(58, 3, 10, 2.00),
(58, 4, 10, 2.00),
(59, 1, 10, 2.00),
(59, 2, 10, 2.00),
(59, 3, 10, 2.00),
(59, 4, 10, 2.00),
(60, 1, 10, 2.00),
(60, 2, 10, 2.00),
(60, 3, 10, 2.00),
(60, 4, 10, 2.00),
(61, 1, 10, 2.00),
(61, 4, 10, 2.00),
(62, 1, 10, 2.00),
(62, 2, 10, 2.00),
(62, 3, 10, 2.00),
(62, 4, 10, 2.00),
(63, 1, 10, 2.00),
(63, 2, 10, 2.00),
(63, 3, 10, 2.00),
(63, 4, 10, 2.00),
(64, 1, 10, 2.00),
(64, 2, 10, 2.00),
(64, 3, 10, 2.00),
(64, 4, 10, 2.00),
(65, 1, 10, 2.00),
(65, 2, 10, 2.00),
(65, 3, 10, 2.00),
(65, 4, 10, 2.00),
(66, 1, 10, 2.00),
(66, 2, 10, 2.00),
(66, 3, 10, 2.00),
(67, 3, 10, 2.00),
(67, 4, 10, 2.00),
(68, 1, 10, 2.00),
(68, 2, 10, 2.00),
(68, 3, 10, 2.00),
(68, 4, 10, 2.00),
(69, 1, 10, 2.00),
(69, 2, 10, 2.00),
(69, 3, 10, 2.00),
(69, 4, 10, 2.00),
(70, 1, 10, 2.00),
(70, 2, 10, 2.00),
(70, 3, 10, 2.00),
(70, 4, 10, 2.00),
(71, 1, 10, 2.00),
(71, 2, 10, 2.00),
(71, 3, 10, 2.00),
(72, 2, 10, 2.00),
(72, 3, 10, 2.00),
(72, 4, 10, 2.00),
(73, 1, 10, 2.00),
(73, 2, 10, 2.00),
(73, 3, 10, 2.00),
(73, 4, 10, 2.00),
(74, 1, 10, 2.00),
(74, 2, 10, 2.00),
(74, 3, 10, 2.00),
(74, 4, 10, 2.00),
(75, 1, 10, 2.00),
(75, 2, 10, 2.00),
(75, 3, 10, 2.00),
(75, 4, 10, 2.00),
(76, 1, 10, 2.00),
(76, 2, 10, 2.00),
(76, 3, 10, 2.00),
(76, 4, 10, 2.00),
(77, 3, 10, 2.00),
(77, 4, 10, 2.00),
(78, 1, 10, 2.00),
(78, 2, 10, 2.00),
(78, 3, 10, 2.00),
(78, 4, 10, 2.00),
(79, 1, 10, 2.00),
(79, 2, 10, 2.00),
(79, 3, 10, 2.00),
(79, 4, 10, 2.00),
(80, 1, 10, 2.00),
(80, 2, 10, 2.00),
(80, 3, 10, 2.00),
(80, 4, 10, 2.00),
(81, 1, 10, 2.00),
(81, 2, 10, 2.00),
(81, 4, 10, 2.00),
(82, 1, 10, 2.00),
(82, 3, 10, 2.00),
(82, 4, 10, 2.00),
(83, 1, 10, 2.00),
(83, 3, 10, 2.00),
(83, 4, 10, 2.00),
(84, 1, 10, 2.00),
(84, 2, 10, 2.00),
(84, 3, 10, 2.00),
(84, 4, 10, 2.00),
(85, 1, 10, 2.00),
(85, 2, 10, 2.00),
(85, 3, 10, 2.00),
(85, 4, 10, 2.00),
(86, 1, 10, 2.00),
(86, 3, 10, 2.00),
(86, 4, 10, 2.00),
(87, 1, 10, 2.00),
(87, 2, 10, 2.00),
(87, 3, 10, 2.00),
(88, 1, 10, 2.00),
(88, 2, 10, 2.00),
(88, 3, 10, 2.00),
(89, 1, 10, 2.00),
(89, 2, 10, 2.00),
(89, 3, 10, 2.00),
(89, 4, 10, 2.00),
(91, 1, 10, 2.00),
(91, 2, 10, 2.00),
(91, 3, 10, 2.00),
(91, 4, 10, 2.00),
(92, 1, 10, 2.00),
(92, 2, 10, 2.00),
(92, 3, 10, 2.00),
(92, 4, 10, 2.00),
(93, 1, 10, 2.00),
(93, 2, 10, 2.00),
(93, 3, 10, 2.00),
(93, 4, 10, 2.00),
(94, 1, 10, 2.00),
(94, 2, 10, 2.00),
(95, 1, 10, 2.00),
(95, 2, 10, 2.00),
(95, 3, 10, 2.00),
(95, 4, 10, 2.00),
(96, 1, 10, 2.00),
(96, 4, 10, 2.00),
(97, 1, 10, 2.00),
(97, 3, 10, 2.00),
(97, 4, 10, 2.00),
(98, 1, 10, 2.00),
(98, 3, 10, 2.00),
(98, 4, 10, 2.00),
(99, 1, 10, 2.00),
(99, 3, 10, 2.00),
(99, 4, 10, 2.00),
(100, 1, 10, 2.00),
(100, 3, 10, 2.00),
(100, 4, 10, 2.00),
(101, 1, 10, 2.00),
(101, 3, 10, 2.00),
(102, 2, 10, 2.00),
(102, 3, 10, 2.00),
(102, 4, 10, 2.00),
(103, 2, 10, 2.00),
(103, 3, 10, 2.00),
(103, 4, 10, 2.00),
(104, 2, 10, 2.00),
(104, 3, 10, 2.00),
(105, 1, 10, 2.00),
(105, 3, 10, 2.00),
(106, 1, 10, 2.00),
(106, 2, 10, 2.00),
(106, 4, 10, 2.00),
(107, 1, 10, 2.00),
(107, 2, 10, 2.00),
(107, 3, 10, 2.00),
(108, 1, 10, 2.00),
(108, 2, 10, 2.00),
(108, 3, 10, 2.00),
(108, 4, 10, 2.00),
(109, 2, 10, 2.00),
(109, 3, 10, 2.00),
(109, 4, 10, 2.00),
(110, 1, 10, 2.00),
(110, 2, 10, 2.00),
(110, 3, 10, 2.00),
(110, 4, 10, 2.00),
(111, 1, 10, 2.00),
(111, 2, 10, 2.00),
(111, 3, 10, 2.00),
(111, 4, 10, 2.00),
(112, 1, 10, 2.00),
(112, 2, 10, 2.00),
(112, 4, 10, 2.00),
(113, 1, 10, 2.00),
(113, 2, 10, 2.00),
(113, 4, 10, 2.00),
(114, 1, 10, 2.00),
(114, 3, 10, 2.00),
(114, 4, 10, 2.00),
(115, 1, 10, 2.00),
(115, 2, 10, 2.00),
(115, 3, 10, 2.00),
(116, 2, 10, 2.00),
(116, 3, 10, 2.00),
(116, 4, 10, 2.00),
(117, 1, 10, 2.00),
(117, 2, 10, 2.00),
(117, 3, 10, 2.00),
(117, 4, 10, 2.00),
(118, 3, 10, 2.00),
(118, 4, 10, 2.00),
(119, 1, 10, 2.00),
(119, 2, 10, 2.00),
(119, 3, 10, 2.00),
(119, 4, 10, 2.00),
(120, 3, 10, 2.00),
(120, 4, 10, 2.00),
(121, 1, 10, 2.00),
(121, 2, 10, 2.00),
(121, 3, 10, 2.00),
(122, 2, 10, 2.00),
(122, 3, 10, 2.00),
(122, 4, 10, 2.00),
(123, 3, 10, 2.00),
(123, 4, 10, 2.00),
(124, 1, 10, 2.00),
(124, 2, 10, 2.00),
(124, 3, 10, 2.00),
(125, 2, 10, 2.00),
(125, 3, 10, 2.00),
(125, 4, 10, 2.00),
(126, 1, 10, 2.00),
(126, 2, 10, 2.00),
(127, 1, 10, 2.00),
(127, 2, 10, 2.00),
(127, 3, 10, 2.00),
(127, 4, 10, 2.00),
(129, 1, 10, 2.00),
(129, 2, 10, 2.00),
(129, 3, 10, 2.00),
(129, 4, 10, 2.00),
(130, 1, 10, 2.00),
(130, 2, 10, 2.00),
(130, 3, 10, 2.00),
(130, 4, 10, 2.00),
(131, 1, 10, 2.00),
(131, 2, 10, 2.00),
(131, 3, 10, 2.00),
(131, 4, 10, 2.00),
(132, 1, 10, 2.00),
(132, 2, 10, 2.00),
(133, 1, 10, 2.00),
(133, 2, 10, 2.00),
(133, 3, 10, 2.00),
(133, 4, 10, 2.00),
(134, 3, 10, 2.00),
(134, 4, 10, 2.00),
(135, 1, 10, 2.00),
(135, 2, 10, 2.00),
(135, 3, 10, 2.00),
(135, 4, 10, 2.00),
(136, 3, 10, 2.00),
(136, 4, 10, 2.00),
(137, 1, 10, 2.00),
(137, 2, 10, 2.00),
(137, 3, 10, 2.00),
(137, 4, 10, 2.00),
(138, 3, 10, 2.00),
(138, 4, 10, 2.00),
(139, 1, 10, 2.00),
(139, 2, 10, 2.00),
(139, 3, 10, 2.00),
(139, 4, 10, 2.00),
(140, 1, 10, 2.00),
(140, 3, 10, 2.00),
(140, 4, 10, 2.00),
(141, 1, 10, 2.00),
(141, 3, 10, 2.00),
(141, 4, 10, 2.00),
(142, 1, 10, 2.00),
(142, 2, 10, 2.00),
(142, 3, 10, 2.00),
(143, 1, 10, 2.00),
(143, 2, 10, 2.00),
(143, 3, 10, 2.00),
(144, 2, 10, 2.00),
(144, 3, 10, 2.00),
(145, 1, 10, 2.00),
(145, 2, 10, 2.00),
(145, 4, 10, 2.00),
(146, 1, 10, 2.00),
(146, 2, 10, 2.00),
(146, 3, 10, 2.00),
(146, 4, 10, 2.00),
(147, 1, 10, 2.00),
(147, 2, 10, 2.00),
(147, 3, 10, 2.00),
(147, 4, 10, 2.00),
(148, 1, 10, 2.00),
(148, 2, 10, 2.00),
(148, 3, 10, 2.00),
(148, 4, 10, 2.00),
(149, 1, 10, 2.00),
(149, 2, 10, 2.00),
(149, 3, 10, 2.00),
(149, 4, 10, 2.00),
(150, 3, 10, 2.00),
(150, 4, 10, 2.00),
(151, 1, 10, 2.00),
(151, 2, 10, 2.00),
(151, 3, 10, 2.00),
(151, 4, 10, 2.00),
(8787, 3, 20, 45.00),
(8787, 4, 20, 1201.00),
(8787, 5, 10, 120.00);

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

--
-- Estrutura da tabela `ordens_de_compras`
--

DROP TABLE IF EXISTS `ordens_de_compras`;
CREATE TABLE IF NOT EXISTS `ordens_de_compras` (
  `id_ordem_compra` int(7) NOT NULL,
  `id_fornecedor` int(6) DEFAULT NULL,
  `dt_ordem_compra` date DEFAULT NULL,
  `id_funcionario` int(6) DEFAULT NULL,
  `ao_situacao` char(1) COLLATE utf8_bin DEFAULT NULL,
  `tx_comentarios` varchar(1000) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`id_ordem_compra`),
  KEY `id_fornecedor` (`id_fornecedor`),
  KEY `id_funcionario` (`id_funcionario`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `ordens_de_compras`
--

INSERT INTO `ordens_de_compras` (`id_ordem_compra`, `id_fornecedor`, `dt_ordem_compra`, `id_funcionario`, `ao_situacao`, `tx_comentarios`) VALUES
(1, 3, '2010-12-10', 10, 'A', 'Acabaou de fazeer'),
(345, 3, '2010-12-10', 20, 'A', 'Se');

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

--
-- Estrutura da tabela `ordens_de_compras_itens`
--

DROP TABLE IF EXISTS `ordens_de_compras_itens`;
CREATE TABLE IF NOT EXISTS `ordens_de_compras_itens` (
  `id_ordem_compra` int(7) NOT NULL,
  `id_produto` int(6) NOT NULL,
  `qt_comprada` int(5) NOT NULL,
  `vl_unitatio` double(10,2) NOT NULL,
  PRIMARY KEY (`id_ordem_compra`,`id_produto`),
  KEY `id_produto` (`id_produto`),
  KEY `id_ordem_compra` (`id_ordem_compra`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `ordens_de_compras_itens`
--

INSERT INTO `ordens_de_compras_itens` (`id_ordem_compra`, `id_produto`, `qt_comprada`, `vl_unitatio`) VALUES
(1, 1, 20, 200.00),
(1, 3, 100, 12.00),
(1, 4, 10, 1200.00),
(345, 2, 15, 10.00);

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

--
-- Estrutura da tabela `palavras_chaves`
--

DROP TABLE IF EXISTS `palavras_chaves`;
CREATE TABLE IF NOT EXISTS `palavras_chaves` (
  `id_palavra` int(6) NOT NULL,
  `tx_nome_palavra` varchar(15) COLLATE utf8_bin NOT NULL,
  `dt_cadastro` date NOT NULL,
  PRIMARY KEY (`id_palavra`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `palavras_chaves`
--

INSERT INTO `palavras_chaves` (`id_palavra`, `tx_nome_palavra`, `dt_cadastro`) VALUES
(1, 'Amor', '2010-12-13'),
(2, 'Carinho', '2010-12-13'),
(3, 'Amizade', '2010-12-13'),
(4, 'Convivencia', '2010-12-13'),
(5, 'Compreens', '2010-12-10'),
(6, 'Confian', '2010-12-10'),
(7, 'Solid_ariedade', '2010-12-10');

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

--
-- Estrutura da tabela `palavras_livros`
--

DROP TABLE IF EXISTS `palavras_livros`;
CREATE TABLE IF NOT EXISTS `palavras_livros` (
  `id_palavra` int(6) NOT NULL,
  `id_livro` int(9) NOT NULL,
  PRIMARY KEY (`id_palavra`,`id_livro`),
  KEY `id_livro` (`id_livro`),
  KEY `id_palavra` (`id_palavra`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `palavras_livros`
--

INSERT INTO `palavras_livros` (`id_palavra`, `id_livro`) VALUES
(2, 1),
(3, 4),
(4, 4);

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

--
-- Estrutura da tabela `planos_de_saude`
--

DROP TABLE IF EXISTS `planos_de_saude`;
CREATE TABLE IF NOT EXISTS `planos_de_saude` (
  `id_plano_de_saude` int(4) NOT NULL,
  `tx_nome_plano` varchar(200) COLLATE utf8_bin NOT NULL,
  `dt_cadastro` date NOT NULL,
  PRIMARY KEY (`id_plano_de_saude`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `planos_de_saude`
--

INSERT INTO `planos_de_saude` (`id_plano_de_saude`, `tx_nome_plano`, `dt_cadastro`) VALUES
(1, 'Unimed', '2010-10-27'),
(2, 'Golden Cross', '2010-10-27'),
(3, 'SulAmericana', '2010-10-27'),
(4, 'MedialSaude', '2010-10-27');

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

--
-- Estrutura da tabela `produtos`
--

DROP TABLE IF EXISTS `produtos`;
CREATE TABLE IF NOT EXISTS `produtos` (
  `id_produto` int(6) NOT NULL,
  `tx_nome` varchar(128) COLLATE utf8_bin DEFAULT NULL,
  `vl_preco` decimal(12,2) DEFAULT NULL,
  `vl_preco_promocao` decimal(12,2) DEFAULT NULL,
  `vl_preco_minimo` double(13,2) DEFAULT NULL,
  `qt_dias_promocao` bigint(10) DEFAULT NULL,
  `tx_descricao_completa` varchar(2000) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`id_produto`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `produtos`
--

INSERT INTO `produtos` (`id_produto`, `tx_nome`, `vl_preco`, `vl_preco_promocao`, `vl_preco_minimo`, `qt_dias_promocao`, `tx_descricao_completa`) VALUES
(1, 'metafluocoreto de pot', 34.00, 35.00, 26.00, 42, 'o metafluocoreto '),
(2, 'sulfito de s', 10.00, 20.00, 10.00, 2300, 'asdfasdfadsf'),
(3, 'enxofre', 30.00, 12.00, 23.00, 24, 'laskfjsdf'),
(4, 'amianto de s', 23.00, 22.00, 20.00, 12, 'asdfsadf'),
(5, 'Acid_o Sulf', 1200.00, 1100.00, 950.00, 2, 'Este ');

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

--
-- Estrutura da tabela `professores`
--

DROP TABLE IF EXISTS `professores`;
CREATE TABLE IF NOT EXISTS `professores` (
  `id_professor` int(3) NOT NULL,
  `tx_nomeprofessor` varchar(250) COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`id_professor`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `professores`
--

INSERT INTO `professores` (`id_professor`, `tx_nomeprofessor`) VALUES
(1, 'ANA MARIA VERDIM'),
(2, 'ABEL DA SILVA'),
(3, 'ABRAO ABUJANRA'),
(4, 'CARLOS TAKESHI UENDO'),
(5, 'DAVid_ GUTEMBERG'),
(6, 'FRANCISCO ROMEU DA CRUZ'),
(7, 'GERALDO BANDEIRAS PONTES'),
(8, 'HEITOR DE TROIA'),
(9, 'HERCULES OLIMPIANO'),
(10, 'IRINEU EVANGELISTA DE SOUZA'),
(11, 'JOAO HEULALIO DE BUENO Vid_IGAL'),
(12, 'JAIME DE ABREU POMPEU DE LIMA'),
(13, 'JOSE RAMOS DE ALMEid_A'),
(14, 'LEONid_AS DE PERCEPOLIS'),
(15, 'LEOPOLDO DE COUTO E SILVA'),
(16, 'MARIA MAURA CORREIA ALVES LIMA'),
(17, 'MARCIA DE ALBUQUERQUE LLIMA'),
(18, 'MARIO QUINTANA DRUMOND DE ANDRADE'),
(19, 'NAIR DE MELLO CUNHA'),
(20, 'NEIRE GONCALVES DE ALBUQUERQUE LINS'),
(21, 'OLIVIA CRUZ DO NASCIMENTO'),
(22, 'ODUVALDO VIANNA'),
(23, 'PASCOAL DE LIMA ROSA CRUZ'),
(24, 'RENATO CORTE REAL'),
(25, 'SEBASTIAO MELLO DA SILVA CRUZ'),
(26, 'TADEU BUARQUE DE HOLANDA'),
(27, 'ULISSES ODEBRECHT'),
(28, 'VINICIUS HUMBRTO PINHEIRO DA SILVA');

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

--
-- Estrutura da tabela `projetos`
--

DROP TABLE IF EXISTS `projetos`;
CREATE TABLE IF NOT EXISTS `projetos` (
  `id_projeto` char(6) COLLATE utf8_bin NOT NULL,
  `tx_nome_projeto` varchar(24) COLLATE utf8_bin NOT NULL DEFAULT '',
  `id_depto` char(3) COLLATE utf8_bin NOT NULL,
  `id_funcionario_responsavel` int(6) DEFAULT NULL,
  `vl_estimado` decimal(5,2) DEFAULT NULL,
  `dt_inicio` date DEFAULT NULL,
  `dt_termino` date DEFAULT NULL,
  `id_projeto_superior` char(6) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`id_projeto`),
  KEY `id_depto` (`id_depto`),
  KEY `id_funcionario_responsavel` (`id_funcionario_responsavel`),
  KEY `id_projeto_superior` (`id_projeto_superior`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `projetos`
--

INSERT INTO `projetos` (`id_projeto`, `tx_nome_projeto`, `id_depto`, `id_funcionario_responsavel`, `vl_estimado`, `dt_inicio`, `dt_termino`, `id_projeto_superior`) VALUES
('AD2323', 'Desenvolvimento de IA', 'F22', NULL, 999.99, '2019-12-12', '2009-10-10', NULL),
('AD3100', 'ADMIN SERVICES       ', 'A01', NULL, 6.50, '2002-01-01', '2003-02-01', 'AD3100'),
('AD3110', 'GENERAL ADMIN SYSTEMS', 'A01', NULL, 6.00, '2002-01-01', '2003-02-01', 'AD3100'),
('AD3112', 'PERSONNEL PROGRAMMING', 'B01', NULL, 1.00, '2002-01-01', '2003-02-01', 'AD3110'),
('AD3113', 'ACCOUNT PROGRAMMING  ', 'B01', NULL, 2.00, '2002-01-01', '2003-02-01', 'AD3110'),
('AD9999', 'PAYROLL PROGRAMMING  ', 'A01', NULL, 2.00, '2002-01-01', '2003-02-01', 'AD3110'),
('IF1000', 'QUERY SERVICES       ', 'B01', NULL, 2.00, '2002-01-01', '2003-02-01', 'IF1000'),
('IF2000', 'USER EDUCATION       ', 'C01', NULL, 1.00, '2002-01-01', '2003-02-01', 'IF2000'),
('MA2100', 'WELD LINE AUTOMATION ', 'C01', NULL, 12.00, '2002-01-01', '2003-02-01', 'MA2100'),
('MA2110', 'W L PROGRAMMING      ', 'D01', NULL, 9.00, '2002-01-01', '2003-02-01', 'MA2100'),
('MA2111', 'W L PROGRAM DESIGN   ', 'D01', NULL, 2.00, '2002-01-01', '1982-12-01', 'MA2110'),
('MA2112', 'W L ROBOT DESIGN     ', 'D11', NULL, 3.00, '2002-01-01', '1982-12-01', 'MA2110'),
('MA2113', 'W L PROD CONT PROGS  ', 'D11', NULL, 3.00, '2002-02-15', '1982-12-01', 'MA2110'),
('OP2000', 'GEN SYSTEMS SERVICES ', 'E01', NULL, 5.00, '2002-01-01', '2003-02-01', 'OP2000'),
('OP2010', 'SYSTEMS SUPPORT      ', 'E01', NULL, 4.00, '2002-01-01', '2003-02-01', 'OP2000'),
('OP2011', 'SCP SYSTEMS SUPPORT  ', 'E11', NULL, 1.00, '2002-01-01', '2003-02-01', 'OP2010'),
('OP2012', 'APPLICATIONS SUPPORT ', 'E11', NULL, 1.00, '2002-01-01', '2003-02-01', 'OP2010'),
('OP2013', 'DB/DC SUPPORT        ', 'E21', NULL, 1.00, '2002-01-01', '2003-02-01', 'OP2010'),
('PL2100', 'WELD LINE PLANNING   ', 'E21', NULL, 1.00, '2002-01-01', '2002-09-15', 'MA2100');

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

--
-- Estrutura da tabela `regioes`
--

DROP TABLE IF EXISTS `regioes`;
CREATE TABLE IF NOT EXISTS `regioes` (
  `id_regiao` int(3) NOT NULL,
  `tx_nome_Regiao` varchar(15) COLLATE utf8_bin NOT NULL,
  `qt_area_estimada` double(12,3) NOT NULL,
  PRIMARY KEY (`id_regiao`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `regioes`
--

INSERT INTO `regioes` (`id_regiao`, `tx_nome_Regiao`, `qt_area_estimada`) VALUES
(1, 'Sudeste', 2000.000),
(2, 'Sul', 2000.000),
(3, 'Norte', 2000.000),
(4, 'Nordeste', 2000.000),
(5, 'Noroeste', 2000.000),
(6, 'Nordeste', 12345.000);

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

--
-- Estrutura da tabela `seguradoras`
--

DROP TABLE IF EXISTS `seguradoras`;
CREATE TABLE IF NOT EXISTS `seguradoras` (
  `id_seguradora` int(4) NOT NULL,
  `tx_nome_seguradora` varchar(250) COLLATE utf8_bin NOT NULL,
  `nu_telefone` int(11) NOT NULL,
  `tx_logradouro` varchar(250) COLLATE utf8_bin NOT NULL,
  `id_cidade` int(4) NOT NULL,
  `dt_cadastro` date NOT NULL,
  PRIMARY KEY (`id_seguradora`),
  KEY `id_cidade` (`id_cidade`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `seguradoras`
--

INSERT INTO `seguradoras` (`id_seguradora`, `tx_nome_seguradora`, `nu_telefone`, `tx_logradouro`, `id_cidade`, `dt_cadastro`) VALUES
(1, 'Transamerica', 12312312, 'R. Tal, tal', 1, '2004-02-10'),
(2, 'Porto Seguro', 1433244567, 'R. Rui Barbosa, 123', 6, '2010-02-12'),
(3, 'Mapfre', 1433244567, 'R. Altino Arantes, 2345', 4, '2010-02-12'),
(4, 'Maritima Seg', 1433244567, 'Av. Paulista, 2345', 1, '2010-02-15');

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

--
-- Estrutura da tabela `seguros`
--

DROP TABLE IF EXISTS `seguros`;
CREATE TABLE IF NOT EXISTS `seguros` (
  `id_numero_apolice` int(6) NOT NULL,
  `id_placa` char(7) COLLATE utf8_bin NOT NULL,
  `id_seguradora` int(4) NOT NULL,
  `dt_contratacao` date NOT NULL,
  `dt_cadastro` date NOT NULL,
  `vl_cobertura` double(15,2) NOT NULL,
  UNIQUE KEY `id_numero_apolice` (`id_numero_apolice`),
  KEY `id_placa` (`id_placa`),
  KEY `id_seguradora` (`id_seguradora`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `seguros`
--

INSERT INTO `seguros` (`id_numero_apolice`, `id_placa`, `id_seguradora`, `dt_contratacao`, `dt_cadastro`, `vl_cobertura`) VALUES
(1245, 'ABC2345', 1, '2010-01-20', '2010-01-25', 25000.00),
(4567, 'ABC1234', 1, '2009-02-10', '2009-02-10', 25000.00);

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

--
-- Estrutura da tabela `setores_de_atuacao`
--

DROP TABLE IF EXISTS `setores_de_atuacao`;
CREATE TABLE IF NOT EXISTS `setores_de_atuacao` (
  `id_setor_atuacao` int(4) NOT NULL,
  `tx_nome_curto` varchar(90) COLLATE utf8_bin NOT NULL,
  `tx_descricao` varchar(250) COLLATE utf8_bin NOT NULL,
  `dt_cadastro` date NOT NULL,
  PRIMARY KEY (`id_setor_atuacao`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Extraindo dados da tabela `setores_de_atuacao`
--

