use fanzinweb;

######################################################################
# Fanzinweb 1.0 : Un pequeo sistema de publicacin de artculos
# ==============================================================
#
# Copyright (c) 2001 - Manuel J. Romn Estrade (manje@tpn3.com)
#
# Este programa es software libre. Puede redistribuirlo y/o
# modificarlo bajo los trminos de la Licencia Pblica General
# de GNU.
#
# Este programa se distribuye con la esperanza de que sea til, pero
# SIN NINGUNA GARANTA, incluso sin la garanta MERCANTIL implcita
# o sin garantizar la CONVENIENCIA PARA UN PROPSITO PARTICULAR. Vase
# la Licencia Pblica General de GNU para ms detalles.
# 
# Debera haber recibido una copia de la Licencia Pblica General junto
# con este programa.
#
# This program is free software. You can redistribute it and/or modify
# it under the terms of the GNU General Public License.
######################################################################



CREATE TABLE autores (
  id 	char(16) NOT NULL,
  pwd 	char(16) NOT NULL,
  nombre 	char(100),
  email 	char(50),
  PRIMARY KEY (id)
);


CREATE TABLE temas (
  id 	int NOT NULL,
  nombre 	char(50) NOT NULL,
  PRIMARY KEY (id)
);


CREATE TABLE escritores (
  autor  		char(16) NOT NULL,
  tema  		int NOT NULL,
  PRIMARY KEY (autor,tema)
);


CREATE TABLE articulos (
  id  		int NOT NULL auto_increment,
  autor 	char(16) NOT NULL,
  tema 		int NOT NULL,
  titulo  	text DEFAULT '' NOT NULL,
  breve  	text DEFAULT '' NOT NULL,
  completo  	text DEFAULT '' NOT NULL,
  fecha 	datetime,
  PRIMARY KEY (id)
);

