277 lines
6.7 KiB
SQL
277 lines
6.7 KiB
SQL
-- phpMyAdmin SQL Dump
|
|
-- version 5.0.4
|
|
-- https://www.phpmyadmin.net/
|
|
--
|
|
-- Host: 127.0.0.1
|
|
-- Czas generowania: 12 Lut 2021, 19:52
|
|
-- Wersja serwera: 10.4.17-MariaDB
|
|
-- Wersja PHP: 7.4.13
|
|
|
|
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 */;
|
|
|
|
--
|
|
-- Baza danych: `test`
|
|
--
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Struktura tabeli dla tabeli `pytania`
|
|
--
|
|
|
|
CREATE TABLE `pytania` (
|
|
`id_pytania` int(20) NOT NULL,
|
|
`Pytanie` varchar(100) NOT NULL,
|
|
`P_odp` varchar(20) NOT NULL,
|
|
`B_odp_1` varchar(20) NOT NULL,
|
|
`B_odp_2` varchar(20) NOT NULL,
|
|
`B_odp_3` varchar(20) NOT NULL
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
|
|
--
|
|
-- Zrzut danych tabeli `pytania`
|
|
--
|
|
|
|
INSERT INTO `pytania` (`id_pytania`, `Pytanie`, `P_odp`, `B_odp_1`, `B_odp_2`, `B_odp_3`) VALUES
|
|
(1, 'Ile wynosi 2 + 2:', '4', '5', '3', '6'),
|
|
(2, 'Wzór na pole rombu to:', 'a * h', 'a * a', 'a * b * c', 'a^2'),
|
|
(3, 'Ile wynosi 2 + 12:', '14', '10', '12', '16'),
|
|
(4, 'Wzór na pole kwadratu to:', 'a^2', '4a', 'a * b', '2a * 2b'),
|
|
(5, 'Ile wynosi 20 + 12:', '32', '20', '12', '8'),
|
|
(6, 'Wzór na pole trapezu to:', '(a + b) * h / 2', 'a * h / 2', '(a + b) / 2', 'h / 2'),
|
|
(7, 'Ile wynosi 2 * 2:', '4', '8', '16', '2'),
|
|
(8, 'Ile wynosi (x+y)(x-y):', 'x^2 - y^2', 'x^2 - y', 'x^3 - 2y', 'x - 3y'),
|
|
(9, 'Wzór na pole trojkata to:', 'a * h / 2', 'a * h', 'a * b', 'a^2 + b^2 = c^2'),
|
|
(10, 'Wzór na obwód kwadratu to:', '4a', 'a^4', 'a^b', 'a * b');
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Struktura tabeli dla tabeli `pytania_quiz`
|
|
--
|
|
|
|
CREATE TABLE `pytania_quiz` (
|
|
`id_quiz_pytania` int(20) NOT NULL,
|
|
`quiz_nazwa` varchar(20) NOT NULL,
|
|
`pytanie` varchar(20) NOT NULL,
|
|
`p_odp` varchar(20) NOT NULL,
|
|
`b_odp_1` varchar(20) NOT NULL,
|
|
`b_odp_2` varchar(20) NOT NULL,
|
|
`b_odp_3` varchar(20) NOT NULL
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
|
|
--
|
|
-- Zrzut danych tabeli `pytania_quiz`
|
|
--
|
|
|
|
INSERT INTO `pytania_quiz` (`id_quiz_pytania`, `quiz_nazwa`, `pytanie`, `p_odp`, `b_odp_1`, `b_odp_2`, `b_odp_3`) VALUES
|
|
(9, 'quiz1', 'q1_p1', 'q1_p_odp', 'q1_b_odp_1', 'q1_b_odp_2', 'q1_b_odp_3'),
|
|
(10, 'quiz1', 'q1_p2', 'q1_p_odp', 'q1_b_odp_1', 'q1_b_odp_2', 'q1_b_odp_3'),
|
|
(11, 'quiz1', 'q1_p3', 'q1_p_odp', 'q1_b_odp_1', 'q1_b_odp_2', 'q1_b_odp_3'),
|
|
(12, 'quiz1', 'q1_p4', 'q1_p_odp', 'q1_b_odp_1', 'q1_b_odp_2', 'q1_b_odp_3'),
|
|
(13, 'quiz1', 'q1_p5', 'q1_p_odp', 'q1_b_odp_1', 'q1_b_odp_2', 'q1_b_odp_3');
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Struktura tabeli dla tabeli `quiz`
|
|
--
|
|
|
|
CREATE TABLE `quiz` (
|
|
`id_quizu` int(20) NOT NULL,
|
|
`quiz_nazwa` varchar(20) NOT NULL
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
|
|
--
|
|
-- Zrzut danych tabeli `quiz`
|
|
--
|
|
|
|
INSERT INTO `quiz` (`id_quizu`, `quiz_nazwa`) VALUES
|
|
(16, 'quiz1'),
|
|
(17, 'quiz2'),
|
|
(18, 'quiz3'),
|
|
(19, 'quiz4'),
|
|
(20, 'quiz5'),
|
|
(21, 'quiz6'),
|
|
(22, 'quiz7'),
|
|
(23, 'quiz8'),
|
|
(24, 'quiz9'),
|
|
(25, 'quiz10'),
|
|
(26, 'quiz11'),
|
|
(27, 'quiz12'),
|
|
(28, 'quiz13'),
|
|
(29, 'quiz14'),
|
|
(30, 'quiz15'),
|
|
(31, 'quiz16'),
|
|
(32, 'quiz17'),
|
|
(33, 'quiz18'),
|
|
(34, 'quiz19'),
|
|
(35, 'quiz20');
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Struktura tabeli dla tabeli `users`
|
|
--
|
|
|
|
CREATE TABLE `users` (
|
|
`id_user` int(11) NOT NULL,
|
|
`Nazwa` varchar(200) NOT NULL,
|
|
`Typ` varchar(200) NOT NULL
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
|
|
--
|
|
-- Zrzut danych tabeli `users`
|
|
--
|
|
|
|
INSERT INTO `users` (`id_user`, `Nazwa`, `Typ`) VALUES
|
|
(1, 'P01PC01', 'Admin'),
|
|
(2, 'P01PC04', 'User'),
|
|
(3, 'P01PC02', 'User'),
|
|
(4, 'P01PC03', 'User'),
|
|
(5, 'Jacob-PC1', 'User'),
|
|
(6, 'P02PC01', 'Admin'),
|
|
(7, 'P02PC02', 'User'),
|
|
(8, 'P02PC03', 'User'),
|
|
(9, 'P02PC04', 'User'),
|
|
(10, 'P02PC05', 'User');
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Struktura tabeli dla tabeli `wyniki`
|
|
--
|
|
|
|
CREATE TABLE `wyniki` (
|
|
`id_wynik` int(20) NOT NULL,
|
|
`quiz_nazwa` varchar(20) NOT NULL,
|
|
`user_nazwa` varchar(20) NOT NULL,
|
|
`l_pkt` int(20) NOT NULL
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
|
|
--
|
|
-- Zrzut danych tabeli `wyniki`
|
|
--
|
|
|
|
INSERT INTO `wyniki` (`id_wynik`, `quiz_nazwa`, `user_nazwa`, `l_pkt`) VALUES
|
|
(1, 'quiz1', 'Adam', 5),
|
|
(2, 'quiz2', 'Pawel', 5),
|
|
(3, 'quiz3', 'Karo', 6),
|
|
(4, 'quiz4', 'Anna', 3),
|
|
(5, 'quiz5', 'Jan', 1),
|
|
(6, 'quiz1', 'Adam', 0),
|
|
(7, 'quiz2', 'Pawel', 0),
|
|
(8, 'quiz3', 'Karo', 0),
|
|
(9, 'quiz4', 'Anna', 0),
|
|
(10, 'quiz5', 'Jan', 0),
|
|
(11, 'quiz1', 'Adam', 5),
|
|
(12, 'quiz2', 'Pawel', 5),
|
|
(13, 'quiz1', 'Adam', 5),
|
|
(14, 'quiz2', 'Pawel', 5),
|
|
(15, 'quiz3', 'Karo', 6),
|
|
(16, 'quiz4', 'Anna', 3),
|
|
(17, 'quiz5', 'Jan', 1),
|
|
(18, 'quiz1', 'Anna', 3),
|
|
(19, 'quiz2', 'Anna', 2),
|
|
(20, 'quiz1', 'Przemek', 5),
|
|
(21, 'quiz1', 'Piotr', 5),
|
|
(22, 'quiz1', 'Annie', 1),
|
|
(23, 'quiz1', 'Zosia', 4),
|
|
(24, 'quiz1', 'Pawel', 3),
|
|
(25, 'quiz6', 'Adam', 5),
|
|
(26, 'quiz17', 'Adam', 1),
|
|
(27, 'quiz8', 'Adam', 3),
|
|
(28, 'quiz19', 'Adam', 3),
|
|
(29, 'quiz10', 'Adam', 4),
|
|
(30, 'quiz6', 'Pawel', 3),
|
|
(31, 'quiz17', 'Pawel', 2),
|
|
(32, 'quiz18', 'Pawel', 1),
|
|
(33, 'quiz4', 'Pawel', 5),
|
|
(34, 'quiz20', 'Pawel', 4),
|
|
(35, 'quiz6', 'Karo', 3),
|
|
(36, 'quiz17', 'Karo', 5),
|
|
(37, 'quiz3', 'Karo', 5),
|
|
(38, 'quiz4', 'Karo', 1),
|
|
(39, 'quiz10', 'Karo', 2);
|
|
|
|
--
|
|
-- Indeksy dla zrzutów tabel
|
|
--
|
|
|
|
--
|
|
-- Indeksy dla tabeli `pytania`
|
|
--
|
|
ALTER TABLE `pytania`
|
|
ADD PRIMARY KEY (`id_pytania`);
|
|
|
|
--
|
|
-- Indeksy dla tabeli `pytania_quiz`
|
|
--
|
|
ALTER TABLE `pytania_quiz`
|
|
ADD PRIMARY KEY (`id_quiz_pytania`);
|
|
|
|
--
|
|
-- Indeksy dla tabeli `quiz`
|
|
--
|
|
ALTER TABLE `quiz`
|
|
ADD PRIMARY KEY (`id_quizu`);
|
|
|
|
--
|
|
-- Indeksy dla tabeli `users`
|
|
--
|
|
ALTER TABLE `users`
|
|
ADD PRIMARY KEY (`id_user`);
|
|
|
|
--
|
|
-- Indeksy dla tabeli `wyniki`
|
|
--
|
|
ALTER TABLE `wyniki`
|
|
ADD PRIMARY KEY (`id_wynik`);
|
|
|
|
--
|
|
-- AUTO_INCREMENT dla zrzuconych tabel
|
|
--
|
|
|
|
--
|
|
-- AUTO_INCREMENT dla tabeli `pytania`
|
|
--
|
|
ALTER TABLE `pytania`
|
|
MODIFY `id_pytania` int(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=45;
|
|
|
|
--
|
|
-- AUTO_INCREMENT dla tabeli `pytania_quiz`
|
|
--
|
|
ALTER TABLE `pytania_quiz`
|
|
MODIFY `id_quiz_pytania` int(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;
|
|
|
|
--
|
|
-- AUTO_INCREMENT dla tabeli `quiz`
|
|
--
|
|
ALTER TABLE `quiz`
|
|
MODIFY `id_quizu` int(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=36;
|
|
|
|
--
|
|
-- AUTO_INCREMENT dla tabeli `users`
|
|
--
|
|
ALTER TABLE `users`
|
|
MODIFY `id_user` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
|
|
|
|
--
|
|
-- AUTO_INCREMENT dla tabeli `wyniki`
|
|
--
|
|
ALTER TABLE `wyniki`
|
|
MODIFY `id_wynik` int(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=40;
|
|
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 */;
|