[Php-avanzado] Estructura de base de datos de SALI+

Leonardo Tadei - Pegasus Tech Supply leonardot en pegasusnet.com.ar
Jue Sep 3 00:14:29 ART 2009


Hola Carolina,

El mié, 02-09-2009 a las 23:44 -0300, Silverzero escribió:
> Ahi va!

	Se ve bien normalizada.
	A codificar!!!




> -- phpMyAdmin SQL Dump
> -- version 2.11.9.5
> -- http://www.phpmyadmin.net
> --
> -- Servidor: localhost
> -- Tiempo de generación: 02-09-2009 a las 23:43:30
> -- Versión del servidor: 5.0.81
> -- Versión de PHP: 5.2.9
> 
> SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
> 
> --
> -- Base de datos: `salimas_sitio`
> --
> 
> -- --------------------------------------------------------
> 
> --
> -- Estructura de tabla para la tabla `actividades`
> --
> 
> CREATE TABLE IF NOT EXISTS `actividades` (
>   `id` int(11) NOT NULL auto_increment,
>   `fecha` date NOT NULL,
>   `desde` date NOT NULL,
>   `hasta` date NOT NULL,
>   `horario` varchar(50) collate utf8_unicode_ci NOT NULL,
>   `titulo` varchar(50) collate utf8_unicode_ci NOT NULL,
>   `descripcion` varchar(50) collate utf8_unicode_ci NOT NULL,
>   `imagen` varchar(50) collate utf8_unicode_ci NOT NULL,
>   `url` varchar(50) collate utf8_unicode_ci NOT NULL,
>   `precio` varchar(50) collate utf8_unicode_ci NOT NULL,
>   `id_visitante` int(11) NOT NULL,
>   `id_lugar` int(11) NOT NULL,
>   `id_stat` int(11) NOT NULL,
>   PRIMARY KEY  (`id`)
> ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
> AUTO_INCREMENT=1 ;
> 
> -- --------------------------------------------------------
> 
> --
> -- Estructura de tabla para la tabla `actividades_cat`
> --
> 
> CREATE TABLE IF NOT EXISTS `actividades_cat` (
>   `id` int(11) NOT NULL auto_increment,
>   `nombre` varchar(50) collate utf8_unicode_ci NOT NULL,
>   PRIMARY KEY  (`id`)
> ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
> AUTO_INCREMENT=1 ;
> 
> -- --------------------------------------------------------
> 
> --
> -- Estructura de tabla para la tabla `actividades_subcat`
> --
> 
> CREATE TABLE IF NOT EXISTS `actividades_subcat` (
>   `id` int(11) NOT NULL auto_increment,
>   `id_actividad_cat` int(11) NOT NULL,
>   `nombre` varchar(50) collate utf8_unicode_ci NOT NULL,
>   PRIMARY KEY  (`id`)
> ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
> AUTO_INCREMENT=1 ;
> 
> -- --------------------------------------------------------
> 
> --
> -- Estructura de tabla para la tabla `admins`
> --
> 
> CREATE TABLE IF NOT EXISTS `admins` (
>   `id` int(11) NOT NULL auto_increment,
>   `nombres` varchar(50) collate utf8_unicode_ci NOT NULL,
>   `apellidos` varchar(50) collate utf8_unicode_ci NOT NULL,
>   `domicilio` varchar(50) collate utf8_unicode_ci NOT NULL,
>   `telefonos` varchar(50) collate utf8_unicode_ci NOT NULL,
>   `email` varchar(50) collate utf8_unicode_ci NOT NULL,
>   `pass` varchar(50) collate utf8_unicode_ci NOT NULL,
>   `cod_loc` int(4) NOT NULL,
>   PRIMARY KEY  (`id`)
> ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
> AUTO_INCREMENT=1 ;
> 
> -- --------------------------------------------------------
> 
> --
> -- Estructura de tabla para la tabla `diccionario`
> --
> 
> CREATE TABLE IF NOT EXISTS `diccionario` (
>   `id` int(11) NOT NULL auto_increment,
>   `frase` varchar(50) collate utf8_unicode_ci NOT NULL,
>   PRIMARY KEY  (`id`)
> ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
> AUTO_INCREMENT=1 ;
> 
> -- --------------------------------------------------------
> 
> --
> -- Estructura de tabla para la tabla `eventos`
> --
> 
> CREATE TABLE IF NOT EXISTS `eventos` (
>   `id` int(11) NOT NULL auto_increment,
>   `fecha` date NOT NULL,
>   `desde` date NOT NULL,
>   `hasta` date NOT NULL,
>   `horario` varchar(50) collate utf8_unicode_ci NOT NULL,
>   `titulo` varchar(50) collate utf8_unicode_ci NOT NULL,
>   `descripcion` text collate utf8_unicode_ci NOT NULL,
>   `imagen` varchar(50) collate utf8_unicode_ci NOT NULL,
>   `url` varchar(100) collate utf8_unicode_ci NOT NULL,
>   `precio` float NOT NULL,
>   `id_visitante` int(11) NOT NULL,
>   `id_lugar` int(11) NOT NULL,
>   `id_stat` int(11) NOT NULL,
>   PRIMARY KEY  (`id`)
> ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
> AUTO_INCREMENT=1 ;
> 
> -- --------------------------------------------------------
> 
> --
> -- Estructura de tabla para la tabla `eventos_cat`
> --
> 
> CREATE TABLE IF NOT EXISTS `eventos_cat` (
>   `id` int(11) NOT NULL auto_increment,
>   `nombre` varchar(50) collate utf8_unicode_ci NOT NULL,
>   PRIMARY KEY  (`id`)
> ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
> AUTO_INCREMENT=1 ;
> 
> -- --------------------------------------------------------
> 
> --
> -- Estructura de tabla para la tabla `eventos_subcat`
> --
> 
> CREATE TABLE IF NOT EXISTS `eventos_subcat` (
>   `id` int(11) NOT NULL auto_increment,
>   `id_evento_cat` int(11) NOT NULL,
>   `nombre` varchar(50) collate utf8_unicode_ci NOT NULL,
>   PRIMARY KEY  (`id`)
> ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
> AUTO_INCREMENT=1 ;
> 
> -- --------------------------------------------------------
> 
> --
> -- Estructura de tabla para la tabla `localidades`
> --
> 
> CREATE TABLE IF NOT EXISTS `localidades` (
>   `cod_loc` int(4) NOT NULL auto_increment,
>   `cod_prov` int(2) NOT NULL,
>   `desc` varchar(31) collate utf8_unicode_ci NOT NULL,
>   PRIMARY KEY  (`cod_loc`)
> ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
> AUTO_INCREMENT=2383 ;
> 
> -- --------------------------------------------------------
> 
> --
> -- Estructura de tabla para la tabla `lugares`
> --
> 
> CREATE TABLE IF NOT EXISTS `lugares` (
>   `id` int(11) NOT NULL auto_increment,
>   `fecha` date NOT NULL,
>   `nombre` varchar(50) collate utf8_unicode_ci NOT NULL,
>   `direccion` varchar(50) collate utf8_unicode_ci NOT NULL,
>   `telefono` varchar(50) collate utf8_unicode_ci NOT NULL,
>   `horario` varchar(50) collate utf8_unicode_ci NOT NULL,
>   `descripcion` text collate utf8_unicode_ci NOT NULL,
>   `imagen` varchar(50) collate utf8_unicode_ci NOT NULL,
>   `url` varchar(50) collate utf8_unicode_ci NOT NULL,
>   `id_visitante` int(11) NOT NULL,
>   `cod_loc` int(4) NOT NULL,
>   `id_stat` int(11) NOT NULL,
>   PRIMARY KEY  (`id`)
> ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
> AUTO_INCREMENT=1 ;
> 
> -- --------------------------------------------------------
> 
> --
> -- Estructura de tabla para la tabla `lugares_cat`
> --
> 
> CREATE TABLE IF NOT EXISTS `lugares_cat` (
>   `id` int(11) NOT NULL auto_increment,
>   `nombre` varchar(50) collate utf8_unicode_ci NOT NULL,
>   PRIMARY KEY  (`id`)
> ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
> AUTO_INCREMENT=1 ;
> 
> -- --------------------------------------------------------
> 
> --
> -- Estructura de tabla para la tabla `lugares_subcat`
> --
> 
> CREATE TABLE IF NOT EXISTS `lugares_subcat` (
>   `id` int(11) NOT NULL auto_increment,
>   `id_lugar_cat` int(11) NOT NULL,
>   `nombre` varchar(50) collate utf8_unicode_ci NOT NULL,
>   PRIMARY KEY  (`id`)
> ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
> AUTO_INCREMENT=1 ;
> 
> -- --------------------------------------------------------
> 
> --
> -- Estructura de tabla para la tabla `provincias`
> --
> 
> CREATE TABLE IF NOT EXISTS `provincias` (
>   `cod_prov` int(2) NOT NULL,
>   `desc` varchar(30) collate utf8_unicode_ci NOT NULL,
>   PRIMARY KEY  (`cod_prov`)
> ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
> 
> -- --------------------------------------------------------
> 
> --
> -- Estructura de tabla para la tabla `status`
> --
> 
> CREATE TABLE IF NOT EXISTS `status` (
>   `id` int(11) NOT NULL auto_increment,
>   `stat` varchar(10) collate utf8_unicode_ci NOT NULL,
>   PRIMARY KEY  (`id`)
> ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
> AUTO_INCREMENT=1 ;
> 
> -- --------------------------------------------------------
> 
> --
> -- Estructura de tabla para la tabla `visitantes`
> --
> 
> CREATE TABLE IF NOT EXISTS `visitantes` (
>   `id` int(11) NOT NULL,
>   `fecha` date NOT NULL,
>   `nombres` varchar(50) collate utf8_unicode_ci NOT NULL,
>   `apellidos` varchar(50) collate utf8_unicode_ci NOT NULL,
>   `alias` varchar(50) collate utf8_unicode_ci NOT NULL,
>   `email` varchar(50) collate utf8_unicode_ci NOT NULL,
>   `pass` varchar(50) collate utf8_unicode_ci NOT NULL,
>   `avatar` varchar(50) collate utf8_unicode_ci NOT NULL,
>   `about` text collate utf8_unicode_ci NOT NULL,
>   `intereses` text collate utf8_unicode_ci NOT NULL,
>   `url` varchar(50) collate utf8_unicode_ci NOT NULL,
>   PRIMARY KEY  (`id`)
> ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
> 
> -- --------------------------------------------------------
> 
> --
> -- Estructura de tabla para la tabla `votos_actividades`
> --
> 
> CREATE TABLE IF NOT EXISTS `votos_actividades` (
>   `id` int(11) NOT NULL auto_increment,
>   `cantidad` int(11) NOT NULL,
>   `id_actividad` int(11) NOT NULL,
>   PRIMARY KEY  (`id`)
> ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
> AUTO_INCREMENT=1 ;
> 
> -- --------------------------------------------------------
> 
> --
> -- Estructura de tabla para la tabla `votos_eventos`
> --
> 
> CREATE TABLE IF NOT EXISTS `votos_eventos` (
>   `id` int(11) NOT NULL auto_increment,
>   `cantidad` int(11) NOT NULL,
>   `id_evento` int(11) NOT NULL,
>   PRIMARY KEY  (`id`)
> ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
> AUTO_INCREMENT=1 ;
> 
> -- --------------------------------------------------------
> 
> --
> -- Estructura de tabla para la tabla `votos_lugares`
> --
> 
> CREATE TABLE IF NOT EXISTS `votos_lugares` (
>   `id` int(11) NOT NULL auto_increment,
>   `cantidad` int(11) NOT NULL,
>   `id_lugar` int(11) NOT NULL,
>   PRIMARY KEY  (`id`)
> ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
> AUTO_INCREMENT=1 ;
> 
> _______________________________________________
> Php-avanzado mailing list
> Php-avanzado en pato2.fi.mdp.edu.ar
> http://www3.fi.mdp.edu.ar/cgi-bin/mailman/listinfo/php-avanzado
-- 

Leonardo Tadei
leonardot en pegasusnet.com.ar
http://blog.pegasusnet.com.ar
Firma pública: http://www.pegasusnet.com.ar/LeonardoTadei-public.key



Más información sobre la lista de distribución Php-avanzado