kawaiilingo-api/kawaiilingo.sql

295 lines
8.6 KiB
SQL

-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 02, 2024 at 04:46 PM
-- Server version: 10.4.32-MariaDB
-- PHP Version: 8.2.12
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 */;
--
-- Database: `kawaiilingo`
--
-- --------------------------------------------------------
--
-- Table structure for table `categories`
--
CREATE TABLE `categories` (
`categoryId` int(11) NOT NULL,
`englishName` varchar(255) DEFAULT NULL,
`polishName` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for table `categories`
--
INSERT INTO `categories` (`categoryId`, `englishName`, `polishName`) VALUES
(1, 'numbers', 'Liczby'),
(2, 'weekDays', 'Dni tygodnia'),
(3, 'colors', 'Kolory'),
(4, 'weather', 'Pogoda'),
(5, 'food', 'Jedzenie'),
(6, 'family', 'Rodzina'),
(7, 'months', 'Miesiące'),
(8, 'animals', 'Zwierzęta');
-- --------------------------------------------------------
--
-- Table structure for table `learnedwords`
--
CREATE TABLE `learnedwords` (
`learnedID` int(11) NOT NULL,
`userID` int(11) NOT NULL,
`wordID` int(11) NOT NULL,
`percentage` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
-- --------------------------------------------------------
--
-- Table structure for table `scores`
--
CREATE TABLE `scores` (
`scoreId` int(11) NOT NULL,
`userId` int(11) NOT NULL,
`time` int(11) NOT NULL DEFAULT 0,
`xp` int(11) NOT NULL DEFAULT 0,
`mistakes` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`userId` int(10) NOT NULL,
`username` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`xp` int(11) NOT NULL DEFAULT 0,
`level` int(11) NOT NULL DEFAULT 0,
`dateJoined` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
-- --------------------------------------------------------
--
-- Table structure for table `words`
--
CREATE TABLE `words` (
`wordID` int(11) NOT NULL,
`polishWord` varchar(255) NOT NULL,
`japaneseWord` varchar(255) NOT NULL,
`romaji` varchar(255) NOT NULL,
`categoryId` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for table `words`
--
INSERT INTO `words` (`wordID`, `polishWord`, `japaneseWord`, `romaji`, `categoryId`) VALUES
(6, 'zero', 'ぜろ', 'zero', 1),
(7, 'jeden', 'いち', 'ichi', 1),
(8, 'dwa', '', 'ni', 1),
(9, 'trzy', 'さん', 'san', 1),
(10, 'cztery', 'よん|し', 'yon|shi', 1),
(12, 'pięć', '', 'go', 1),
(13, 'sześć', 'ろく', 'roku', 1),
(14, 'siedem', 'なな|しち', 'nana|shichi', 1),
(16, 'osiem', 'はち', 'hachi', 1),
(17, 'dziewięć', 'きゅう', 'kyuu', 1),
(18, 'dziesięć', 'じゅう', 'juu', 1),
(19, 'sto', 'ひゃく', 'hyaku', 1),
(20, 'tysiąc', 'せん', 'sen', 1),
(21, 'poniedziałek', 'げつようび', 'getsuyoubi', 2),
(22, 'wtorek', 'かようび', 'kayoubi', 2),
(23, 'środa', 'すいようび', 'suiyoubi', 2),
(24, 'czwartek', 'もくようび', 'mokuyoubi', 2),
(25, 'piątek', 'きんようび', 'kinyoubi', 2),
(26, 'sobota', 'どようび\r\n', 'doyoubi', 2),
(27, 'niedziela', 'にちようび', 'nichiyoubi', 2),
(28, 'kolor', 'いろ', 'iro', 3),
(29, 'czarny', 'くろ', 'kuro', 3),
(30, 'czerwony', 'あか', 'aka', 3),
(31, 'niebieski', 'あお', 'ao', 3),
(32, 'fieletowy', 'むらさき', 'murasaki', 3),
(33, 'biały', 'しろ', 'shiro', 3),
(34, 'zielony', 'みどり', 'midori', 3),
(35, 'pomarańczowy', 'おれんじ', 'orenji', 3),
(36, 'żółty', 'きいろ', 'kiiro', 3),
(37, 'brązowy', 'ちゃいろ', 'chairo', 3),
(38, 'pogoda', 'てんき', 'Tenki', 4),
(39, 'słonecznie', 'はれ\r\n\r\n', 'hare', 4),
(40, 'zachmurzenie', 'くもり', 'kumori', 4),
(41, 'deszcz', 'あめ', 'ame', 4),
(42, 'śnieg', 'ゆき', 'yuki', 4),
(43, 'gorąco', 'あつい', 'atsui', 4),
(44, 'zimno', 'さむい', 'samui', 4),
(45, 'ciepło', 'あたたかい', 'atatakai', 4),
(46, 'chłodno', 'すずしい', 'suzushii', 4),
(47, 'burza', 'らあいう', 'raiu', 4),
(48, 'ryż', 'ごはん', 'gohan', 5),
(49, 'zielona herbata', 'おちゃ', 'ocha', 5),
(50, 'czarna herbata', 'こうちゃ', 'koucha', 5),
(51, 'chleb', 'ぱん', 'pan', 5),
(52, 'mięso', 'にく', 'niku', 5),
(53, 'warzywa', 'やさい', 'yasai', 5),
(54, 'jajko', 'たまご', 'tamago', 5),
(55, 'ryba', 'さかな', 'sakana', 5),
(56, 'mleko', 'ぎゅにゅ', 'gyunyu', 5),
(57, 'woda', 'みず', 'mizu', 5),
(58, 'pizza', 'ぴざ', 'piza', 5),
(59, 'ciasto', 'けーき', 'keeki', 5),
(60, 'mama', 'はは', 'haha', 6),
(61, 'tata', 'ちち', 'chichi', 6),
(62, 'starszy brat', 'あに', 'ani', 6),
(63, 'młodszy brat', 'おとうと', 'otouto', 6),
(64, 'starsza siostra', 'あね', 'ane', 6),
(65, 'młodsza siostra', 'いもうと', 'imouto', 6),
(66, 'córka', 'むすめ', 'musume', 6),
(67, 'syn', 'むすこ', 'musuko', 6),
(68, 'mąż', 'おっと', 'otto', 6),
(69, 'żona', 'つま', 'tsuma', 6),
(70, 'babcia', 'そぼ', 'sobo', 6),
(71, 'dziadek', 'そふ', 'sofu', 6),
(72, 'styczeń', 'いちがつ', 'ichigatsu', 7),
(73, 'luty', 'にがつ', 'nigatsu', 7),
(74, 'marzed', 'さんがつ', 'sangatsu', 7),
(75, 'kwiecień', 'しがつ', 'shigatsu', 7),
(76, 'maj', 'ごがつ', 'gogatsu', 7),
(77, 'czerwiec', 'ろくがつ', 'rokugatsu', 7),
(78, 'lipiec', 'しちがつ', 'shichigatsu', 7),
(79, 'sierpień', 'はちがつ', 'hachigatsu', 7),
(80, 'wrzesień', 'くがつ', 'kugatsu', 7),
(81, 'październik', 'じゅうがつ', 'juugatsu', 7),
(82, 'listopad', 'じゅういちがつ', 'juuichigatsu', 7),
(83, 'grudzień', 'じゅうにがつ', 'juunigatsu', 7),
(84, 'zwierzęta', 'どうぶつ', 'doubutsu', 8),
(85, 'świnia', 'ぶた', 'buta', 8),
(86, 'pies', 'いぬ', 'inu', 8),
(87, 'kot', 'ねこ', 'neko', 8),
(88, 'lis', 'きつね', 'kitsune', 8),
(89, 'niedźwieź', 'くま', 'kuma', 8),
(90, 'żyrafa', 'きりん', 'kirin', 8),
(91, 'małpa', 'さる', 'saru', 8),
(92, 'mysz', 'ねずみ', 'nezumi', 8),
(93, 'ptak', 'とり', 'tori', 8),
(94, 'królik', 'うさぎ', 'usagi', 8),
(95, 'krowa', 'うし', 'ushi', 8),
(96, 'koza', 'やぎ', 'yagi', 8);
--
-- Indexes for dumped tables
--
--
-- Indexes for table `categories`
--
ALTER TABLE `categories`
ADD PRIMARY KEY (`categoryId`);
--
-- Indexes for table `learnedwords`
--
ALTER TABLE `learnedwords`
ADD PRIMARY KEY (`learnedID`),
ADD KEY `FK_LearnedUser` (`userID`),
ADD KEY `FK_LearnedWord` (`wordID`);
--
-- Indexes for table `scores`
--
ALTER TABLE `scores`
ADD PRIMARY KEY (`scoreId`),
ADD KEY `FK_UserScore` (`userId`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`userId`);
--
-- Indexes for table `words`
--
ALTER TABLE `words`
ADD PRIMARY KEY (`wordID`),
ADD KEY `FK_WordCategory` (`categoryId`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `learnedwords`
--
ALTER TABLE `learnedwords`
MODIFY `learnedID` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `scores`
--
ALTER TABLE `scores`
MODIFY `scoreId` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `userId` int(10) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `words`
--
ALTER TABLE `words`
MODIFY `wordID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=97;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `learnedwords`
--
ALTER TABLE `learnedwords`
ADD CONSTRAINT `FK_LearnedUser` FOREIGN KEY (`userID`) REFERENCES `users` (`userId`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `FK_LearnedWord` FOREIGN KEY (`wordID`) REFERENCES `words` (`wordID`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `scores`
--
ALTER TABLE `scores`
ADD CONSTRAINT `FK_UserScore` FOREIGN KEY (`userId`) REFERENCES `users` (`userId`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `words`
--
ALTER TABLE `words`
ADD CONSTRAINT `FK_WordCategory` FOREIGN KEY (`categoryId`) REFERENCES `categories` (`categoryId`) ON DELETE CASCADE ON UPDATE CASCADE;
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 */;