· 8 years ago · May 29, 2018, 07:52 PM
1
2DROP DATABASE `ISDB2018`
3
4CREATE DATABASE IF NOT EXISTS `ISDB2018` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
5USE `ISDB2018`;
6
7-- --------------------------------------------------------
8
9--
10-- Table structure for table `biudzeto_irasai`
11--
12
13CREATE TABLE `biudzeto_irasai` (
14 `id` int(11) NOT NULL,
15 `data` date NOT NULL,
16 `suma` double NOT NULL
17) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
18
19--
20-- Dumping data for table `biudzeto_irasai`
21--
22
23INSERT INTO `biudzeto_irasai` (`id`, `data`, `suma`) VALUES
24(1, '2018-05-29', 420);
25
26-- --------------------------------------------------------
27
28--
29-- Table structure for table `darbuotojai`
30--
31
32CREATE TABLE `darbuotojai` (
33 `id` int(11) NOT NULL,
34 `vardas` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL,
35 `pavarde` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL,
36 `email` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL,
37 `alga` double NOT NULL
38) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
39
40--
41-- Dumping data for table `darbuotojai`
42--
43
44INSERT INTO `darbuotojai` (`id`, `vardas`, `pavarde`, `email`, `alga`) VALUES
45(1, 'Petras', 'Jonaitis', '1317@one.lt', 420);
46
47-- --------------------------------------------------------
48
49--
50-- Table structure for table `islaidos`
51--
52
53CREATE TABLE `islaidos` (
54 `data` date NOT NULL,
55 `suma` double NOT NULL,
56 `algos` double NOT NULL,
57 `kitos_islaidos` double NOT NULL
58) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
59
60--
61-- Dumping data for table `islaidos`
62--
63
64INSERT INTO `islaidos` (`data`, `suma`, `algos`, `kitos_islaidos`) VALUES
65('2018-05-29', 420, 220, 200);
66
67-- --------------------------------------------------------
68
69--
70-- Table structure for table `naudotojai`
71--
72
73CREATE TABLE `naudotojai` (
74 `id` int(11) NOT NULL,
75 `username` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL,
76 `password` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL,
77 `email` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL,
78 `telnr` int(30) NOT NULL
79) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
80
81--
82-- Dumping data for table `naudotojai`
83--
84
85INSERT INTO `naudotojai` (`id`, `username`, `password`, `email`, `telnr`) VALUES
86(1, 'buhalteris', 'VUKHF2018', 'buhalteris@kilobaitas.lt', 860001123);
87
88-- --------------------------------------------------------
89
90--
91-- Table structure for table `pajamos`
92--
93
94CREATE TABLE `pajamos` (
95 `data` date NOT NULL,
96 `suma` double NOT NULL,
97 `mokesciai` double NOT NULL,
98 `gryna_suma` double NOT NULL
99) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
100
101--
102-- Dumping data for table `pajamos`
103--
104
105INSERT INTO `pajamos` (`data`, `suma`, `mokesciai`, `gryna_suma`) VALUES
106('2018-05-29', 420, 84, 336);
107
108-- --------------------------------------------------------
109
110--
111-- Table structure for table `produktai`
112--
113
114CREATE TABLE `produktai` (
115 `id` int(11) NOT NULL,
116 `kiekis` int(11) NOT NULL,
117 `pirkimo_kaina` double NOT NULL,
118 `pardavimo_kaina` double NOT NULL,
119 `pelnas` double NOT NULL
120) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
121
122--
123-- Dumping data for table `produktai`
124--
125
126INSERT INTO `produktai` (`id`, `kiekis`, `pirkimo_kaina`, `pardavimo_kaina`, `pelnas`) VALUES
127(1, 60, 1, 4, 60),
128(2, 420, 7, 12, 4.2);
129
130-- --------------------------------------------------------
131
132--
133-- Table structure for table `uzsakymai`
134--
135
136CREATE TABLE `uzsakymai` (
137 `id` int(11) NOT NULL,
138 `data` date NOT NULL,
139 `uzsakovas` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL,
140 `produktuID` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL,
141 `produktuKiekis` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL,
142 `uzsakymoKaina` double NOT NULL,
143 `atliktas` tinyint(11) NOT NULL
144) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
145
146--
147-- Dumping data for table `uzsakymai`
148--
149
150INSERT INTO `uzsakymai` (`id`, `data`, `uzsakovas`, `produktuID`, `produktuKiekis`, `uzsakymoKaina`, `atliktas`) VALUES
151(1, '2018-04-20', 'Petras Jonaitis', '1', '20', 80, 1),
152(2, '2018-04-20', 'Petras Jonaitis', '2', '20', 60, 0);
153
154--
155-- Indexes for dumped tables
156--
157
158--
159-- Indexes for table `biudzeto_irasai`
160--
161ALTER TABLE `biudzeto_irasai`
162 ADD PRIMARY KEY (`id`);
163
164--
165-- Indexes for table `darbuotojai`
166--
167ALTER TABLE `darbuotojai`
168 ADD PRIMARY KEY (`id`);
169
170--
171-- Indexes for table `islaidos`
172--
173ALTER TABLE `islaidos`
174 ADD PRIMARY KEY (`data`);
175
176--
177-- Indexes for table `naudotojai`
178--
179ALTER TABLE `naudotojai`
180 ADD PRIMARY KEY (`id`);
181
182--
183-- Indexes for table `pajamos`
184--
185ALTER TABLE `pajamos`
186 ADD PRIMARY KEY (`data`);
187
188--
189-- Indexes for table `produktai`
190--
191ALTER TABLE `produktai`
192 ADD PRIMARY KEY (`id`);
193
194--
195-- Indexes for table `uzsakymai`
196--
197ALTER TABLE `uzsakymai`
198 ADD PRIMARY KEY (`id`);
199
200--
201-- AUTO_INCREMENT for dumped tables
202--
203
204--
205-- AUTO_INCREMENT for table `darbuotojai`
206--
207ALTER TABLE `darbuotojai`
208 MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
209
210--
211-- AUTO_INCREMENT for table `naudotojai`
212--
213ALTER TABLE `naudotojai`
214 MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
215
216--
217-- AUTO_INCREMENT for table `produktai`
218--
219ALTER TABLE `produktai`
220 MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
221
222--
223-- AUTO_INCREMENT for table `uzsakymai`
224--
225ALTER TABLE `uzsakymai`
226 MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
227COMMIT;
228
229/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
230/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
231/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;