<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE resources PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Resource Definitions//EN" "http://glassfish.org/dtds/glassfish-resources_1_5.dtd">
<resources>
<jdbc-connection-pool allow-non-component-callers="false" associate-with-thread="false" connection-creation-retry-attempts="0" connection-creation-retry-interval-in-seconds="10" connection-leak-reclaim="false" connection-leak-timeout-in-seconds="0" connection-validation-method="auto-commit" datasource-classname="com.mysql.jdbc.jdbc2.optional.MysqlDataSource" fail-all-connections="false" idle-timeout-in-seconds="300" is-connection-validation-required="false" is-isolation-level-guaranteed="true" lazy-connection-association="false" lazy-connection-enlistment="false" match-connections="false" max-connection-usage-count="0" max-pool-size="32" max-wait-time-in-millis="60000" name="mysql_mascotas_rootPool" non-transactional-connections="false" pool-resize-quantity="2" res-type="javax.sql.DataSource" statement-timeout-in-seconds="-1" steady-pool-size="8" validate-atmost-once-period-in-seconds="0" wrap-jdbc-objects="false">
<property name="serverName" value="localhost"/>
<property name="portNumber" value="3306"/>
<property name="databaseName" value="mascotas"/>
<property name="User" value="CAMBIAR_USUARIO"/>
<property name="Password" value="CAMBIAR_CONTRASEÑA"/>
<property name="URL" value="jdbc:mysql://localhost:3306/mascotas?zeroDateTimeBehavior=convertToNull"/>
<property name="driverClass" value="com.mysql.jdbc.Driver"/>
</jdbc-connection-pool>
<jdbc-resource enabled="true" jndi-name="java:app/Mascotas" object-type="user" pool-name="mysql_mascotas_rootPool"/>
</resources>
-- phpMyAdmin SQL Dump
-- version 4.8.0
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 22-07-2018 a las 08:29:15
-- Versión del servidor: 10.1.31-MariaDB
-- Versión de PHP: 5.6.35
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET 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: `mascotas`
--
CREATE DATABASE IF NOT EXISTS `mascotas` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE `mascotas`;
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `ficha`
--
DROP TABLE IF EXISTS `ficha`;
CREATE TABLE `ficha` (
`IdFicha` int(11) NOT NULL,
`Titulo` varchar(255) NOT NULL,
`idMascota` int(11) NOT NULL,
`Motivo` text NOT NULL,
`idUsuario` int(11) NOT NULL,
`fechaRegistro` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `mascota`
--
DROP TABLE IF EXISTS `mascota`;
CREATE TABLE `mascota` (
`idMascota` int(11) UNSIGNED NOT NULL,
`Nombre` varchar(128) NOT NULL,
`Raza` varchar(20) NOT NULL,
`idUsuario` int(11) NOT NULL,
`FechaRegistro` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`Activo` varchar(5) NOT NULL DEFAULT 'SI'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `usuario`
--
DROP TABLE IF EXISTS `usuario`;
CREATE TABLE `usuario` (
`idUsuario` int(11) NOT NULL,
`Nombre` varchar(35) NOT NULL,
`Apellido` varchar(35) NOT NULL,
`Email` varchar(255) NOT NULL,
`Rol` varchar(10) NOT NULL,
`Password` varchar(255) NOT NULL,
`Activo` varchar(2) NOT NULL DEFAULT 'SI',
`FechaRegistro` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Índices para tablas volcadas
--
--
-- Indices de la tabla `ficha`
--
ALTER TABLE `ficha`
ADD PRIMARY KEY (`IdFicha`);
--
-- Indices de la tabla `mascota`
--
ALTER TABLE `mascota`
ADD PRIMARY KEY (`idMascota`);
--
-- Indices de la tabla `usuario`
--
ALTER TABLE `usuario`
ADD PRIMARY KEY (`idUsuario`),
ADD UNIQUE KEY `Email` (`Email`);
--
-- AUTO_INCREMENT de las tablas volcadas
--
--
-- AUTO_INCREMENT de la tabla `ficha`
--
ALTER TABLE `ficha`
MODIFY `IdFicha` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT de la tabla `mascota`
--
ALTER TABLE `mascota`
MODIFY `idMascota` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;
--
-- AUTO_INCREMENT de la tabla `usuario`
--
ALTER TABLE `usuario`
MODIFY `idUsuario` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;
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 */;