-
Notifications
You must be signed in to change notification settings - Fork 0
/
KebabProjectV1.sql
155 lines (125 loc) · 3.9 KB
/
KebabProjectV1.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
-- phpMyAdmin SQL Dump
-- version 5.2.0
-- https://www.phpmyadmin.net/
--
-- Host: db
-- Czas generowania: 10 Sty 2023, 17:02
-- Wersja serwera: 5.7.40
-- Wersja PHP: 8.0.19
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: `KebabProject`
--
-- --------------------------------------------------------
--
-- Struktura tabeli dla tabeli `AllKebab`
--
CREATE TABLE `AllKebab` (
`KebabID` int(11) NOT NULL,
`KebabName` text COLLATE utf32_polish_ci NOT NULL,
`Specification` text COLLATE utf32_polish_ci NOT NULL,
`Price` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf32 COLLATE=utf32_polish_ci;
--
-- Zrzut danych tabeli `AllKebab`
--
INSERT INTO `AllKebab` (`KebabID`, `KebabName`, `Specification`, `Price`) VALUES
(1, 'RolloKebab', 'kebabInATortilla', 18),
(2, 'KebabBox', 'KebabInABox', 22),
(3, 'PizzaKebab', 'PizzaWithKebabMeat', 28),
(4, 'BurgerKebab', 'DeliciousBurger', 40);
-- --------------------------------------------------------
--
-- Struktura tabeli dla tabeli `Ingredients`
--
CREATE TABLE `Ingredients` (
`Id` int(11) NOT NULL,
`AllKebabId` int(11) NOT NULL,
`Meat` text COLLATE utf32_polish_ci NOT NULL,
`Sauce` text COLLATE utf32_polish_ci NOT NULL,
`Vegetables` text COLLATE utf32_polish_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf32 COLLATE=utf32_polish_ci;
--
-- Zrzut danych tabeli `Ingredients`
--
INSERT INTO `Ingredients` (`Id`, `AllKebabId`, `Meat`, `Sauce`, `Vegetables`) VALUES
(1, 4, 'Tempeh', 'Spicy', 'Salad'),
(2, 2, 'ChickpeaCutlet', 'Medium', 'Tomato'),
(3, 3, 'Mutton', 'Soft', 'Salad'),
(4, 1, 'Chicken', 'Spicy', 'Salad');
-- --------------------------------------------------------
--
-- Struktura tabeli dla tabeli `OrderKebab`
--
CREATE TABLE `OrderKebab` (
`ID` int(11) NOT NULL,
`FirstName` text COLLATE utf32_polish_ci NOT NULL,
`LastName` text COLLATE utf32_polish_ci NOT NULL,
`PhoneNumber` int(11) NOT NULL,
`Adress` text COLLATE utf32_polish_ci NOT NULL,
`AllKebabId` int(11) NOT NULL,
`quantity` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf32 COLLATE=utf32_polish_ci;
--
-- Zrzut danych tabeli `OrderKebab`
--
INSERT INTO `OrderKebab` (`ID`, `FirstName`, `LastName`, `PhoneNumber`, `Adress`, `AllKebabId`, `quantity`) VALUES
(1, 'Jacek', 'Komar', 777888999, 'Jasionka32', 1, 1),
(2, 'Arkadiusz', 'Pan', 123321425, 'Dziewule22', 3, 3),
(3, 'Tadeusz', 'Soplica', 333545908, 'Soplicowo61', 2, 2),
(4, 'Jan', 'Kowalski', 111212312, 'Zbuczyn11', 4, 5);
--
-- Indeksy dla zrzutów tabel
--
--
-- Indeksy dla tabeli `AllKebab`
--
ALTER TABLE `AllKebab`
ADD PRIMARY KEY (`KebabID`);
--
-- Indeksy dla tabeli `Ingredients`
--
ALTER TABLE `Ingredients`
ADD PRIMARY KEY (`Id`);
--
-- Indeksy dla tabeli `OrderKebab`
--
ALTER TABLE `OrderKebab`
ADD PRIMARY KEY (`ID`),
ADD KEY `AllKebabId` (`AllKebabId`);
--
-- AUTO_INCREMENT dla zrzuconych tabel
--
--
-- AUTO_INCREMENT dla tabeli `AllKebab`
--
ALTER TABLE `AllKebab`
MODIFY `KebabID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT dla tabeli `Ingredients`
--
ALTER TABLE `Ingredients`
MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT dla tabeli `OrderKebab`
--
ALTER TABLE `OrderKebab`
MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- Ograniczenia dla zrzutów tabel
--
--
-- Ograniczenia dla tabeli `OrderKebab`
--
ALTER TABLE `OrderKebab`
ADD CONSTRAINT `OrderKebab_ibfk_1` FOREIGN KEY (`AllKebabId`) REFERENCES `AllKebab` (`KebabID`);
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 */;