diff --git a/eduprojekt.sql b/eduprojekt.sql new file mode 100644 index 0000000..fdd068f --- /dev/null +++ b/eduprojekt.sql @@ -0,0 +1,106 @@ +-- phpMyAdmin SQL Dump +-- version 5.0.4 +-- https://www.phpmyadmin.net/ +-- +-- Host: 127.0.0.1 +-- Czas generowania: 29 Gru 2020, 20:00 +-- 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: `eduprojekt` +-- + +-- -------------------------------------------------------- + +-- +-- Struktura tabeli dla tabeli `pytania` +-- + +CREATE TABLE `pytania` ( + `id_pytania` int(20) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_polish_ci; + +-- -------------------------------------------------------- + +-- +-- Struktura tabeli dla tabeli `quizy` +-- + +CREATE TABLE `quizy` ( + `id_quizu` int(20) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_polish_ci; + +-- -------------------------------------------------------- + +-- +-- Struktura tabeli dla tabeli `users` +-- + +CREATE TABLE `users` ( + `id_user` int(20) NOT NULL, + `Nazwa` varchar(20) COLLATE utf8_polish_ci NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_polish_ci; + +-- -------------------------------------------------------- + +-- +-- Struktura tabeli dla tabeli `wyniki` +-- + +CREATE TABLE `wyniki` ( + `id_wynik` int(20) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_polish_ci; + +-- +-- Indeksy dla zrzutów tabel +-- + +-- +-- Indeksy dla tabeli `pytania` +-- +ALTER TABLE `pytania` + ADD PRIMARY KEY (`id_pytania`); + +-- +-- Indeksy dla tabeli `quizy` +-- +ALTER TABLE `quizy` + 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`); + +-- +-- Ograniczenia dla zrzutów tabel +-- + +-- +-- Ograniczenia dla tabeli `users` +-- +ALTER TABLE `users` + ADD CONSTRAINT `users_ibfk_1` FOREIGN KEY (`id_user`) REFERENCES `wyniki` (`id_wynik`); +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 */;