-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdesafio.sql
162 lines (134 loc) · 3.39 KB
/
desafio.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
156
157
158
159
160
161
162
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 17-Fev-2022 às 19:47
-- Versão do servidor: 10.4.22-MariaDB
-- versão do PHP: 8.1.2
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 */;
--
-- Banco de dados: `desafio`
--
-- --------------------------------------------------------
--
-- Estrutura da tabela `produtos`
--
CREATE TABLE `produtos` (
`id` int(11) NOT NULL,
`nome` varchar(35) NOT NULL,
`tag` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Extraindo dados da tabela `produtos`
--
INSERT INTO `produtos` (`id`, `nome`, `tag`) VALUES
(7, 'Coca Cola Lata', 1),
(8, 'Cerveja Lata', 1),
(10, 'Açaí 1 Litro', 1),
(17, 'Suco', 1),
(20, 'Vinto Tinto 750ml', 2),
(21, 'Whisky Jack Daniel\'s', 15),
(22, 'Champagne De Castelnau', 16),
(23, 'Whisky White Horse', 15),
(24, 'Vinho Langarotti', 2),
(25, 'Champagne Moët & Chandon', 16),
(26, 'Drink de Frutas', 17),
(27, 'Drink Melancia', 17),
(28, 'Balde de Heiniken ', 18),
(29, 'Bal de Budweiser', 18),
(30, 'Balde de Corona', 18),
(31, 'Coca Cola', 1),
(32, 'Fanta', 1),
(33, 'Sprite', 1),
(36, 'vcvcv', 9),
(37, 'tete', 18);
-- --------------------------------------------------------
--
-- Estrutura da tabela `tags`
--
CREATE TABLE `tags` (
`id` int(11) NOT NULL,
`nome` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Extraindo dados da tabela `tags`
--
INSERT INTO `tags` (`id`, `nome`) VALUES
(1, 'Bebidas'),
(2, 'Vinhos'),
(3, 'Porções'),
(4, 'Sanduíches'),
(5, 'Pizzas'),
(9, 'Carnes'),
(10, 'Peixes'),
(11, 'Massas'),
(12, 'Prato Feito'),
(13, 'Sobremesas'),
(14, 'Pratos Brasileiros'),
(15, 'Whisky'),
(16, 'Champagne'),
(17, 'Drinks'),
(18, 'Cervejas');
-- --------------------------------------------------------
--
-- Estrutura da tabela `usuarios`
--
CREATE TABLE `usuarios` (
`id` int(11) NOT NULL,
`nome` varchar(50) NOT NULL,
`email` varchar(40) NOT NULL,
`senha` varchar(30) NOT NULL,
`nivel` varchar(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Extraindo dados da tabela `usuarios`
--
INSERT INTO `usuarios` (`id`, `nome`, `email`, `senha`, `nivel`) VALUES
(29, 'Administrador', '[email protected]', '123', 'Administrador');
--
-- Índices para tabelas despejadas
--
--
-- Índices para tabela `produtos`
--
ALTER TABLE `produtos`
ADD PRIMARY KEY (`id`);
--
-- Índices para tabela `tags`
--
ALTER TABLE `tags`
ADD PRIMARY KEY (`id`);
--
-- Índices para tabela `usuarios`
--
ALTER TABLE `usuarios`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT de tabelas despejadas
--
--
-- AUTO_INCREMENT de tabela `produtos`
--
ALTER TABLE `produtos`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=38;
--
-- AUTO_INCREMENT de tabela `tags`
--
ALTER TABLE `tags`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21;
--
-- AUTO_INCREMENT de tabela `usuarios`
--
ALTER TABLE `usuarios`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=32;
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 */;