-- phpMyAdmin SQL Dump
-- version 3.2.0.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 28, 2009 at 09:19 
-- Server version: 5.1.37
-- PHP Version: 5.3.0

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

--
-- Database: `paradazul_elo330BD`
--

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

--
-- Table structure for table `Alumnos`
--
-- Creation: Nov 08, 2009 at 02:24 
-- Last update: Nov 28, 2009 at 05:10 
--

DROP TABLE IF EXISTS `Alumnos`;
CREATE TABLE IF NOT EXISTS `Alumnos` (
  `Rut` int(11) NOT NULL,
  `DV` int(11) NOT NULL,
  `Pass` varchar(20) COLLATE utf8_spanish2_ci NOT NULL,
  `Nombre` varchar(20) COLLATE utf8_spanish2_ci NOT NULL,
  `Apellido` varchar(20) COLLATE utf8_spanish2_ci NOT NULL,
  `email` varchar(30) COLLATE utf8_spanish2_ci NOT NULL,
  `Rut_apoderado` int(11) DEFAULT NULL,
  PRIMARY KEY (`Rut`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_spanish2_ci;

--
-- RELATIONS FOR TABLE `Alumnos`:
--   `Rut_apoderado`
--       `Apoderados` -> `Rut`
--

--
-- Dumping data for table `Alumnos`
--


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

--
-- Table structure for table `Apoderados`
--
-- Creation: Nov 07, 2009 at 08:09 
-- Last update: Nov 28, 2009 at 05:08 
--

DROP TABLE IF EXISTS `Apoderados`;
CREATE TABLE IF NOT EXISTS `Apoderados` (
  `Rut` int(11) NOT NULL,
  `DV` int(11) NOT NULL,
  `Nombre` varchar(20) COLLATE utf8_spanish2_ci NOT NULL,
  `Apellido` varchar(20) COLLATE utf8_spanish2_ci NOT NULL,
  `Pass` varchar(20) COLLATE utf8_spanish2_ci NOT NULL,
  `Email` varchar(20) COLLATE utf8_spanish2_ci NOT NULL,
  `Telefono` varchar(20) COLLATE utf8_spanish2_ci DEFAULT NULL,
  `Celular` varchar(20) COLLATE utf8_spanish2_ci DEFAULT NULL,
  PRIMARY KEY (`Rut`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_spanish2_ci;

--
-- Dumping data for table `Apoderados`
--

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

--
-- Table structure for table `Curso`
--
-- Creation: Nov 07, 2009 at 08:09 
-- Last update: Nov 12, 2009 at 01:30 
--

DROP TABLE IF EXISTS `Curso`;
CREATE TABLE IF NOT EXISTS `Curso` (
  `id_curso` int(11) NOT NULL AUTO_INCREMENT,
  `rut_profesor` int(11) NOT NULL,
  `Nombre` varchar(20) COLLATE utf8_spanish2_ci NOT NULL,
  PRIMARY KEY (`id_curso`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_spanish2_ci AUTO_INCREMENT=13 ;

--
-- RELATIONS FOR TABLE `Curso`:
--   `rut_profesor`
--       `Profesores` -> `Rut`
--

--
-- Dumping data for table `Curso`
--

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

--
-- Table structure for table `Curso_alumnos`
--
-- Creation: Nov 07, 2009 at 08:09 
-- Last update: Nov 28, 2009 at 05:03 
--

DROP TABLE IF EXISTS `Curso_alumnos`;
CREATE TABLE IF NOT EXISTS `Curso_alumnos` (
  `id_curso` int(11) NOT NULL,
  `rut_alumno` int(11) NOT NULL,
  PRIMARY KEY (`id_curso`,`rut_alumno`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- RELATIONS FOR TABLE `Curso_alumnos`:
--   `id_curso`
--       `Curso` -> `id_curso`
--   `rut_alumno`
--       `Alumnos` -> `Rut`
--

--
-- Dumping data for table `Curso_alumnos`
--

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

--
-- Table structure for table `Evento`
--
-- Creation: Nov 12, 2009 at 11:57 
-- Last update: Nov 12, 2009 at 11:57 
--

DROP TABLE IF EXISTS `Evento`;
CREATE TABLE IF NOT EXISTS `Evento` (
  `id_evento` int(11) NOT NULL AUTO_INCREMENT,
  `id_curso` int(11) NOT NULL,
  `fecha_evento` datetime NOT NULL,
  `descripcion` varchar(60) NOT NULL,
  PRIMARY KEY (`id_evento`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- RELATIONS FOR TABLE `Evento`:
--   `id_curso`
--       `Curso` -> `id_curso`
--

--
-- Dumping data for table `Evento`
--


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

--
-- Table structure for table `Materias`
--
-- Creation: Nov 08, 2009 at 02:23 
-- Last update: Nov 08, 2009 at 02:23 
--

DROP TABLE IF EXISTS `Materias`;
CREATE TABLE IF NOT EXISTS `Materias` (
  `id_materia` int(11) NOT NULL,
  `Nombre_materia` varchar(20) COLLATE utf8_spanish2_ci NOT NULL,
  PRIMARY KEY (`id_materia`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_spanish2_ci;

--
-- Dumping data for table `Materias`
--


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

--
-- Table structure for table `Mat_profesor`
--
-- Creation: Nov 08, 2009 at 02:19 
-- Last update: Nov 08, 2009 at 02:19 
--

DROP TABLE IF EXISTS `Mat_profesor`;
CREATE TABLE IF NOT EXISTS `Mat_profesor` (
  `id_materia` int(11) NOT NULL,
  `rut_profesor` int(11) NOT NULL,
  `id_curso` int(11) NOT NULL,
  PRIMARY KEY (`id_materia`,`rut_profesor`,`id_curso`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- RELATIONS FOR TABLE `Mat_profesor`:
--   `id_curso`
--       `Curso` -> `id_curso`
--   `id_materia`
--       `Materias` -> `id_materia`
--   `rut_profesor`
--       `Profesores` -> `Rut`
--

--
-- Dumping data for table `Mat_profesor`
--


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

--
-- Table structure for table `Profesores`
--
-- Creation: Nov 08, 2009 at 02:22 
-- Last update: Nov 28, 2009 at 04:57 
--

DROP TABLE IF EXISTS `Profesores`;
CREATE TABLE IF NOT EXISTS `Profesores` (
  `Rut` int(11) NOT NULL,
  `DV` int(11) NOT NULL,
  `Pass` varchar(20) COLLATE utf8_spanish2_ci NOT NULL,
  `Nombre` varchar(20) COLLATE utf8_spanish2_ci NOT NULL,
  `Apellido` varchar(20) COLLATE utf8_spanish2_ci NOT NULL,
  `Email` varchar(20) COLLATE utf8_spanish2_ci DEFAULT NULL,
  `Telefono` varchar(20) COLLATE utf8_spanish2_ci DEFAULT NULL,
  `Celular` varchar(20) COLLATE utf8_spanish2_ci DEFAULT NULL,
  PRIMARY KEY (`Rut`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_spanish2_ci;

--


