-- phpMyAdmin SQL Dump
-- version 6.0.0-dev+20230315.e24d2201c5
-- https://www.phpmyadmin.net/
--
-- Počítač: localhost
-- Vytvořeno: Mon 26. Feb 2024, 10:47
-- Verze serveru: 10.6.16-MariaDB-1:10.6.16+maria~ubu2004
-- Verze PHP: 8.1.27

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
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 */;

--
-- Databáze: `20-c-mrkvicka.d`
--

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

--
-- Struktura tabulky `mrtvoly`
--

CREATE TABLE `mrtvoly` (
  `id` int(11) NOT NULL,
  `jmeno` varchar(20) NOT NULL,
  `prijmeni` varchar(25) NOT NULL,
  `d_narozeni` date DEFAULT NULL,
  `d_umrti` date DEFAULT NULL,
  `cislo_hrobu` int(11) NOT NULL,
  `typ_ulozeni` set('Urna','Rakev','Urnička') NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Vypisuji data pro tabulku `mrtvoly`
--

INSERT INTO `mrtvoly` (`id`, `jmeno`, `prijmeni`, `d_narozeni`, `d_umrti`, `cislo_hrobu`, `typ_ulozeni`) VALUES
(123456789, 'Marcela', 'Zkažená', '1965-03-08', '2010-05-19', 1623, 'Urnička'),
(147258369, 'Jaromír', 'Plesk', '1954-12-07', '2015-03-02', 1622, 'Rakev'),
(159756843, 'Oldřich', 'Bureš', '1969-07-10', '2019-05-14', 1630, 'Rakev'),
(245178369, 'Oldřich', 'Soukup', '1984-10-05', '2012-02-12', 1621, 'Urnička'),
(246897513, 'Petr', 'Němec', '1982-01-07', '2020-02-20', 1618, 'Urnička'),
(258741369, 'Karel', 'Urban', '2000-03-07', '2021-09-17', 1625, 'Urnička'),
(264135789, 'Josef', 'Pokorný', '1955-05-24', '2010-01-06', 1621, 'Rakev'),
(316479285, 'Dominik', 'Holub', '1965-04-08', '2015-04-09', 1625, 'Rakev'),
(321469857, 'Ondra', 'Vávra', '1995-05-04', '2021-11-26', 1627, 'Rakev'),
(364298715, 'Marek', 'Polák', '1988-12-03', '2020-08-09', 1630, 'Urnička'),
(369852147, 'Erik', 'Krátký', '1958-11-06', '2019-05-22', 1624, 'Rakev'),
(379862654, 'Michal', 'Kadlec', '1971-09-21', '2011-01-11', 1631, ''),
(456798312, 'Jirka', 'Král', '1966-12-23', '1999-09-19', 1627, 'Rakev'),
(548623197, 'Richard', 'Novotný', '1900-11-08', '2016-11-09', 1626, 'Rakev'),
(653892741, 'Petr', 'Kříž', '1958-03-16', '2017-06-27', 1629, 'Rakev'),
(741582349, 'Jaroslav', 'Beneš', '1945-01-16', '2000-02-20', 1628, 'Urnička'),
(813792741, 'Martin', 'Svoboda', '1962-03-12', '2018-05-18', 1620, 'Rakev'),
(917382465, 'Jana', 'Kučerová', '1975-07-09', '2022-10-03', 1619, 'Urnička'),
(964253614, 'Jakub', 'Bartoš', '1991-02-13', '2020-05-24', 1623, 'Urnička'),
(976431258, 'Andrea', 'Veselá', '1978-11-02', '2011-11-11', 1, '');

--
-- Indexy pro exportované tabulky
--

--
-- Indexy pro tabulku `mrtvoly`
--
ALTER TABLE `mrtvoly`
  ADD PRIMARY KEY (`id`),
  ADD KEY `cislo_hrobu` (`cislo_hrobu`);

--
-- AUTO_INCREMENT pro tabulky
--

--
-- AUTO_INCREMENT pro tabulku `mrtvoly`
--
ALTER TABLE `mrtvoly`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=976431259;

--
-- Omezení pro exportované tabulky
--

--
-- Omezení pro tabulku `mrtvoly`
--
ALTER TABLE `mrtvoly`
  ADD CONSTRAINT `mrtvoly_ibfk_1` FOREIGN KEY (`cislo_hrobu`) REFERENCES `hrob` (`cislo_hrobu`);
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 */;

