Sie sind auf Seite 1von 9

-- phpMyAdmin SQL Dump

-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generaci�n: 05-01-2019 a las 17:10:00
-- Versi�n del servidor: 10.1.37-MariaDB
-- Versi�n de PHP: 5.6.39

SQL_MODE := "NO_AUTO_VALUE_ON_ZERO";
AUTOCOMMIT := 0;
START TRANSACTION;
time_zone := "+00:00";

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

--
-- Base de datos: `biblioteca`
--

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

--
-- Estructura de tabla para la tabla `autores`
--

CREATE TABLE `autores` (


cod_aut int NOT NULL,
aut_nombre varchar(30) NOT NULL,
aut_pais varchar(30) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Volcado de datos para la tabla `autores`
--

INSERT INTO `autores` (cod_aut, aut_nombre, aut_pais) VALUES


(1, 'PABLO NERUDA', 'CHILE'),
(31, 'GABRIELA MISTRAL', 'CHILE'),
(32, 'AMEL', 'ARGENTINA'),
(36, 'ZAMBRANO', 'CHILE'),
(37, 'SALINAS', 'PERU'),
(38, 'ZARMIENTO', 'FRANCIA'),
(39, 'JARAMILLO', 'BOLIVIA'),
(40, 'OLMEDO', 'PANAMA'),
(46, 'DC', 'MEXICO');

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

--
-- Estructura de tabla para la tabla `bibliotecario`
--

CREATE TABLE `bibliotecario` (


bibl_ced varchar(10) NOT NULL,
bibl_nom varchar(15) NOT NULL,
bibli_ape varchar(20) NOT NULL,
bibl_dir varchar(30) NOT NULL,
bibl_tele varchar(10) NOT NULL,
bibl_contra varchar(8) NOT NULL,
est varchar(1) NOT NULL,
perfil varchar(15) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

--
-- Volcado de datos para la tabla `bibliotecario`
--

INSERT INTO `bibliotecario` (bibl_ced, bibl_nom, bibli_ape, bibl_dir, bibl_tele,


bibl_contra, est, perfil) VALUES
('1801', 'VINICIO', 'LABRE', 'AMBATO', '032871545', '1234', '', 'Administrador'),
('1802', 'PEDRO', 'QUISPE', 'CUMANDA', '032123233', '1234', '', 'Registrador'),
('1804', 'MARIO', 'ARCOS', 'PELILEO', '032871485', 'UTA123', '', 'Registrador'),
('1805153580', 'JHOFRE ', 'PINTAG ', 'CUMANDA ', '099486461', 'marco', '',
'Registrador'),
('1804393724', 'JONATHAN', 'TISALEMA', 'AMBATO', '099586842', 'fer', '',
'Registrador');

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

--
-- Estructura de tabla para la tabla `devolucion`
--

CREATE TABLE `devolucion` (


cod_dev varchar(11) NOT NULL,
fechaprestamo varchar(50) CHARACTER SET utf8 NOT NULL,
fechadevolucion varchar(30) CHARACTER SET utf8 NOT NULL,
cod_trans int NOT NULL,
bibl_ced varchar(10) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Volcado de datos para la tabla `devolucion`
--

INSERT INTO `devolucion` (cod_dev, fechaprestamo, fechadevolucion, cod_trans,


bibl_ced) VALUES
('26', '25/12/2018', '27/12/2018', 32, '1801'),
('27', '28/12/2018', '28/12/2018', 33, '1801'),
('28', '27/12/2018', '29/12/2018', 29, '1801'),
('29', '27/12/2018', '29/12/2018', 31, '1801'),
('30', '29/12/2018', '29/12/2018', 35, '1801'),
('31', '02/01/2019', '02/01/2019', 37, '1801');

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

--
-- Estructura de tabla para la tabla `editoriales`
--

CREATE TABLE `editoriales` (


cod_edit int NOT NULL,
editorial varchar(30) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Volcado de datos para la tabla `editoriales`
--

INSERT INTO `editoriales` (cod_edit, editorial) VALUES


(1, 'SANTILLANA'),
(3, 'ANDRES BELLO'),
(4, 'PEDRO MIRANDA'),
(15, 'UNICC'),
(6, 'EDESA'),
(7, 'EEEEE'),
(8, 'HORIZONTE'),
(9, 'AMERICA'),
(10, 'UNIONES'),
(11, 'COSTA'),
(12, 'TRICUADOR'),
(13, 'SABTANDER ');

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

--
-- Estructura de tabla para la tabla `entradas`
--

CREATE TABLE `entradas` (


cod_entr int NOT NULL,
fecha varchar(12) NOT NULL,
usu_rut varchar(12) NOT NULL,
hora varchar(12) NOT NULL,
obs varchar(20) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

--
-- Volcado de datos para la tabla `entradas`
--

INSERT INTO `entradas` (cod_entr, fecha, usu_rut, hora, obs) VALUES


(6, '28/12/2018', '0805153580', '12:34:20', 'Computador'),
(5, '28/12/2018', '23', '12:10:06', 'Lectura'),
(4, '28/12/2018', '0805153580', '11:24:40', 'Lectura'),
(3, '28/12/2018', '0501236548', '11:18:49', 'Lectura'),
(2, '28/12/2018', '0805153580', '11:10:40', 'Lectura'),
(1, '15/1/2018', '123321312', '13:20', 'Lectura'),
(7, '28/12/2018', '1805153580', '14:15:37', 'Lectura'),
(8, '29/12/2018', '1805153580', '18:43:10', 'Lectura'),
(9, '29/12/2018', '1805153580', '22:21:06', 'Computador'),
(10, '29/12/2018', '1805153580', '23:10:46', 'Lectura');

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

--
-- Estructura de tabla para la tabla `libros`
--

CREATE TABLE `libros` (


cod_lib varchar(15) NOT NULL,
titulo varchar(30) NOT NULL,
cod_edit int NOT NULL,
cod_aut int NOT NULL,
est_lib varchar(10) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Volcado de datos para la tabla `libros`
--

INSERT INTO `libros` (cod_lib, titulo, cod_edit, cod_aut, est_lib) VALUES


('24', 'SISTEMAS', 3, 31, 'disponible'),
('7861173000500', 'java', 1, 31, 'disponible'),
('234', 'EQUIPOS', 1, 1, 'disponible'),
('23', 'SOFTWARE', 1, 31, 'disponible'),
('1805364427', 'CIRCUITOS', 1, 1, 'disponible'),
('777', 'geometria', 8, 31, 'disponible'),
('25', 'historia', 6, 37, 'prestado'),
('1234567890', 'COMPRENSION', 10, 1, 'prestado'),
('44', 'ciencias', 8, 1, 'disponible'),
('333', 'histologia', 11, 40, 'disponible'),
('888', 'ia', 10, 39, 'disponible'),
('999', 'desarollo', 11, 40, 'disponible'),
('111', 'VISUAL', 8, 36, 'disponible'),
('656', 'dfdf', 9, 39, 'disponible'),
('454', 'ddfs', 8, 40, 'disponible'),
('1010', 'REDES', 9, 32, 'disponible'),
('321', 'mecanica', 8, 37, 'disponible'),
('887', 'astronomia', 9, 1, 'disponible'),
('1001', 'BASE', 9, 38, 'disponible'),
('323', 'ARITMATICA ', 8, 32, 'disponible'),
('800', 'AMBINTE ', 11, 38, 'disponible'),
('7772', 'DIGITALEs', 10, 36, 'disponible'),
('666', 'ATRQUOITECTURA', 9, 41, 'disponible'),
('444', 'CALCULO', 8, 32, 'disponible'),
('221', 'IMAGEN', 4, 32, 'disponible'),
('555', 'GGg', 8, 31, 'disponible'),
('5454', 'YYy', 6, 36, 'disponible'),
('765', 'FFf', 9, 1, 'disponible'),
('1009', 'DISTRIBUIDOS ', 7, 36, 'disponible'),
('8875', 'DDDs', 9, 32, 'disponible'),
('3', 'ZZZz', 9, 36, 'disponible'),
('2234', 'FISICA', 8, 1, 'prestado'),
('4221', 'DIBUJO ', 11, 31, 'disponible'),
('9989', 'GENETICA', 12, 38, 'disponible'),
('44326', 'GEOMETRIA', 8, 38, 'disponible'),
('78778', 'LA BIBLIA', 8, 1, 'disponible');

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

--
-- Estructura de tabla para la tabla `salida`
--

CREATE TABLE `salida` (


cod_sal int NOT NULL,
fecha varchar(12) NOT NULL,
usu_rut varchar(10) NOT NULL,
hora varchar(12) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
--
-- Volcado de datos para la tabla `salida`
--

INSERT INTO `salida` (cod_sal, fecha, usu_rut, hora) VALUES


(3, '15/1/2018', '123321312', '13:24'),
(3, '15/1/2018', '123321312', '13:33'),
(3, '15/1/2018', '123321312', '13:34'),
(4, '15/1/2018', '1805364427', '13:38'),
(4, '15/1/2018', '1805364427', '13:45'),
(4, '15/1/2018', '1805364427', '13:45'),
(4, '15/1/2018', '1805364427', '19:47'),
(4, '15/1/2018', '1805364427', '19:51'),
(4, '15/1/2018', '1805364427', '19:51'),
(4, '15/1/2018', '1805364427', '19:53'),
(4, '15/1/2018', '1805364427', '19:53'),
(4, '15/1/2018', '1805364427', '19:54'),
(4, '15/1/2018', '1805364427', '19:55'),
(4, '15/1/2018', '1805364427', '19:55'),
(4, '15/1/2018', '1805364427', '19:55'),
(4, '15/1/2018', '1805364427', '19:57'),
(4, '15/1/2018', '1805364427', '19:57'),
(4, '15/1/2018', '1805364427', '20:0'),
(4, '15/01/2018', '1805364427', '20:37:49'),
(4, '15/01/2018', '1805364427', '20:38:22'),
(4, '15/01/2018', '1805364427', '20:38:30'),
(4, '15/01/2018', '1805364427', '23:27:07'),
(4, '15/01/2018', '1805364427', '23:27:23'),
(4, '15/01/2018', '1805364427', '23:27:35'),
(7, '26/06/2018', '0504159609', '17:22:10'),
(7, '26/06/2018', '0504159609', '17:22:18'),
(7, '26/06/2018', '0504159609', '17:22:23'),
(7, '26/06/2018', '0504159609', '17:22:28'),
(7, '26/06/2018', '0504159609', '17:22:34'),
(8, '30/06/2018', '1803818432', '10:02:45'),
(8, '30/06/2018', '1803818432', '10:02:53'),
(8, '30/06/2018', '1803818432', '10:02:59'),
(11, '04/07/2018', '1803818432', '08:43:57'),
(11, '04/07/2018', '1803818432', '08:46:05'),
(11, '04/07/2018', '1803818432', '08:46:27'),
(11, '04/07/2018', '1803818432', '08:49:23'),
(11, '04/07/2018', '1803818432', '08:50:01'),
(12, '04/07/2018', '1803818432', '08:55:24'),
(13, '04/07/2018', '1803818432', '08:55:56'),
(15, '04/07/2018', '1803819943', '11:53:41'),
(15, '04/07/2018', '1803818432', '11:54:00'),
(15, '04/07/2018', '1803819943', '11:54:20'),
(15, '04/07/2018', '1803819943', '11:54:30'),
(15, '04/07/2018', '1803819943', '11:54:48'),
(15, '04/07/2018', '1803818432', '11:54:55'),
(15, '04/07/2018', '1803819943', '11:55:10'),
(15, '04/07/2018', '1803818432', '11:55:32'),
(15, '04/07/2018', '1803819943', '11:55:54'),
(15, '04/07/2018', '1803818432', '11:56:06'),
(15, '04/07/2018', '1803819943', '11:56:27'),
(15, '04/07/2018', '1803819943', '11:57:39'),
(15, '04/07/2018', '1803818432', '11:57:51'),
(15, '04/07/2018', '1803819943', '11:58:11'),
(15, '04/07/2018', '1803818432', '11:58:19'),
(15, '05/07/2018', '1803818432', '23:44:29'),
(15, '05/07/2018', '1803818432', '23:44:39'),
(15, '05/07/2018', '1803818432', '23:46:35'),
(15, '05/07/2018', '1803818432', '23:46:43'),
(15, '05/07/2018', '1803818432', '23:49:20'),
(15, '05/07/2018', '1803818432', '23:49:35'),
(15, '05/07/2018', '1803818432', '23:52:00'),
(15, '05/07/2018', '1803818432', '23:52:10'),
(15, '05/07/2018', '1803818432', '23:53:55'),
(15, '05/07/2018', '1803818432', '23:54:04'),
(15, '05/07/2018', '1803818432', '23:54:13'),
(15, '05/07/2018', '1803818432', '23:54:20'),
(17, '07/07/2018', '1803818432', '19:18:28'),
(17, '07/07/2018', '0921999488', '19:18:35'),
(17, '07/07/2018', '0921999488', '20:30:30'),
(17, '07/07/2018', '0921999488', '20:30:44'),
(17, '07/07/2018', '0921999488', '20:35:14'),
(17, '07/07/2018', '0921999488', '20:35:27'),
(18, '17/12/2018', '1803819943', '21:22:58'),
(20, '18/12/2018', '1805153580', '10:00:02'),
(20, '18/12/2018', '0602733677', '10:00:21'),
(20, '18/12/2018', '1805153580', '10:00:33'),
(20, '18/12/2018', '1805153580', '10:03:02'),
(20, '18/12/2018', '1805153580', '10:03:25'),
(20, '18/12/2018', '1805153580', '10:05:36'),
(20, '18/12/2018', '1805153580', '10:05:53'),
(20, '18/12/2018', '1805153580', '10:06:16'),
(20, '18/12/2018', '1805153580', '14:09:28'),
(20, '18/12/2018', '1805153580', '14:10:09'),
(20, '19/12/2018', '1805153580', '09:12:04'),
(20, '19/12/2018', '1805153580', '09:13:28'),
(20, '19/12/2018', '1805153580', '12:58:11'),
(21, '27/12/2018', '1804393724', '12:40:23'),
(1, '27/12/2018', '1804393724', '13:05:42'),
(1, '27/12/2018', '1804393724', '13:05:49'),
(1, '27/12/2018', '1804393724', '13:08:21'),
(1, '27/12/2018', '1804393724', '13:08:33'),
(1, '27/12/2018', '1804393724', '13:10:37'),
(1, '27/12/2018', '1804393724', '13:21:08'),
(1, '27/12/2018', '1804393724', '13:22:22'),
(2, '27/12/2018', '1804393724', '13:25:50'),
(2, '27/12/2018', '1804393724', '13:25:59'),
(3, '28/12/2018', '1804393724', '11:18:32'),
(5, '28/12/2018', '1805153580', '11:38:19'),
(6, '28/12/2018', '1805153580', '12:18:19'),
(6, '28/12/2018', '1804393724', '12:20:28'),
(6, '28/12/2018', '1804393724', '12:22:37'),
(6, '28/12/2018', '1804393724', '12:23:32'),
(6, '28/12/2018', '1805153580', '12:24:04'),
(6, '28/12/2018', '1805153580', '12:31:36'),
(6, '28/12/2018', '1805153580', '12:31:54'),
(6, '28/12/2018', '1805153580', '12:33:38'),
(6, '28/12/2018', '1805153580', '12:33:48'),
(7, '28/12/2018', '1804393724', '12:41:36'),
(7, '28/12/2018', '1804393724', '12:41:44'),
(7, '28/12/2018', '1803819943', '12:43:01'),
(7, '28/12/2018', '1803819943', '12:43:14'),
(7, '28/12/2018', '1803819943', '12:43:44'),
(7, '28/12/2018', '1803819943', '12:48:55'),
(7, '28/12/2018', '1803819943', '12:52:29'),
(7, '28/12/2018', '1805153580', '12:52:44'),
(7, '28/12/2018', '1803819943', '12:53:20'),
(8, '28/12/2018', '1805153580', '14:15:51'),
(9, '29/12/2018', '1805153580', '18:43:17'),
(10, '29/12/2018', '1805153580', '22:21:18'),
(11, '29/12/2018', '1805153580', '23:10:54');

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

--
-- Estructura de tabla para la tabla `transacciones`
--

CREATE TABLE `transacciones` (


cod_trans int NOT NULL,
fecha varchar(50) NOT NULL,
diasprestamo varchar(10) NOT NULL,
cod_lib varchar(15) NOT NULL,
usu_rut varchar(12) NOT NULL,
bibl_ced varchar(10) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Volcado de datos para la tabla `transacciones`
--

INSERT INTO `transacciones` (cod_trans, fecha, diasprestamo, cod_lib, usu_rut,


bibl_ced) VALUES
(32, '25/12/2018', 'JUAN ', '78778', '1803819943', '1801'),
(31, '27/12/2018', 'CARMEN', '777', '0921999488', '1801'),
(29, '27/12/2018', 'JONATHAN', '1009', '1804393724', '1801'),
(30, '27/12/2018', 'MARCO', '2234', '1805153580', '1801'),
(33, '28/12/2018', 'CARMEN', '1010', '0921999488', '1801'),
(34, '29/12/2018', 'CARMEN', '1234567890', '0921999488', '1801'),
(35, '29/12/2018', 'JONATHAN', '1805364427', '1804393724', '1801'),
(36, '29/12/2018', 'MARIA', '25', '0602733677', '1801'),
(37, '02/01/2019', 'MARCO', '221', '1805153580', '1801');

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

--
-- Estructura de tabla para la tabla `usuarios`
--

CREATE TABLE `usuarios` (


usu_rut varchar(12) NOT NULL,
usu_nombre varchar(30) NOT NULL,
usu_apellido varchar(30) NOT NULL,
usu_direccion varchar(50) NOT NULL,
usu_telefono varchar(10) NOT NULL,
usu_correo varchar(30) NOT NULL,
usu_est varchar(12) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Volcado de datos para la tabla `usuarios`
--
INSERT INTO `usuarios` (usu_rut, usu_nombre, usu_apellido, usu_direccion,
usu_telefono, usu_correo, usu_est) VALUES
('1803819943', 'JUAN ', 'LABRE ', 'AMBATO ', '0839843984', 'juan@gmail.com',
'salida'),
('0602733677', 'MARIA', 'SINCHI', 'AMBATO ', '0994864619', 'mari.sinchi@gmail.com',
'salida'),
('0921999488', 'CARMEN', 'VILLABICENCIO ', 'AMBATO', '0977627662',
'hdjhdjhf@gmail.com', 'salida'),
('1805153580', 'MARCO', 'PINTAG', 'CUMANDA', '099999999', 'JHOFRE@GMAIL.COM',
'salida'),
('1804393724', 'JONATHAN', 'TISALEMA', 'AMBATO', '0995869428',
'jonatl5197@gmail.com', 'entrada');

--
-- �ndices para tablas volcadas
--

--
-- Indices de la tabla `autores`
--
ALTER TABLE autores
ADD PRIMARY KEY (cod_aut);

--
-- Indices de la tabla `bibliotecario`
--
ALTER TABLE bibliotecario
ADD PRIMARY KEY (bibl_ced);

--
-- Indices de la tabla `devolucion`
--
ALTER TABLE devolucion
ADD PRIMARY KEY (cod_dev);

--
-- Indices de la tabla `editoriales`
--
ALTER TABLE editoriales
ADD PRIMARY KEY (cod_edit);

--
-- Indices de la tabla `entradas`
--
ALTER TABLE entradas
ADD PRIMARY KEY (cod_entr);

--
-- Indices de la tabla `libros`
--
ALTER TABLE libros
ADD PRIMARY KEY (cod_lib),
ADD KEY `FK_libros` (cod_edit),
ADD KEY `FK_libross` (cod_aut);

--
-- Indices de la tabla `transacciones`
--
ALTER TABLE transacciones
ADD PRIMARY KEY (cod_trans),
ADD KEY `FK_transaccioness` (cod_lib),
ADD KEY `FK_transaccionesss` (usu_rut);

--
-- Indices de la tabla `usuarios`
--
ALTER TABLE usuarios
ADD PRIMARY KEY (usu_rut);

--
-- AUTO_INCREMENT de las tablas volcadas
--

--
-- AUTO_INCREMENT de la tabla `autores`
--
ALTER TABLE autores
MODIFY cod_aut cast(11 as int) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=47;

--
-- AUTO_INCREMENT de la tabla `editoriales`
--
ALTER TABLE editoriales
MODIFY cod_edit cast(11 as int) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;

--
-- AUTO_INCREMENT de la tabla `transacciones`
--
ALTER TABLE transacciones
MODIFY cod_trans cast(11 as int) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=38;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;


/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;