create table pessoa ( pessoa_id int not null primary key auto_increment, login char(25) not null, senha char(50) not null, nome char(100) not null, data_nascimento char(8), telres char(10), celular char(10), email char(100), status_reg int(1) not null default '1', status_com int (1) not null default '0' ); CREATE TABLE concorrente ( id_concorrente int(11) NOT NULL auto_increment, nome varchar(80) NOT NULL, foto blob NOT NULL, altura double(3,2) default '0.00', busto double(3,2) default '0.00', cintura double(3,2) default '0.00', quadril double(3,2) default '0.00', status_reg int(1) NOT NULL default '1', status_com int(1) NOT NULL default '0', PRIMARY KEY (id_concorrente) ); CREATE TABLE `nota` ( `id_nota` int(11) NOT NULL auto_increment, `id_concorrente` int(11) NOT NULL default '0', `nota_1` double(3,2) default '0.00', `nota_2` double(3,2) default '0.00', `nota_3` double(3,2) default '0.00', `nota_4` double(3,2) default '0.00', `nota_5` double(3,2) default '0.00', `status_reg` int(1) NOT NULL default '1', `status_com` int(1) NOT NULL default '0', PRIMARY KEY (`id_nota`) ) TYPE=MyISAM; CREATE TABLE `params` ( `PARAMETRO_ID` int(11) NOT NULL auto_increment, `SIGLA` char(8) default NULL, `NOME_CURTO` char(30) default NULL, `NOME_COMPLETO` char(80) default NULL, `TITULO` char(60) default NULL, `VERSAO` char(6) default NULL, `BUILD` char(10) default NULL, `USUARIO` char(11) default NULL, `SENHA` char(11) default NULL, `status_reg` int(1) NOT NULL default '1', `status_com` int(1) NOT NULL default '0', PRIMARY KEY (`PARAMETRO_ID`) ) TYPE=MyISAM; create table quadro ( quadro_id int not null primary key auto_increment, pessoa_id int not null, dia_semana char(13), hora_ini int (4), hora_end int (4), area_id int not null, curso_id int not null, modulo_id int not null, tipo_modulo int(1) not null, capitulo int (3), licao char(15), turma_id int not null, tipo_turma int, status_reg int(1) not null default="1", status_com int (1) not null default '0'); create table curso (curso_id int not null primary key auto_increment, nome char(25) not null, descricao char(255), status_reg int(1) not null default "1", status_com int(1) not null default '0'); create table modulo (module_id int not null primary key auto_increment, nome char(25) not null, descricao char(255), status_reg int(1) not null default "1", status_com int(1) not null default '0'); create table area (area_id int not null primary key auto_increment, nome char(25) not null, descricao char(255), status_reg int(1) not null default "1", status_com int(1) not null default '0'); create table turma (turma_id int not null primary key auto_increment, turma char(4) not null, inicio char(10) not null, instrutor_id int not null, nome char(20), termino char(10) not null, prorrogacao char(10), status_reg int not null default "1", status_com int not null default "0"); create table turma_mount ( turma_mount_id int not null primary key auto_increment, turma_id int not null, status_reg int not null default "1", status_com int not null default "0"); create table marketing ( marketing_id int not null primary key auto_increment, login char(12) not null, senha char(30) not null, nome char(100) not null, data char(10), hora_ini int(4), hora_end int(4), cadastro int(4), vlr_cadastro double (16,2) default "0.00", eventos int(4), vlr_eventos double (16,2) default "0.00", matricula int(4), vlr_matricula double (16,2) default "0.00", observacao char(255), status_reg int not null default "1", status_com int not null default "0"); create table aula ( aula_id int not null primary key auto_increment, pessoa_id int not null, turma_id int not null, data char(10) not null, hora_ini int(4) not null, hora_end int(4) not null, capitulo int(3) not null, licao char(15), assunto char(255), obs char(50), status_reg int not null default "1", status_com int not null default "0");