forked from AzisBasyari/Pathalum-SMKN4BDG
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pathalum.sql
283 lines (230 loc) · 7.91 KB
/
pathalum.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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
-- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 21, 2022 at 05:07 AM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.11
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: `pathalum`
--
-- --------------------------------------------------------
--
-- Table structure for table `alumni`
--
CREATE TABLE `alumni` (
`id_alumni` int(15) NOT NULL,
`id_users` int(15) NOT NULL,
`nama_lengkap` varchar(100) DEFAULT NULL,
`jenis_kelamin` enum('Laki-laki','Perempuan') DEFAULT NULL,
`alamat` varchar(100) DEFAULT NULL,
`tempat_lahir` varchar(100) DEFAULT NULL,
`tanggal_lahir` date DEFAULT NULL,
`no_telepon` varchar(15) DEFAULT NULL,
`jurusan` varchar(100) DEFAULT NULL,
`tahun_masuk` varchar(10) DEFAULT NULL,
`tahun_lulus` varchar(10) DEFAULT NULL,
`no_ijazah` varchar(50) DEFAULT NULL,
`no_skhun` varchar(50) DEFAULT NULL,
`status` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `alumni`
--
INSERT INTO `alumni` (`id_alumni`, `id_users`, `nama_lengkap`, `jenis_kelamin`, `alamat`, `tempat_lahir`, `tanggal_lahir`, `no_telepon`, `jurusan`, `tahun_masuk`, `tahun_lulus`, `no_ijazah`, `no_skhun`, `status`) VALUES
(2, 2, 'Alumni', 'Laki-laki', 'PH Pride', 'Bandung', '2004-10-22', '08989898989', 'Rekayasa Perangkat Lunak', '2019', '2022', '0000000000', '0000000000', 'Bekerja'),
(7, 7, 'Abdul Azis Basyari', 'Laki-laki', 'Bandung', 'Bandung', '2004-10-22', '083804302067', 'Rekayasa Perangkat Lunak', '2019', '2022', '-', '-', 'Tidak Bekerja Ataupun Kuliah');
-- --------------------------------------------------------
--
-- Table structure for table `deskripsi_kuliah`
--
CREATE TABLE `deskripsi_kuliah` (
`id_kuliah` int(15) NOT NULL,
`id_alumni` int(15) NOT NULL,
`nama_perguruan_tinggi` varchar(100) DEFAULT NULL,
`alamat_perguruan_tinggi` varchar(100) DEFAULT NULL,
`fakultas` varchar(100) DEFAULT NULL,
`jurusan` varchar(100) DEFAULT NULL,
`semester` varchar(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `deskripsi_kuliah`
--
INSERT INTO `deskripsi_kuliah` (`id_kuliah`, `id_alumni`, `nama_perguruan_tinggi`, `alamat_perguruan_tinggi`, `fakultas`, `jurusan`, `semester`) VALUES
(2, 2, NULL, NULL, NULL, NULL, NULL),
(4, 7, NULL, NULL, NULL, NULL, NULL);
-- --------------------------------------------------------
--
-- Table structure for table `deskripsi_pekerjaan`
--
CREATE TABLE `deskripsi_pekerjaan` (
`id_pekerjaan` int(15) NOT NULL,
`id_alumni` int(15) NOT NULL,
`nama_perusahaan` varchar(100) DEFAULT NULL,
`alamat_perusahaan` varchar(100) DEFAULT NULL,
`posisi` varchar(100) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `deskripsi_pekerjaan`
--
INSERT INTO `deskripsi_pekerjaan` (`id_pekerjaan`, `id_alumni`, `nama_perusahaan`, `alamat_perusahaan`, `posisi`) VALUES
(2, 2, 'Casadev', 'Kliningan 6', 'Nganggur'),
(6, 7, NULL, NULL, NULL);
-- --------------------------------------------------------
--
-- Table structure for table `deskripsi_wirausaha`
--
CREATE TABLE `deskripsi_wirausaha` (
`id_wirausaha` int(15) NOT NULL,
`id_alumni` int(15) NOT NULL,
`nama_usaha` varchar(100) DEFAULT NULL,
`alamat_usaha` varchar(100) DEFAULT NULL,
`jenis_produk` varchar(100) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `deskripsi_wirausaha`
--
INSERT INTO `deskripsi_wirausaha` (`id_wirausaha`, `id_alumni`, `nama_usaha`, `alamat_usaha`, `jenis_produk`) VALUES
(2, 2, NULL, NULL, NULL),
(4, 7, NULL, NULL, NULL);
-- --------------------------------------------------------
--
-- Table structure for table `postingan`
--
CREATE TABLE `postingan` (
`id_postingan` int(15) NOT NULL,
`judul_postingan` varchar(100) NOT NULL,
`deskripsi` varchar(100) NOT NULL,
`id_users` int(15) NOT NULL,
`tanggal_dibuat` date NOT NULL,
`photo` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`id_user` int(15) NOT NULL,
`email` varchar(50) NOT NULL,
`username` varchar(50) NOT NULL,
`password` varchar(100) NOT NULL,
`level` varchar(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`id_user`, `email`, `username`, `password`, `level`) VALUES
(1, 'admin', 'admin', 'd033e22ae348aeb5660fc2140aec35850c4da997', 'admin'),
(2, 'alumni@alumni', 'alumni', 'c52c830f927fe3c895a5499defa8b6a078d701b7', 'alumni'),
(7, 'abdul', 'abdul', '3fb86591025780f719fcd21d6fd06a8330659670', 'alumni');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `alumni`
--
ALTER TABLE `alumni`
ADD PRIMARY KEY (`id_alumni`),
ADD KEY `id_users` (`id_users`);
--
-- Indexes for table `deskripsi_kuliah`
--
ALTER TABLE `deskripsi_kuliah`
ADD PRIMARY KEY (`id_kuliah`),
ADD KEY `id_alumni` (`id_alumni`);
--
-- Indexes for table `deskripsi_pekerjaan`
--
ALTER TABLE `deskripsi_pekerjaan`
ADD PRIMARY KEY (`id_pekerjaan`),
ADD KEY `id_alumni` (`id_alumni`);
--
-- Indexes for table `deskripsi_wirausaha`
--
ALTER TABLE `deskripsi_wirausaha`
ADD PRIMARY KEY (`id_wirausaha`),
ADD KEY `id_alumni` (`id_alumni`);
--
-- Indexes for table `postingan`
--
ALTER TABLE `postingan`
ADD PRIMARY KEY (`id_postingan`),
ADD KEY `id_users` (`id_users`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id_user`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `alumni`
--
ALTER TABLE `alumni`
MODIFY `id_alumni` int(15) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
--
-- AUTO_INCREMENT for table `deskripsi_kuliah`
--
ALTER TABLE `deskripsi_kuliah`
MODIFY `id_kuliah` int(15) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
--
-- AUTO_INCREMENT for table `deskripsi_pekerjaan`
--
ALTER TABLE `deskripsi_pekerjaan`
MODIFY `id_pekerjaan` int(15) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;
--
-- AUTO_INCREMENT for table `deskripsi_wirausaha`
--
ALTER TABLE `deskripsi_wirausaha`
MODIFY `id_wirausaha` int(15) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
--
-- AUTO_INCREMENT for table `postingan`
--
ALTER TABLE `postingan`
MODIFY `id_postingan` int(15) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id_user` int(15) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `alumni`
--
ALTER TABLE `alumni`
ADD CONSTRAINT `alumni_ibfk_1` FOREIGN KEY (`id_users`) REFERENCES `users` (`id_user`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `deskripsi_kuliah`
--
ALTER TABLE `deskripsi_kuliah`
ADD CONSTRAINT `deskripsi_kuliah_ibfk_1` FOREIGN KEY (`id_alumni`) REFERENCES `alumni` (`id_alumni`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `deskripsi_pekerjaan`
--
ALTER TABLE `deskripsi_pekerjaan`
ADD CONSTRAINT `deskripsi_pekerjaan_ibfk_1` FOREIGN KEY (`id_alumni`) REFERENCES `alumni` (`id_alumni`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `deskripsi_wirausaha`
--
ALTER TABLE `deskripsi_wirausaha`
ADD CONSTRAINT `deskripsi_wirausaha_ibfk_1` FOREIGN KEY (`id_alumni`) REFERENCES `alumni` (`id_alumni`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `postingan`
--
ALTER TABLE `postingan`
ADD CONSTRAINT `postingan_ibfk_1` FOREIGN KEY (`id_users`) REFERENCES `users` (`id_user`) 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 */;