-- phpMyAdmin SQL Dump
-- version 4.2.12deb2
-- http://www.phpmyadmin.net
--
-- Počítač: localhost
-- Vytvořeno: Úte 30. čen 2015, 22:43
-- Verze serveru: 5.6.24-0ubuntu2
-- Verze PHP: 5.6.4-4ubuntu6

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";

--
-- Databáze: `tanec`
--

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

--
-- Struktura tabulky `Dance`
--

CREATE TABLE IF NOT EXISTS `Dance` (
`Id` int(11) NOT NULL,
  `Name` varchar(255) NOT NULL,
  `Group` int(11) DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8;

--
-- RELACE PRO TABULKU `Dance`:
--   `Group`
--       `DanceGroup` -> `Id`
--

--
-- Vypisuji data pro tabulku `Dance`
--

INSERT INTO `Dance` (`Id`, `Name`, `Group`) VALUES
(2, 'Waltz', 1),
(3, 'Valčík', 1),
(4, 'Quickstep', 1),
(5, 'Rumba', 2),
(6, 'Samba', 2),
(7, 'Cha-Cha', 2),
(8, 'Tango', 1),
(9, 'Jive', 2),
(10, 'Slowfox', NULL),
(11, 'Paso doble', 2),
(12, 'Salsa', 2),
(13, 'Rock''n''Roll', NULL),
(14, 'Polka', 3),
(15, 'Blues', NULL),
(16, 'Mazurka', NULL),
(17, 'Mambo', NULL),
(18, 'Swing', NULL),
(19, 'Charleston', NULL),
(20, 'Čardáš', NULL),
(21, 'Flamengo', 3),
(22, 'Foxtrot', 1),
(23, 'Zumba', NULL),
(24, 'Twist', NULL),
(25, 'Letkis', NULL);

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

--
-- Struktura tabulky `DanceGroup`
--

CREATE TABLE IF NOT EXISTS `DanceGroup` (
`Id` int(11) NOT NULL,
  `Name` varchar(255) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

--
-- Vypisuji data pro tabulku `DanceGroup`
--

INSERT INTO `DanceGroup` (`Id`, `Name`) VALUES
(1, 'Standardní'),
(2, 'Latinskoamerické'),
(3, 'Lidové');

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

--
-- Struktura tabulky `Music`
--

CREATE TABLE IF NOT EXISTS `Music` (
`Id` int(11) NOT NULL,
  `Name` varchar(255) NOT NULL,
  `URL` varchar(255) NOT NULL,
  `Dance` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- RELACE PRO TABULKU `Music`:
--   `Dance`
--       `Dance` -> `Id`
--

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

--
-- Struktura tabulky `Resource`
--

CREATE TABLE IF NOT EXISTS `Resource` (
`Id` int(11) NOT NULL,
  `Name` varchar(255) NOT NULL,
  `Dance` int(11) NOT NULL,
  `URL` varchar(255) NOT NULL,
  `Group` int(11) DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=66 DEFAULT CHARSET=utf8;

--
-- RELACE PRO TABULKU `Resource`:
--   `Dance`
--       `Dance` -> `Id`
--   `Group`
--       `ResourceGroup` -> `Id`
--

--
-- Vypisuji data pro tabulku `Resource`
--

INSERT INTO `Resource` (`Id`, `Name`, `Dance`, `URL`, `Group`) VALUES
(2, 'Quickstep', 4, 'http://www.ceskatelevize.cz/specialy/stardance-vi/skola-tance/quickstep/', 1),
(3, 'Waltz', 2, 'https://www.youtube.com/watch?v=N63oVUanpwc', 2),
(4, 'Basic steps', 22, 'https://www.youtube.com/watch?v=LQCDkaDaMjI&index=1&list=PL85daVLkG3M4Tck_yVqCYNvSMv1n6zBi6', 3),
(5, 'Corner step', 22, 'https://www.youtube.com/watch?v=s2F8VS6MUI4&index=2&list=PL85daVLkG3M4Tck_yVqCYNvSMv1n6zBi6', 3),
(6, 'Sway step', 22, 'https://www.youtube.com/watch?v=BBvPTt0VqmA&index=3&list=PL85daVLkG3M4Tck_yVqCYNvSMv1n6zBi6', 3),
(7, 'Promenade step', 22, 'https://www.youtube.com/watch?v=bQX7rlhQdMM&index=4&list=PL85daVLkG3M4Tck_yVqCYNvSMv1n6zBi6', 3),
(8, 'Lady underarm turn', 22, 'https://www.youtube.com/watch?v=MxakBt0Aqjw&index=5&list=PL85daVLkG3M4Tck_yVqCYNvSMv1n6zBi6', 3),
(9, 'Foxtrot', 22, 'https://www.youtube.com/watch?v=QoDU0QRfHFk', 2),
(10, 'Foxtrot', 22, 'https://www.youtube.com/watch?v=-oTUlXgH6QI', 4),
(11, 'Box step', 2, 'https://www.youtube.com/watch?v=n8PIcO4_S5Q&list=PLLuPnrdSNJUoFxxfK0yxuT27Taw5BI6Tc&index=4', 3),
(12, 'Face to face', 2, 'https://www.youtube.com/watch?v=CGgqccCnD8Y&list=PLLuPnrdSNJUoFxxfK0yxuT27Taw5BI6Tc&index=2', 3),
(13, 'Ladies underarm turn', 2, 'https://www.youtube.com/watch?v=qjFR9E5CHaM&list=PLLuPnrdSNJUoFxxfK0yxuT27Taw5BI6Tc&index=3', 3),
(14, 'Progressive step', 2, 'https://www.youtube.com/watch?v=fdStVuh56sY&list=PLLuPnrdSNJUoFxxfK0yxuT27Taw5BI6Tc&index=1', 3),
(15, 'Balance step', 2, 'https://www.youtube.com/watch?v=7Box5mIkBi8&list=PLLuPnrdSNJUoFxxfK0yxuT27Taw5BI6Tc&index=5', 3),
(16, 'Basic steps', 9, 'https://www.youtube.com/watch?v=LMilE769YY8', 3),
(17, 'Rolling off the arm steps', 9, 'https://www.youtube.com/watch?v=jOJuCT2OBQg', 3),
(18, 'Mooch step', 9, 'https://www.youtube.com/watch?v=tsmJC9q80z4', 3),
(19, 'Whip step', 9, 'https://www.youtube.com/watch?v=aduj861nX3I', 3),
(20, 'Windmill step', 9, 'https://www.youtube.com/watch?v=GjS_m6aWy3Y', 3),
(21, '4 basic elements', 7, 'https://www.youtube.com/watch?v=PWiLi22Cq8w', 3),
(22, 'Advanced routine', 7, 'https://www.youtube.com/watch?v=1CXGwc617sQ', 3),
(23, 'For beginners', 7, 'https://www.youtube.com/watch?v=TiB2vbySdw0', 3),
(24, 'Syncopated Cuban Breaks', 7, 'https://www.youtube.com/watch?v=ZOkso120R6g', 3),
(25, 'Cross body lead', 7, 'https://www.youtube.com/watch?v=EubkwC6xj10', 3),
(26, 'Triple lock step', 7, 'https://www.youtube.com/watch?v=LrBMVANoz_M', 3),
(27, 'Spot turn', 7, 'https://www.youtube.com/watch?v=dwLyBdbvHlY', 3),
(28, 'Cucaracha Break', 7, 'https://www.youtube.com/watch?v=oTIN8Hlv5MQ&index=8&list=PL85daVLkG3M42C_lKww1PDjJw1Uwm-Eo3', 3),
(29, 'Settle Your Hips', 7, 'https://www.youtube.com/watch?v=FqqOav26mOg&index=10&list=PL85daVLkG3M42C_lKww1PDjJw1Uwm-Eo3', 3),
(30, 'Arm styling ladies', 7, 'https://www.youtube.com/watch?v=2X3UeH7qOsg&index=11&list=PL85daVLkG3M42C_lKww1PDjJw1Uwm-Eo3', 3),
(31, 'Open break', 7, 'https://www.youtube.com/watch?v=tWzn0NX-k6Q&index=12&list=PL85daVLkG3M42C_lKww1PDjJw1Uwm-Eo3', 3),
(32, 'With partner', 7, 'https://www.youtube.com/watch?v=W1CCjhrBJtA&index=13&list=PL85daVLkG3M42C_lKww1PDjJw1Uwm-Eo3', 3),
(33, 'Cha-Cha', 7, 'http://www.ceskatelevize.cz/specialy/stardance-vi/skola-tance/cha-cha/', 1),
(34, 'Cha-Cha', 7, 'https://www.youtube.com/watch?v=2OteVBoFtkg', 2),
(35, 'Quickstep', 4, 'https://www.youtube.com/watch?v=5fNNdGWjpj4', 4),
(36, 'Rumba', 5, 'https://www.youtube.com/watch?v=z9ivj0kvFPs', 4),
(37, 'Waltz', 2, 'https://www.youtube.com/watch?v=gl0g0gGt7tU', 4),
(38, 'Cha-Cha', 7, 'https://www.youtube.com/watch?v=l0aH_DF4cxs', 4),
(39, 'Tango', 8, 'https://www.youtube.com/watch?v=VE_HHZKUeM0', 4),
(40, 'Jive', 9, 'https://www.youtube.com/watch?v=Qu7kFnLX6wo', 4),
(41, 'Slowfox', 10, 'https://www.youtube.com/watch?v=GmpU5vDK3gk', 4),
(42, 'Valčík', 3, 'https://www.youtube.com/watch?v=DKBwmcTMCms', 4),
(43, 'Rock''n''Roll', 13, 'https://www.youtube.com/watch?v=UC_XpUcIQ_8', 4),
(44, 'Polka', 14, 'https://www.youtube.com/watch?v=r_Ceds7iX5U', 4),
(45, 'Blues', 15, 'https://www.youtube.com/watch?v=VdG36fd69Aw', 4),
(46, 'Mambo', 17, 'https://www.youtube.com/watch?v=m9kvr0jG5pQ', 4),
(47, 'Mazurka', 16, 'https://www.youtube.com/watch?v=2RlqErI5V8s', 4),
(48, 'Rumba', 5, 'https://www.youtube.com/watch?v=42q-XlLPBk4', 2),
(49, 'Tango', 8, 'https://www.youtube.com/watch?v=gl0g0gGt7tU', 2),
(50, 'Jive', 9, 'https://www.youtube.com/watch?v=Xir2Qo-LYYI', 2),
(51, 'Slowfox', 10, 'https://www.youtube.com/watch?v=T6UGk9n76kY', 2),
(52, 'Samba', 6, 'https://www.youtube.com/watch?v=qtHD33oW_Yk', 2),
(53, 'Valčík', 3, 'https://www.youtube.com/watch?v=ELNXsNhj9zg', 2),
(54, 'Rock''n''Roll', 13, 'https://www.youtube.com/watch?v=vaRuvIdo1i8', 2),
(55, 'Polka', 14, 'https://www.youtube.com/watch?v=LiIxtj0wtcA', 2),
(56, 'Blues', 15, 'https://www.youtube.com/watch?v=T6UGk9n76kY', 2),
(57, 'Rumba', 5, 'http://www.ceskatelevize.cz/specialy/stardance-vi/skola-tance/rumba/', 1),
(58, 'Waltz', 2, 'http://www.ceskatelevize.cz/specialy/stardance-vi/skola-tance/waltz/', 1),
(59, 'Tango', 8, 'http://www.ceskatelevize.cz/specialy/stardance-vi/skola-tance/tango/', 1),
(60, 'Jive', 9, 'http://www.ceskatelevize.cz/specialy/stardance-vi/skola-tance/jive/', 1),
(61, 'Slowfox', 10, 'http://www.ceskatelevize.cz/specialy/stardance-vi/skola-tance/slowfoxtrot/', 1),
(62, 'Paso doble', 11, 'http://www.ceskatelevize.cz/specialy/stardance-vi/skola-tance/paso-doble/', 1),
(63, 'Samba', 6, 'http://www.ceskatelevize.cz/specialy/stardance-vi/skola-tance/samba/', 1),
(64, 'Salsa', 12, 'http://www.ceskatelevize.cz/specialy/stardance-vi/skola-tance/salsa/', 1),
(65, 'Valčík', 3, 'http://www.ceskatelevize.cz/specialy/stardance-vi/skola-tance/valcik/', 1);

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

--
-- Struktura tabulky `ResourceGroup`
--

CREATE TABLE IF NOT EXISTS `ResourceGroup` (
`Id` int(11) NOT NULL,
  `Name` varchar(255) NOT NULL,
  `URL` varchar(255) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

--
-- Vypisuji data pro tabulku `ResourceGroup`
--

INSERT INTO `ResourceGroup` (`Id`, `Name`, `URL`) VALUES
(1, 'ČT StarDance', ''),
(2, 'ČT televizní tančení', ''),
(3, 'Howcast', 'http://www.howcast.com/'),
(4, 'TK Classic', 'http://www.google.cz/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0CCEQFjAA&url=http%3A%2F%2Fwww.tkclassic.cz%2F&ei=BcRPVfSyO4msU6yNgZgG&usg=AFQjCNGWVzyw-uvIcF5Dd6637ZK1CJ0J7Q&sig2=A4NfhundTffGPGv5oOf7kQ');

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

--
-- Struktura tabulky `School`
--

CREATE TABLE IF NOT EXISTS `School` (
`Id` int(11) NOT NULL,
  `Name` varchar(255) NOT NULL,
  `Address` varchar(255) NOT NULL,
  `URL` varchar(255) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

--
-- Vypisuji data pro tabulku `School`
--

INSERT INTO `School` (`Id`, `Name`, `Address`, `URL`) VALUES
(1, 'Taneční škola Blanky Vášové', 'Praha', 'http://tanecni.net/'),
(2, 'Taneční škola Vavruška', 'Praha', 'http://www.vavruska.info/'),
(3, 'Taneční škola Plamínek', 'Praha', 'http://www.plaminek.cz/');

--
-- Klíče pro exportované tabulky
--

--
-- Klíče pro tabulku `Dance`
--
ALTER TABLE `Dance`
 ADD PRIMARY KEY (`Id`), ADD KEY `Group` (`Group`);

--
-- Klíče pro tabulku `DanceGroup`
--
ALTER TABLE `DanceGroup`
 ADD PRIMARY KEY (`Id`);

--
-- Klíče pro tabulku `Music`
--
ALTER TABLE `Music`
 ADD PRIMARY KEY (`Id`), ADD KEY `Dance` (`Dance`);

--
-- Klíče pro tabulku `Resource`
--
ALTER TABLE `Resource`
 ADD PRIMARY KEY (`Id`), ADD KEY `Dance` (`Dance`), ADD KEY `Group` (`Group`);

--
-- Klíče pro tabulku `ResourceGroup`
--
ALTER TABLE `ResourceGroup`
 ADD PRIMARY KEY (`Id`);

--
-- Klíče pro tabulku `School`
--
ALTER TABLE `School`
 ADD PRIMARY KEY (`Id`);

--
-- AUTO_INCREMENT pro tabulky
--

--
-- AUTO_INCREMENT pro tabulku `Dance`
--
ALTER TABLE `Dance`
MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=26;
--
-- AUTO_INCREMENT pro tabulku `DanceGroup`
--
ALTER TABLE `DanceGroup`
MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT pro tabulku `Music`
--
ALTER TABLE `Music`
MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT pro tabulku `Resource`
--
ALTER TABLE `Resource`
MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=66;
--
-- AUTO_INCREMENT pro tabulku `ResourceGroup`
--
ALTER TABLE `ResourceGroup`
MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT pro tabulku `School`
--
ALTER TABLE `School`
MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4;
--
-- Omezení pro exportované tabulky
--

--
-- Omezení pro tabulku `Dance`
--
ALTER TABLE `Dance`
ADD CONSTRAINT `Dance_ibfk_1` FOREIGN KEY (`Group`) REFERENCES `DanceGroup` (`Id`);

--
-- Omezení pro tabulku `Music`
--
ALTER TABLE `Music`
ADD CONSTRAINT `Music_ibfk_1` FOREIGN KEY (`Dance`) REFERENCES `Dance` (`Id`);

--
-- Omezení pro tabulku `Resource`
--
ALTER TABLE `Resource`
ADD CONSTRAINT `Resource_ibfk_1` FOREIGN KEY (`Dance`) REFERENCES `Dance` (`Id`),
ADD CONSTRAINT `Resource_ibfk_2` FOREIGN KEY (`Group`) REFERENCES `ResourceGroup` (`Id`);
