-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdbcat3.0.sql
executable file
·1818 lines (1534 loc) · 55.4 KB
/
dbcat3.0.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
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.5.9
-- Dumped by pg_dump version 9.5.9
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET row_security = off;
--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:
--
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
--
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner:
--
COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
SET search_path = public, pg_catalog;
SET default_tablespace = '';
SET default_with_oids = false;
--
-- Name: peserta_ujian; Type: TABLE; Schema: public; Owner: mandan
--
CREATE TABLE peserta_ujian (
id_ujian character varying(40),
nobp character varying(15),
nm_mahasiswa character varying(100),
id_kelas integer,
nm_kelas character varying(10),
nilai integer,
status_ujian_peserta integer,
nm_status_ujian_peserta text
);
ALTER TABLE peserta_ujian OWNER TO mandan;
--
-- Name: gethasilujian(character varying); Type: FUNCTION; Schema: public; Owner: mandan
--
CREATE FUNCTION gethasilujian(v_id_ujian character varying) RETURNS SETOF peserta_ujian
LANGUAGE plpgsql
AS $$
BEGIN
RETURN QUERY select a.id_ujian,a.nobp,
a.nm_mahasiswa,
cast(a.id_kelas as integer),
a.nm_kelas,
cast((case when (b.nilai IS NULL) then 0 ELSE b.nilai END) as integer) as nilai,
cast((case when (b.nilai IS NULL) then
(CASE WHEN c.jawaban IS NULL THEN 3 ELSE 4 END)
ELSE 5 END) as integer) as status_ujian_peserta,
case when (b.nilai IS NULL) then
(CASE WHEN c.jawaban IS NULL THEN 'Belum Ujian' ELSE 'Periksa Jawaban' END)
ELSE 'Sudah Ujian' END as nm_status_ujian_peserta
from lap_peserta_ujian a
left join (select * from tbhasil_ujian aa where aa.id_ujian=v_id_ujian) b on a.nobp=b.nobp
left join (select aaa.id_ujian,aaa.nobp,aaa.jawaban from tbjawaban aaa where aaa.id_ujian = v_id_ujian) c on a.nobp=c.nobp
where a.id_ujian=v_id_ujian order by a.nm_kelas desc,a.nm_mahasiswa asc;
END; $$;
ALTER FUNCTION public.gethasilujian(v_id_ujian character varying) OWNER TO mandan;
--
-- Name: tbnama_kelas_id_kelas_seq; Type: SEQUENCE; Schema: public; Owner: mandan
--
CREATE SEQUENCE tbnama_kelas_id_kelas_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE tbnama_kelas_id_kelas_seq OWNER TO mandan;
--
-- Name: tbkelas; Type: TABLE; Schema: public; Owner: mandan
--
CREATE TABLE tbkelas (
id_kelas integer DEFAULT nextval('tbnama_kelas_id_kelas_seq'::regclass) NOT NULL,
nm_kelas character varying(10) NOT NULL
);
ALTER TABLE tbkelas OWNER TO mandan;
--
-- Name: tbkelas_ujian_id_kujian_seq; Type: SEQUENCE; Schema: public; Owner: mandan
--
CREATE SEQUENCE tbkelas_ujian_id_kujian_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE tbkelas_ujian_id_kujian_seq OWNER TO mandan;
--
-- Name: tbkelas_kuliah; Type: TABLE; Schema: public; Owner: mandan
--
CREATE TABLE tbkelas_kuliah (
id_kkuliah integer DEFAULT nextval('tbkelas_ujian_id_kujian_seq'::regclass) NOT NULL,
id_kuliah character varying(60) NOT NULL,
id_kelas integer NOT NULL
);
ALTER TABLE tbkelas_kuliah OWNER TO mandan;
--
-- Name: lap_kelas_kuliah; Type: VIEW; Schema: public; Owner: mandan
--
CREATE VIEW lap_kelas_kuliah AS
SELECT a.id_kkuliah,
a.id_kelas,
a.id_kuliah,
b.nm_kelas
FROM (tbkelas_kuliah a
JOIN tbkelas b ON ((a.id_kelas = b.id_kelas)));
ALTER TABLE lap_kelas_kuliah OWNER TO mandan;
--
-- Name: tbdosen_id_dosen_seq; Type: SEQUENCE; Schema: public; Owner: mandan
--
CREATE SEQUENCE tbdosen_id_dosen_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE tbdosen_id_dosen_seq OWNER TO mandan;
--
-- Name: tbdosen; Type: TABLE; Schema: public; Owner: mandan
--
CREATE TABLE tbdosen (
id_dosen integer DEFAULT nextval('tbdosen_id_dosen_seq'::regclass) NOT NULL,
nm_dosen character varying(100) NOT NULL,
nidn character varying(15) NOT NULL,
status_dosen smallint DEFAULT 1 NOT NULL
);
ALTER TABLE tbdosen OWNER TO mandan;
--
-- Name: tbkuliah; Type: TABLE; Schema: public; Owner: mandan
--
CREATE TABLE tbkuliah (
id_kuliah character varying(40) NOT NULL,
nidn character varying(11) NOT NULL,
kd_matkul character varying(15) NOT NULL,
tahun_akademik character varying(5) NOT NULL
);
ALTER TABLE tbkuliah OWNER TO mandan;
--
-- Name: tbmatkul_id_matkul_seq1; Type: SEQUENCE; Schema: public; Owner: mandan
--
CREATE SEQUENCE tbmatkul_id_matkul_seq1
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE tbmatkul_id_matkul_seq1 OWNER TO mandan;
--
-- Name: tbmatkul; Type: TABLE; Schema: public; Owner: mandan
--
CREATE TABLE tbmatkul (
id_matkul integer DEFAULT nextval('tbmatkul_id_matkul_seq1'::regclass) NOT NULL,
kd_matkul character varying(15) NOT NULL,
nm_matkul character varying(100) NOT NULL,
sks smallint NOT NULL,
smt smallint NOT NULL,
status_matkul smallint DEFAULT 1 NOT NULL
);
ALTER TABLE tbmatkul OWNER TO mandan;
--
-- Name: lap_kuliah; Type: VIEW; Schema: public; Owner: mandan
--
CREATE VIEW lap_kuliah AS
SELECT a.id_kuliah,
a.kd_matkul,
b.nm_matkul,
a.nidn,
c.nm_dosen,
( SELECT array_to_json(array_agg(d.id_kelas)) AS kelas
FROM (tbkelas_kuliah d
JOIN tbkelas e ON ((e.id_kelas = d.id_kelas)))
WHERE ((d.id_kuliah)::text = (a.id_kuliah)::text)) AS id_kelas,
( SELECT array_to_json(array_agg(e.nm_kelas)) AS kelas
FROM (tbkelas_kuliah d
JOIN tbkelas e ON ((d.id_kelas = e.id_kelas)))
WHERE ((d.id_kuliah)::text = (a.id_kuliah)::text)) AS nm_kelas,
a.tahun_akademik
FROM ((tbkuliah a
JOIN tbmatkul b ON (((a.kd_matkul)::text = (b.kd_matkul)::text)))
JOIN tbdosen c ON (((a.nidn)::text = (c.nidn)::text)));
ALTER TABLE lap_kuliah OWNER TO mandan;
--
-- Name: tbmahasiswa_id_mahasiswa_seq; Type: SEQUENCE; Schema: public; Owner: mandan
--
CREATE SEQUENCE tbmahasiswa_id_mahasiswa_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE tbmahasiswa_id_mahasiswa_seq OWNER TO mandan;
--
-- Name: tbmahasiswa; Type: TABLE; Schema: public; Owner: mandan
--
CREATE TABLE tbmahasiswa (
id_mahasiswa integer DEFAULT nextval('tbmahasiswa_id_mahasiswa_seq'::regclass) NOT NULL,
nm_mahasiswa character varying(100) NOT NULL,
nobp character varying(15) NOT NULL,
status_mahasiswa smallint DEFAULT 1 NOT NULL
);
ALTER TABLE tbmahasiswa OWNER TO mandan;
--
-- Name: tbpeserta_kuliah; Type: TABLE; Schema: public; Owner: mandan
--
CREATE TABLE tbpeserta_kuliah (
id_peserta character varying(60) NOT NULL,
nobp character varying(15) NOT NULL,
id_kuliah character varying(40) NOT NULL,
status_peserta smallint DEFAULT 1 NOT NULL,
status_kelas_peserta smallint DEFAULT '3'::smallint NOT NULL,
id_kelas integer DEFAULT 0 NOT NULL
);
ALTER TABLE tbpeserta_kuliah OWNER TO mandan;
--
-- Name: tbstatus_status_seq; Type: SEQUENCE; Schema: public; Owner: mandan
--
CREATE SEQUENCE tbstatus_status_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE tbstatus_status_seq OWNER TO mandan;
--
-- Name: tbstatus; Type: TABLE; Schema: public; Owner: mandan
--
CREATE TABLE tbstatus (
status integer DEFAULT nextval('tbstatus_status_seq'::regclass) NOT NULL,
nm_status character varying(20) NOT NULL
);
ALTER TABLE tbstatus OWNER TO mandan;
--
-- Name: lap_peserta_kuliah; Type: VIEW; Schema: public; Owner: mandan
--
CREATE VIEW lap_peserta_kuliah AS
SELECT a.id_peserta,
b.id_kuliah,
b.kd_matkul,
b.nm_matkul,
b.nidn,
b.nm_dosen,
b.tahun_akademik,
a.nobp,
c.nm_mahasiswa,
a.status_peserta,
d.nm_status AS nm_status_peserta,
a.status_kelas_peserta,
e.nm_status AS nm_status_kelas_peserta,
a.id_kelas,
f.nm_kelas
FROM (((((tbpeserta_kuliah a
LEFT JOIN lap_kuliah b ON (((a.id_kuliah)::text = (b.id_kuliah)::text)))
JOIN tbmahasiswa c ON (((a.nobp)::text = (c.nobp)::text)))
JOIN tbstatus d ON ((a.status_peserta = d.status)))
JOIN tbstatus e ON ((a.status_kelas_peserta = e.status)))
JOIN tbkelas f ON ((a.id_kelas = f.id_kelas)));
ALTER TABLE lap_peserta_kuliah OWNER TO mandan;
--
-- Name: tbjenis_soal_id_jsoal_seq; Type: SEQUENCE; Schema: public; Owner: mandan
--
CREATE SEQUENCE tbjenis_soal_id_jsoal_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE tbjenis_soal_id_jsoal_seq OWNER TO mandan;
--
-- Name: tbjenis_soal; Type: TABLE; Schema: public; Owner: mandan
--
CREATE TABLE tbjenis_soal (
id_jsoal integer DEFAULT nextval('tbjenis_soal_id_jsoal_seq'::regclass) NOT NULL,
nm_jsoal character varying(20) NOT NULL
);
ALTER TABLE tbjenis_soal OWNER TO mandan;
--
-- Name: tbjenis_ujian_id_jujian_seq; Type: SEQUENCE; Schema: public; Owner: mandan
--
CREATE SEQUENCE tbjenis_ujian_id_jujian_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE tbjenis_ujian_id_jujian_seq OWNER TO mandan;
--
-- Name: tbjenis_ujian; Type: TABLE; Schema: public; Owner: mandan
--
CREATE TABLE tbjenis_ujian (
id_jujian integer DEFAULT nextval('tbjenis_ujian_id_jujian_seq'::regclass) NOT NULL,
nm_jujian character varying(10) NOT NULL
);
ALTER TABLE tbjenis_ujian OWNER TO mandan;
--
-- Name: tbujian; Type: TABLE; Schema: public; Owner: mandan
--
CREATE TABLE tbujian (
id_ujian character varying(40) NOT NULL,
hari date NOT NULL,
mulai time without time zone NOT NULL,
selesai time without time zone NOT NULL,
deskripsi character varying(100) NOT NULL,
status_ujian smallint DEFAULT 0 NOT NULL,
id_jujian smallint NOT NULL,
id_jsoal smallint NOT NULL,
id_kuliah character varying(40) NOT NULL
);
ALTER TABLE tbujian OWNER TO mandan;
--
-- Name: lap_ujian; Type: VIEW; Schema: public; Owner: mandan
--
CREATE VIEW lap_ujian AS
SELECT a.id_ujian,
a.hari,
a.mulai,
a.selesai,
a.deskripsi,
a.status_ujian,
c.nm_status AS nm_status_ujian,
a.id_jsoal,
d.nm_jsoal,
a.id_jujian,
e.nm_jujian,
b.id_kuliah,
b.kd_matkul,
b.nm_matkul,
b.nidn,
b.nm_dosen,
b.id_kelas,
b.nm_kelas,
b.tahun_akademik
FROM ((((tbujian a
JOIN lap_kuliah b ON (((a.id_kuliah)::text = (b.id_kuliah)::text)))
JOIN tbstatus c ON ((a.status_ujian = c.status)))
JOIN tbjenis_soal d ON ((a.id_jsoal = d.id_jsoal)))
JOIN tbjenis_ujian e ON ((a.id_jujian = e.id_jujian)));
ALTER TABLE lap_ujian OWNER TO mandan;
--
-- Name: lap_peserta_ujian; Type: VIEW; Schema: public; Owner: mandan
--
CREATE VIEW lap_peserta_ujian AS
SELECT a.id_ujian,
a.hari,
a.mulai,
a.selesai,
a.deskripsi,
a.status_ujian,
a.nm_status_ujian,
a.id_jsoal,
a.nm_jsoal,
a.id_jujian,
a.nm_jujian,
a.kd_matkul,
a.nm_matkul,
a.nidn,
a.nm_dosen,
b.id_kuliah,
b.nobp,
b.nm_mahasiswa,
b.id_kelas,
b.nm_kelas,
concat(a.nm_matkul, '-', a.nm_jujian) AS nm_ujian
FROM (lap_ujian a
JOIN ( SELECT aa.id_kuliah,
aa.nobp,
bb.nm_mahasiswa,
aa.id_kelas,
cc.nm_kelas
FROM ((tbpeserta_kuliah aa
JOIN tbmahasiswa bb ON (((aa.nobp)::text = (bb.nobp)::text)))
JOIN tbkelas cc ON ((aa.id_kelas = cc.id_kelas)))) b ON (((a.id_kuliah)::text = (b.id_kuliah)::text)))
WHERE (a.status_ujian = 1);
ALTER TABLE lap_peserta_ujian OWNER TO mandan;
--
-- Name: tbsoal_id_soal_seq; Type: SEQUENCE; Schema: public; Owner: mandan
--
CREATE SEQUENCE tbsoal_id_soal_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE tbsoal_id_soal_seq OWNER TO mandan;
--
-- Name: tbsoal; Type: TABLE; Schema: public; Owner: mandan
--
CREATE TABLE tbsoal (
id_soal integer DEFAULT nextval('tbsoal_id_soal_seq'::regclass) NOT NULL,
isi_soal text NOT NULL,
"pilihanGanda" json,
id_jsoal smallint NOT NULL,
bobot smallint DEFAULT 1 NOT NULL,
jawaban text NOT NULL
);
ALTER TABLE tbsoal OWNER TO mandan;
--
-- Name: lap_soal; Type: VIEW; Schema: public; Owner: mandan
--
CREATE VIEW lap_soal AS
SELECT tbsoal.id_soal,
tbsoal.isi_soal,
tbsoal."pilihanGanda",
tbsoal.id_jsoal,
tbsoal.bobot,
tbsoal.jawaban,
tbjenis_soal.nm_jsoal
FROM (tbsoal
JOIN tbjenis_soal ON ((tbsoal.id_jsoal = tbjenis_soal.id_jsoal)));
ALTER TABLE lap_soal OWNER TO mandan;
--
-- Name: tbsoal_ujian_id_sujian_seq1; Type: SEQUENCE; Schema: public; Owner: mandan
--
CREATE SEQUENCE tbsoal_ujian_id_sujian_seq1
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE tbsoal_ujian_id_sujian_seq1 OWNER TO mandan;
--
-- Name: tbsoal_ujian; Type: TABLE; Schema: public; Owner: mandan
--
CREATE TABLE tbsoal_ujian (
id_sujian integer DEFAULT nextval('tbsoal_ujian_id_sujian_seq1'::regclass) NOT NULL,
id_ujian character varying(40) NOT NULL,
id_soal integer NOT NULL
);
ALTER TABLE tbsoal_ujian OWNER TO mandan;
--
-- Name: lap_soal_ujian; Type: VIEW; Schema: public; Owner: mandan
--
CREATE VIEW lap_soal_ujian AS
SELECT tbsoal_ujian.id_ujian,
tbsoal.id_soal,
tbsoal.isi_soal,
tbsoal."pilihanGanda",
tbsoal.id_jsoal,
tbsoal.bobot,
tbsoal.jawaban
FROM (tbsoal_ujian
JOIN tbsoal ON ((tbsoal_ujian.id_soal = tbsoal.id_soal)));
ALTER TABLE lap_soal_ujian OWNER TO mandan;
--
-- Name: tbjenis_user_id_juser_seq; Type: SEQUENCE; Schema: public; Owner: mandan
--
CREATE SEQUENCE tbjenis_user_id_juser_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE tbjenis_user_id_juser_seq OWNER TO mandan;
--
-- Name: tbjenis_user; Type: TABLE; Schema: public; Owner: mandan
--
CREATE TABLE tbjenis_user (
id_juser integer DEFAULT nextval('tbjenis_user_id_juser_seq'::regclass) NOT NULL,
nm_juser character varying(20) NOT NULL
);
ALTER TABLE tbjenis_user OWNER TO mandan;
--
-- Name: tbuser_id_user_seq; Type: SEQUENCE; Schema: public; Owner: mandan
--
CREATE SEQUENCE tbuser_id_user_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE tbuser_id_user_seq OWNER TO mandan;
--
-- Name: tbuser; Type: TABLE; Schema: public; Owner: mandan
--
CREATE TABLE tbuser (
id_user integer DEFAULT nextval('tbuser_id_user_seq'::regclass) NOT NULL,
username character varying(30) NOT NULL,
password text NOT NULL,
id_juser smallint NOT NULL,
status_user smallint DEFAULT 1 NOT NULL
);
ALTER TABLE tbuser OWNER TO mandan;
--
-- Name: lap_user; Type: VIEW; Schema: public; Owner: mandan
--
CREATE VIEW lap_user AS
SELECT tbuser.id_user,
tbuser.username,
tbuser.password,
tbuser.id_juser,
tbjenis_user.nm_juser
FROM (tbuser
JOIN tbjenis_user ON ((tbuser.id_juser = tbjenis_user.id_juser)));
ALTER TABLE lap_user OWNER TO mandan;
--
-- Name: tbhasil_ujian_id_hasil_seq; Type: SEQUENCE; Schema: public; Owner: mandan
--
CREATE SEQUENCE tbhasil_ujian_id_hasil_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE tbhasil_ujian_id_hasil_seq OWNER TO mandan;
--
-- Name: tbhasil_ujian; Type: TABLE; Schema: public; Owner: mandan
--
CREATE TABLE tbhasil_ujian (
id_hasil integer DEFAULT nextval('tbhasil_ujian_id_hasil_seq'::regclass) NOT NULL,
id_ujian character varying(40) NOT NULL,
nobp character varying(15) NOT NULL,
nilai smallint NOT NULL
);
ALTER TABLE tbhasil_ujian OWNER TO mandan;
--
-- Name: tbjawaban_id_jawaban_seq; Type: SEQUENCE; Schema: public; Owner: mandan
--
CREATE SEQUENCE tbjawaban_id_jawaban_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE tbjawaban_id_jawaban_seq OWNER TO mandan;
--
-- Name: tbjawaban; Type: TABLE; Schema: public; Owner: mandan
--
CREATE TABLE tbjawaban (
id_jawaban integer DEFAULT nextval('tbjawaban_id_jawaban_seq'::regclass) NOT NULL,
id_ujian character varying(60) NOT NULL,
nobp character varying(15) NOT NULL,
jawaban text NOT NULL,
id_soal integer NOT NULL
);
ALTER TABLE tbjawaban OWNER TO mandan;
--
-- Name: tbpengaturan; Type: TABLE; Schema: public; Owner: mandan
--
CREATE TABLE tbpengaturan (
pengaturan json
);
ALTER TABLE tbpengaturan OWNER TO mandan;
--
-- Data for Name: peserta_ujian; Type: TABLE DATA; Schema: public; Owner: mandan
--
COPY peserta_ujian (id_ujian, nobp, nm_mahasiswa, id_kelas, nm_kelas, nilai, status_ujian_peserta, nm_status_ujian_peserta) FROM stdin;
\.
--
-- Data for Name: tbdosen; Type: TABLE DATA; Schema: public; Owner: mandan
--
COPY tbdosen (id_dosen, nm_dosen, nidn, status_dosen) FROM stdin;
1 ANITA ADE RAHMA 1012019001 1
2 ARFIS 1009026602 1
3 AZIZUL HAKIM 1023116001 1
4 BUCHYARDI GOND 1025125401 1
5 DESFRIANA SARI 1028128901 1
6 DESI PERMATA SARI 1013128902 1
7 DESSY HARYANI 1029128101 1
8 DEVI EDRIANI 1027088001 1
9 DIAN MISRAWATI 1021118602 1
10 ELFA FITRIANI 1024089001 1
11 ELFISWANDI 1019046601 1
12 ELIZA 1016098104 1
13 FATMA ARIANI 1020059001 1
14 FITRI YENI 1012028201 1
15 HANNA PRATIWI 1022018601 1
16 HARMELIA 1001059002 1
17 HASMAYNELIS FITRI 1031057501 1
18 INDAH VIOZANI 1025069101 1
19 INDRA FAISAL 1025058801 1
20 LUSIANA 1015107601 1
21 MONDRA NELDI 1025027501 1
22 NITA SOFIA 1023098902 1
23 PRIMAROSI 1012018201 1
24 RIKA WAHYUNI 1007068502 1
25 RIRI PUTRI DIKA 1014048602 1
26 RONNI ANDRI WIJAYA 1011038501 1
27 SALMIDESTIAWAN 1030128501 1
28 SIGIT SANJAYA 1021078901 1
29 SONI 1027087801 1
30 TET LINDA YANI 1026128201 1
31 WELLIA NOVITA 1012118901 1
32 YAMASITHA 1004119001 1
33 YOSI YULIA 1017047602 1
34 YULIA SYAFITRI 1016078301 1
35 CENNYWATI 1024128201 1
36 DEFRIZAL SAPUTRA 1023128702 1
37 HARIS SATRIA 1009038901 1
38 IRNI RESMI APRIYANTI 1016048403 1
39 IRPAN SARIPUDIN 1015077903 1
40 MARIA MARGARETHA EARLENE 1025038701 1
41 RACHMAWATY 1019028401 1
42 TEGUH MEIRIZKY GIRDAYANTO 1001058204 1
43 YULIARMAN MAHMUDDIN 1016077202 1
44 ANDI B. WIRANATA 1025038501 1
45 ANDRE ILYAS 1009038301 1
46 ARIE YUSNELLY 1017068801 1
47 DARMA SYAHRULLAH EKA JAYA 1007098201 1
48 DASRIAL 1024086203 1
49 DASRIL MUNIR 1027125401 1
50 DICE DASRIL 1019038102 1
51 DIMAS PERDANA OSKAR 1012078502 1
52 ELVA SUSANTI 1012038303 1
53 EMILE SALIM 1010079101 1
54 ENGLA DESNIM SILVIA 1009128604 1
55 FITRAH SARI 1022118504 1
56 HADI IRFANI 1014018204 1
57 HERYATMAN 1022036901 1
58 HILDA MARY 1027088203 1
59 INDRIYENNI 1025056601 1
60 JON MAIZAR 1007018004 1
61 M. FADLI 1030098902 1
62 MARTA WIDIAN SARI 1020039001 1
63 MASRIFAH 303116303 1
64 MASRIZAL 1006088103 1
65 MAWARDI 1006095901 1
66 MERI MERIA SARI 1013029101 1
67 MEUTHI AN-NISA NOVIZAR 1017078906 1
68 MIRSAL 1004079001 1
69 NALIM 1001066001 1
70 NARDIMAN 1001018305 1
71 NILA PRATIWI 1001128601 1
72 R A APULIJAH ABUTOJO 324123401 1
73 RAMDANI BAYU PUTRA 1002117201 1
74 RANGGA WENDRA PRINOYA 1017128702 1
75 RINI AFRIANI 1008048803 1
76 RIO ANDHIKA PUTRA 1029038701 1
77 ROBBY DHARMA 1009038404 1
78 ROBERTA JULFA 1015108903 1
79 SASNELWATI 1024017001 1
80 SILVIA JESIKA 1027018901 1
81 SRI MONALISA 1029128503 1
82 SRI MULYATI 1004107101 1
83 SUHERMIZON 1005076403 1
84 SYAHNAN SIMATUPANG 1017066402 1
85 TIFANI RATU FIRDAUS 1013128901 1
86 TITIK EFNITA 1012039001 1
87 VICKY BRAHMA KUMBARA 1006108801 1
88 VIVI NILA SARI 1030118604 1
89 WINDA AFRIYENIS 1019048803 1
90 YEKI CANDRA 1019128204 1
91 YULASMI 1019087501 1
92 YULI ANGGRAINI 1013048204 1
93 ZAINAL ABDUL HARIS 1030087001 1
94 ZERNI MELMUSI 0011045604 1
95 AULIA FITRUL HADI 1017049101 1
96 DIYAWATI 1011087502 1
97 FENDI ANTONI 1015078501 1
98 HANGGI DWIFA HONESQI 1008018901 1
99 IDRIZON 1009117001 1
100 MAIDAWATI 1017047702 1
101 NOVALIA INDRA 1014019002 1
102 RIRY YUSKAR 1017047701 1
103 SILFIA ANDINI 1003056801 1
104 SULARNO 1016058902 1
105 SURMAYANTI 1029116801 1
106 VIVI RESTI DARMISON 1009128301 1
107 YOSEFRIZAL 1003077501 1
108 NURFITRI 1028048501 1
109 AMINDA DEWI SUTIASIH 1014039002 1
110 ANDRIYAS HARIYANDI 1020078401 1
111 DEVIT SATRIA 1024058901 1
112 DEWI DEVITA 1005019001 1
113 ILHAM TRI MAULANA 1017119002 1
114 INDRA WIJAYA 1025128401 1
115 IRNAWATI SIREGAR 1023016801 1
116 LAILA MARHAYATI 1031038803 1
117 LILI RISMAINI 1005058504 1
118 MEGAWATI 1003088802 1
119 MONICA FRANSISCA 1012019101 1
120 MUHARIKA DEWI 1031127801 1
121 NONI FEBRIANA 1019028801 1
122 POPI RADYULI 1003038901 1
123 RENNY PERMATA SAPUTRI 1014118801 1
124 RINI SEFRIANI 1008098501 1
125 SILVIA PERMATA SARI 1003088903 1
126 TAUFIK ADE KURNIAWAN 1009029001 1
127 YOSA NOVIA DEWI 1019018402 1
128 ZUBAIDAH 1009098901 1
129 ANDHIKA ANGGAWIRA 1024098002 1
130 ASIYARFITRIADI 1026078201 1
131 BAYU PRASETYA YUDHA 1018108501 1
132 DEVI PURNAMA SARI 1003098301 1
133 HARRI KURNIAWAN 1017018602 1
134 HARRY THEOZARD FIKRI 1026067804 1
135 HERIO RIZKI DEWINDA 1009098503 1
136 IFANI CANDRA 1006068603 1
137 ISNA ASYRI SYAHRINA 17017305 1
138 KRISNOVA NASTASIA 1022068801 1
139 PURWANTI ENDAH RAHAYU 1020118203 1
140 RANY FITRIANY 1017018601 1
141 RINA MARIANA 1010088203 1
142 SILFI FATAYANI 1011059001 1
143 SITTI HUTARI MULYANI 1017089001 1
144 UMMIL KHAIRIYAH 1011118501 1
145 ZERA MENDOZA 1015107101 1
146 ALBERT GAZALI 1029098901 1
147 ANNISAK IZZATY JAMHUR 1012129101 1
148 ASHABUL FADHLI 1029108702 1
149 ASRI NAWAS SE MM 1020048002 1
150 DEBY ERDRIANI 1002068501 1
151 DENI AMELIA 1010118402 1
152 DEPI DASMAL 1020057501 1
153 DEVI SYUKRI AZHARI S.PD.I M.PD 1008128701 1
154 DHANI PRAMULIA EKA PUTRA 1027118601 1
155 DIAN FITRINI 1019018202 1
156 DINUL AKHIYAR 1020028602 1
157 DODI STAPET 1014028503 1
158 DODI YANDRI 1009017602 1
159 DRS.HM.IQBAL.MM 1060785021 1
160 EDWAR KEMAL 1012068203 1
161 EKA MARIYANTI 1026038501 1
162 EKA MELATI M.PD 1002058401 1
163 EKA MELATI M.PD 1002058402 1
164 ELLYA GUSWANITA 1015087203 1
165 ELMI RAHMAWATI PUTRI 1009048503 1
166 ENDRYL SH MH 1017048603 1
167 ERDISNA 1009127301 1
168 ERLINDA 1027088101 1
169 ERNA SUSANTI SE MM 1003127702 1
170 EVA RIANTI 1028098602 1
171 FADLI HERNANDA 1021068601 1
172 FAJRUL ISLAMI 1011118901 1
173 FATHURRAHMI 1018058602 1
174 FEBRIYANNO SURYANA 1005028102 1
175 FIRNA YENILA 1008088702 1
176 GUSHELMI 1012087401 1
177 GUSLENDRA 1016087201 1
178 HADI SYAHPUTRA 1011108502 1
179 HAFNI 1019057502 1
180 HARI MARFALINO 1010039001 1
181 HARRY AL GHAZALY 1015128601 1
182 HEMA DESSY HARIANI 1016118002 1
183 HEMAT JUNEDI 1020037703 1
184 HENDRIK MARGARET 1001037101 1
185 HENDY MUCHRIZA 1008108301 1
186 HESTI PUSPARINI SE M.SI 1013058604 1
187 HEZY KURNIA 1014099001 1
188 HIKMAH 1002098302 1
189 ILHAMDI KURNIAWAN 1021118101 1
190 IRSYADUL EKA PUTERA 1010068501 1
191 IRZAL ARIEF WISKY 1012059001 1
192 ISNADUL HAMDI 1021038303 1
193 JENDRI MULYADI S.S M.HUM 1028018801 1
194 JHON VERI 1008077101 1
195 JIMMY FEBIO 1010028701 1
196 JUFRIADIF NA AM 1003026702 1
197 JULIUS SANTONY 1029077301 1
198 JUMRAWARSI 1012128601 1
199 KARTIRIA 1025128101 1
200 KHAIRUL ZAMAN 1016058503 1
201 LAKRY MALTAF PUTRA 1019068501 1
202 LARISSA NAVIA RANI 1020119201 1
203 LENI SYASMIRA 1003098302 1
204 LIGA MAYOLA 1022069201 1
205 LINORA RAHAYU 1021128701 1
206 MAHA RANI 1014058901 1
207 MELINA IRMAYENI SH M.KN 1003058302 1
208 MONDHA IRFANDI 1021117701 1
209 MUHAMMAD MAHZUM 1011076801 1
210 MUHAMMAD TEGUH ILHAM 1002058901 1
211 MUTIANA PRATIWI 1026059101 1
212 NUSYIRWIN 1008106404 1
213 OKTA ANDRICA PUTRA 1005108604 1
214 ONDRA EKA PUTRA 1006068701 1
215 PRIMA SANITA SYAIFUL 1011058003 1
216 RAFLIS 1003048501 1
217 RAFNIS 1007068001 1
218 RIFDA NAJMI FUAD 1019125102 1
219 RINA SUSANTI 1019128501 1
220 RINI SOVIA 1005047601 1
221 RIZA YONITA S.S MM 1015048302 1
222 ROKI ADITAMA 1003068801 1
223 RUDI SYAFRI 1022108302 1
224 SABARUDIN 1023046101 1
225 SAHARI 1028128501 1
226 SATRIA RONALDY 1026108202 1
227 SHALLY AMNA 1021018402 1
228 SITTI RIZKI MULYANI 1001088204 1
229 SOFIKA ENGGARI 1016038602 1
230 SRI RAHMAWATI 1015067501 1
231 SRI RAMADHAN 1024048503 1
232 SUHELMI HELIA 1025076401 1
233 SYAFRI ARLIS 1023108601 1
234 SYAFRI JODI 1027067903 1
235 SYAFRIKA DENI RIZKI 1016068402 1
236 SYAMSI 1006057201 1
237 SYELFIA DEWIMARNI S.PD M.PD 1013048502 1
238 SYUHADI 1021037202 1
239 USMAN 1010068304 1
240 VIVI IRAWATI 1006017601 1
241 VIVI PUSPITA SARI 1010028505 1
242 WIFRA SAFITRI 1008058902 1
243 YANTI YUSMAN 1024048502 1
244 YENG PRIMAWATI 1010088704 1
245 YOSE RIZAL 1002117401 1
246 YUHANDRI 1015057301 1
247 YULIA RETNO SARI 1003078402 1
248 YUSTA NOVERISON 1005117101 1
249 ZEFRI YENNI 1009096401 1
250 AGGY PRAMANA GUSMAN 1017069001 1
251 AGUS SURYADI 1028088702 1
252 ASMAINI 1020057603 1
253 BILLY HENDRIK 1018048301 1
254 DEDY WAHYUDI 1009087402 1
255 DODI GUSWANDI 1003088601 1
256 EKO AMRI JAYA 1026108501 1
257 EMIL NAF`AN 1017127401 1
258 FIRDAUS 1011098501 1
259 HALIFIA HENDRI 1010058703 1
260 HANDY RACHMAT TRIYADI 1028018301 1
261 HARIS SURYAMEN 1023037504 1
262 HARKAMSYAH ANDRIANOF 1017089002 1
263 HASRI AWAL 1020099101 1