-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdatabase_code.sql
1357 lines (901 loc) · 31.6 KB
/
database_code.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 11.5
-- Dumped by pg_dump version 12rc1
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;
--
-- Name: public; Type: SCHEMA; Schema: -; Owner: postgres
--
CREATE SCHEMA public;
ALTER SCHEMA public OWNER TO postgres;
--
-- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: postgres
--
COMMENT ON SCHEMA public IS 'standard public schema';
--
-- Name: akademisyenLogKaydet(); Type: FUNCTION; Schema: public; Owner: postgres
--
CREATE FUNCTION public."akademisyenLogKaydet"() RETURNS trigger
LANGUAGE plpgsql
AS $$
BEGIN
INSERT INTO loglar("metin", "tarih")
VALUES('yeni akademisyen eklendi',now());
RETURN NULL;
END;
$$;
ALTER FUNCTION public."akademisyenLogKaydet"() OWNER TO postgres;
--
-- Name: akademisyenekle(text, text, integer, integer, integer, integer, integer, integer, integer); Type: PROCEDURE; Schema: public; Owner: postgres
--
CREATE PROCEDURE public.akademisyenekle(p_adisoyadi text, p_sifre text, p_fakulte_no integer, p_ulke_no integer, p_il_no integer, p_ilce_no integer, p_lisans_no integer, p_master_no integer, p_doktora_no integer)
LANGUAGE sql
AS $$
INSERT INTO kisiler("adiSoyadi", "ulkeNo","ilNo","ilceNo","lisansNo","masterNo","doktoraNo")
VALUES(p_adiSoyadi,p_ulke_no,p_il_no,p_ilce_no,p_lisans_no,p_master_no,p_doktora_no);
INSERT INTO akademisyenler("sifre","fakulteNo","aktif", "kisiNo")
VALUES(p_sifre, p_fakulte_no,true, currval('kisiler_id_seq'::regclass));
$$;
ALTER PROCEDURE public.akademisyenekle(p_adisoyadi text, p_sifre text, p_fakulte_no integer, p_ulke_no integer, p_il_no integer, p_ilce_no integer, p_lisans_no integer, p_master_no integer, p_doktora_no integer) OWNER TO postgres;
--
-- Name: akademisyensil(integer); Type: PROCEDURE; Schema: public; Owner: postgres
--
CREATE PROCEDURE public.akademisyensil(p_akademisyenno integer)
LANGUAGE sql
AS $$
UPDATE akademisyenler
SET aktif = false
WHERE "akademisyenNo" = p_akademisyenNo;
$$;
ALTER PROCEDURE public.akademisyensil(p_akademisyenno integer) OWNER TO postgres;
--
-- Name: dersLogKaydet(); Type: FUNCTION; Schema: public; Owner: postgres
--
CREATE FUNCTION public."dersLogKaydet"() RETURNS trigger
LANGUAGE plpgsql
AS $$
BEGIN
INSERT INTO loglar("metin", "tarih")
VALUES('yeni ders eklendi',now());
RETURN NULL;
END;
$$;
ALTER FUNCTION public."dersLogKaydet"() OWNER TO postgres;
--
-- Name: dersal(integer, integer); Type: PROCEDURE; Schema: public; Owner: postgres
--
CREATE PROCEDURE public.dersal(p_ogrenci_no integer, p_ders_no integer)
LANGUAGE sql
AS $$
INSERT INTO "ogrenciAlinanDers"("ogrenciNo","dersNo","ogrenciNotu","aktif")
VALUES(p_ogrenci_no,p_ders_no,0,true);
$$;
ALTER PROCEDURE public.dersal(p_ogrenci_no integer, p_ders_no integer) OWNER TO postgres;
--
-- Name: dersbirak(integer, integer); Type: PROCEDURE; Schema: public; Owner: postgres
--
CREATE PROCEDURE public.dersbirak(p_ogrenci_no integer, p_ders_no integer)
LANGUAGE sql
AS $$
UPDATE "ogrenciAlinanDers"
SET aktif = false
WHERE "ogrenciNo" = p_ogrenci_no and "dersNo" = p_ders_no
$$;
ALTER PROCEDURE public.dersbirak(p_ogrenci_no integer, p_ders_no integer) OWNER TO postgres;
--
-- Name: dersekle(text, integer, integer); Type: PROCEDURE; Schema: public; Owner: postgres
--
CREATE PROCEDURE public.dersekle(p_ders_adi text, p_sinif_no integer, p_hoca_no integer)
LANGUAGE sql
AS $$
INSERT INTO dersler("adi", "sinifNo","akademisyenNo","aktif")
VALUES(p_ders_adi,p_sinif_no,p_hoca_no,true);
$$;
ALTER PROCEDURE public.dersekle(p_ders_adi text, p_sinif_no integer, p_hoca_no integer) OWNER TO postgres;
--
-- Name: derssil(integer); Type: PROCEDURE; Schema: public; Owner: postgres
--
CREATE PROCEDURE public.derssil(p_ders_no integer)
LANGUAGE sql
AS $$
UPDATE dersler
SET aktif = false
WHERE "id" = p_ders_no;
$$;
ALTER PROCEDURE public.derssil(p_ders_no integer) OWNER TO postgres;
--
-- Name: notgir(integer, integer); Type: PROCEDURE; Schema: public; Owner: postgres
--
CREATE PROCEDURE public.notgir(p_ogrenci_no integer, p_not integer)
LANGUAGE sql
AS $$
UPDATE "ogrenciAlinanDers"
SET "ogrenciNotu" = p_not
WHERE "ogrenciNo" = p_ogrenci_no
$$;
ALTER PROCEDURE public.notgir(p_ogrenci_no integer, p_not integer) OWNER TO postgres;
--
-- Name: ogrenciLogKaydet(); Type: FUNCTION; Schema: public; Owner: postgres
--
CREATE FUNCTION public."ogrenciLogKaydet"() RETURNS trigger
LANGUAGE plpgsql
AS $$
BEGIN
INSERT INTO loglar("metin", "tarih")
VALUES('yeni öğrenci eklendi',now());
RETURN NULL;
END;
$$;
ALTER FUNCTION public."ogrenciLogKaydet"() OWNER TO postgres;
--
-- Name: ogrenciekle(text, text, integer, integer, integer, integer); Type: PROCEDURE; Schema: public; Owner: postgres
--
CREATE PROCEDURE public.ogrenciekle(p_adisoyadi text, p_sifre text, p_ulke_no integer, p_il_no integer, p_ilce_no integer, p_lisans_no integer)
LANGUAGE sql
AS $$
INSERT INTO kisiler("adiSoyadi", "ulkeNo","ilNo","ilceNo","lisansNo","masterNo","doktoraNo")
VALUES(p_adiSoyadi,p_ulke_no,p_il_no,p_ilce_no,p_lisans_no,null,null);
INSERT INTO ogrenciler("sifre","aktif","kisiNo")
VALUES(p_sifre,true,currval('kisiler_id_seq'::regclass));
$$;
ALTER PROCEDURE public.ogrenciekle(p_adisoyadi text, p_sifre text, p_ulke_no integer, p_il_no integer, p_ilce_no integer, p_lisans_no integer) OWNER TO postgres;
--
-- Name: ogrencisil(integer); Type: PROCEDURE; Schema: public; Owner: postgres
--
CREATE PROCEDURE public.ogrencisil(p_ogrencino integer)
LANGUAGE sql
AS $$
UPDATE ogrenciler
SET aktif = false
WHERE "ogrenciNo" = p_ogrenciNo;
$$;
ALTER PROCEDURE public.ogrencisil(p_ogrencino integer) OWNER TO postgres;
--
-- Name: yeniDersLogKaydet(); Type: FUNCTION; Schema: public; Owner: postgres
--
CREATE FUNCTION public."yeniDersLogKaydet"() RETURNS trigger
LANGUAGE plpgsql
AS $$
BEGIN
INSERT INTO loglar("metin", "tarih")
VALUES('yeni ders kaydı eklendi',now());
RETURN NULL;
END;
$$;
ALTER FUNCTION public."yeniDersLogKaydet"() OWNER TO postgres;
--
-- Name: akademisyenler_no_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.akademisyenler_no_seq
START WITH 100000
INCREMENT BY 1
MINVALUE 100000
MAXVALUE 199999
CACHE 1;
ALTER TABLE public.akademisyenler_no_seq OWNER TO postgres;
SET default_tablespace = '';
--
-- Name: akademisyenler; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.akademisyenler (
id integer NOT NULL,
"akademisyenNo" integer DEFAULT nextval('public.akademisyenler_no_seq'::regclass) NOT NULL,
sifre text NOT NULL,
"fakulteNo" integer NOT NULL,
aktif boolean NOT NULL,
"kisiNo" integer NOT NULL
);
ALTER TABLE public.akademisyenler OWNER TO postgres;
--
-- Name: akademisyenler_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.akademisyenler_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.akademisyenler_id_seq OWNER TO postgres;
--
-- Name: akademisyenler_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.akademisyenler_id_seq OWNED BY public.akademisyenler.id;
--
-- Name: dersler; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.dersler (
id integer NOT NULL,
adi text NOT NULL,
"sinifNo" integer NOT NULL,
"akademisyenNo" integer NOT NULL,
aktif boolean NOT NULL
);
ALTER TABLE public.dersler OWNER TO postgres;
--
-- Name: dersler_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.dersler_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.dersler_id_seq OWNER TO postgres;
--
-- Name: dersler_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.dersler_id_seq OWNED BY public.dersler.id;
--
-- Name: doktoraBolumleri; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public."doktoraBolumleri" (
id integer NOT NULL,
"Adi" text NOT NULL
);
ALTER TABLE public."doktoraBolumleri" OWNER TO postgres;
--
-- Name: doktoraBolumleri_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public."doktoraBolumleri_id_seq"
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public."doktoraBolumleri_id_seq" OWNER TO postgres;
--
-- Name: doktoraBolumleri_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public."doktoraBolumleri_id_seq" OWNED BY public."doktoraBolumleri".id;
--
-- Name: fakulteler; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.fakulteler (
"fakulteNo" integer NOT NULL,
"fakulteAdi" text NOT NULL,
"fakulteKod" text NOT NULL
);
ALTER TABLE public.fakulteler OWNER TO postgres;
--
-- Name: fakulteler_fakulteNo_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public."fakulteler_fakulteNo_seq"
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public."fakulteler_fakulteNo_seq" OWNER TO postgres;
--
-- Name: fakulteler_fakulteNo_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public."fakulteler_fakulteNo_seq" OWNED BY public.fakulteler."fakulteNo";
--
-- Name: ilceler; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.ilceler (
id integer NOT NULL,
"ilceAdi" text NOT NULL
);
ALTER TABLE public.ilceler OWNER TO postgres;
--
-- Name: ilceler_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.ilceler_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.ilceler_id_seq OWNER TO postgres;
--
-- Name: ilceler_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.ilceler_id_seq OWNED BY public.ilceler.id;
--
-- Name: iller; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.iller (
id integer NOT NULL,
"plakaNo" integer NOT NULL,
"Adi" text NOT NULL
);
ALTER TABLE public.iller OWNER TO postgres;
--
-- Name: iller_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.iller_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.iller_id_seq OWNER TO postgres;
--
-- Name: iller_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.iller_id_seq OWNED BY public.iller.id;
--
-- Name: kisiler; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.kisiler (
id integer NOT NULL,
"adiSoyadi" text NOT NULL,
"ulkeNo" integer NOT NULL,
"ilNo" integer NOT NULL,
"ilceNo" integer NOT NULL,
"lisansNo" integer NOT NULL,
"masterNo" integer,
"doktoraNo" integer
);
ALTER TABLE public.kisiler OWNER TO postgres;
--
-- Name: kisiler_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.kisiler_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.kisiler_id_seq OWNER TO postgres;
--
-- Name: kisiler_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.kisiler_id_seq OWNED BY public.kisiler.id;
--
-- Name: lisansBolumleri; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public."lisansBolumleri" (
id integer NOT NULL,
"Adi" text NOT NULL
);
ALTER TABLE public."lisansBolumleri" OWNER TO postgres;
--
-- Name: lisansBolumleri_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public."lisansBolumleri_id_seq"
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public."lisansBolumleri_id_seq" OWNER TO postgres;
--
-- Name: lisansBolumleri_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public."lisansBolumleri_id_seq" OWNED BY public."lisansBolumleri".id;
--
-- Name: loglar; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.loglar (
id integer NOT NULL,
metin text NOT NULL,
tarih date NOT NULL
);
ALTER TABLE public.loglar OWNER TO postgres;
--
-- Name: loglar_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.loglar_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.loglar_id_seq OWNER TO postgres;
--
-- Name: loglar_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.loglar_id_seq OWNED BY public.loglar.id;
--
-- Name: masterBolumleri; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public."masterBolumleri" (
id integer NOT NULL,
"Adi" text NOT NULL
);
ALTER TABLE public."masterBolumleri" OWNER TO postgres;
--
-- Name: masterBolumleri_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public."masterBolumleri_id_seq"
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public."masterBolumleri_id_seq" OWNER TO postgres;
--
-- Name: masterBolumleri_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public."masterBolumleri_id_seq" OWNED BY public."masterBolumleri".id;
--
-- Name: ogrenciAlinanDers; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public."ogrenciAlinanDers" (
id integer NOT NULL,
"ogrenciNo" integer NOT NULL,
"dersNo" integer NOT NULL,
"ogrenciNotu" integer NOT NULL,
aktif boolean NOT NULL
);
ALTER TABLE public."ogrenciAlinanDers" OWNER TO postgres;
--
-- Name: ogrenciAlinanDers_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public."ogrenciAlinanDers_id_seq"
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public."ogrenciAlinanDers_id_seq" OWNER TO postgres;
--
-- Name: ogrenciAlinanDers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public."ogrenciAlinanDers_id_seq" OWNED BY public."ogrenciAlinanDers".id;
--
-- Name: ogrenciler_no_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.ogrenciler_no_seq
START WITH 200000
INCREMENT BY 1
MINVALUE 200000
MAXVALUE 299999
CACHE 1;
ALTER TABLE public.ogrenciler_no_seq OWNER TO postgres;
--
-- Name: ogrenciler; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.ogrenciler (
id integer NOT NULL,
"ogrenciNo" integer DEFAULT nextval('public.ogrenciler_no_seq'::regclass) NOT NULL,
sifre text NOT NULL,
aktif boolean NOT NULL,
"kisiNo" integer NOT NULL
);
ALTER TABLE public.ogrenciler OWNER TO postgres;
--
-- Name: ogrenciler_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.ogrenciler_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.ogrenciler_id_seq OWNER TO postgres;
--
-- Name: ogrenciler_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.ogrenciler_id_seq OWNED BY public.ogrenciler.id;
--
-- Name: personeller_no_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.personeller_no_seq
START WITH 300000
INCREMENT BY 1
MINVALUE 300000
MAXVALUE 399999
CACHE 1;
ALTER TABLE public.personeller_no_seq OWNER TO postgres;
--
-- Name: personeller; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.personeller (
id integer NOT NULL,
"personelNo" integer DEFAULT nextval('public.personeller_no_seq'::regclass) NOT NULL,
sifre text NOT NULL
);
ALTER TABLE public.personeller OWNER TO postgres;
--
-- Name: personeller_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.personeller_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.personeller_id_seq OWNER TO postgres;
--
-- Name: personeller_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.personeller_id_seq OWNED BY public.personeller.id;
--
-- Name: siniflar_no_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.siniflar_no_seq
START WITH 400000
INCREMENT BY 1
MINVALUE 400000
MAXVALUE 499999
CACHE 1;
ALTER TABLE public.siniflar_no_seq OWNER TO postgres;
--
-- Name: siniflar; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.siniflar (
id integer NOT NULL,
adi text NOT NULL,
"bulunduguKat" integer NOT NULL,
"sinifNo" integer DEFAULT nextval('public.siniflar_no_seq'::regclass) NOT NULL
);
ALTER TABLE public.siniflar OWNER TO postgres;
--
-- Name: siniflar_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.siniflar_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.siniflar_id_seq OWNER TO postgres;
--
-- Name: siniflar_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.siniflar_id_seq OWNED BY public.siniflar.id;
--
-- Name: ulkeler; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.ulkeler (
id integer NOT NULL,
"ulkeAdi" text NOT NULL
);
ALTER TABLE public.ulkeler OWNER TO postgres;
--
-- Name: ulkeler_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.ulkeler_id_seq
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.ulkeler_id_seq OWNER TO postgres;
--
-- Name: ulkeler_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.ulkeler_id_seq OWNED BY public.ulkeler.id;
--
-- Name: akademisyenler id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.akademisyenler ALTER COLUMN id SET DEFAULT nextval('public.akademisyenler_id_seq'::regclass);
--
-- Name: dersler id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.dersler ALTER COLUMN id SET DEFAULT nextval('public.dersler_id_seq'::regclass);
--
-- Name: doktoraBolumleri id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."doktoraBolumleri" ALTER COLUMN id SET DEFAULT nextval('public."doktoraBolumleri_id_seq"'::regclass);
--
-- Name: fakulteler fakulteNo; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.fakulteler ALTER COLUMN "fakulteNo" SET DEFAULT nextval('public."fakulteler_fakulteNo_seq"'::regclass);
--
-- Name: ilceler id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.ilceler ALTER COLUMN id SET DEFAULT nextval('public.ilceler_id_seq'::regclass);
--
-- Name: iller id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.iller ALTER COLUMN id SET DEFAULT nextval('public.iller_id_seq'::regclass);
--
-- Name: kisiler id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.kisiler ALTER COLUMN id SET DEFAULT nextval('public.kisiler_id_seq'::regclass);
--
-- Name: lisansBolumleri id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."lisansBolumleri" ALTER COLUMN id SET DEFAULT nextval('public."lisansBolumleri_id_seq"'::regclass);
--
-- Name: loglar id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.loglar ALTER COLUMN id SET DEFAULT nextval('public.loglar_id_seq'::regclass);
--
-- Name: masterBolumleri id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."masterBolumleri" ALTER COLUMN id SET DEFAULT nextval('public."masterBolumleri_id_seq"'::regclass);
--
-- Name: ogrenciAlinanDers id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."ogrenciAlinanDers" ALTER COLUMN id SET DEFAULT nextval('public."ogrenciAlinanDers_id_seq"'::regclass);
--
-- Name: ogrenciler id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.ogrenciler ALTER COLUMN id SET DEFAULT nextval('public.ogrenciler_id_seq'::regclass);
--
-- Name: personeller id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.personeller ALTER COLUMN id SET DEFAULT nextval('public.personeller_id_seq'::regclass);
--
-- Name: siniflar id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.siniflar ALTER COLUMN id SET DEFAULT nextval('public.siniflar_id_seq'::regclass);
--
-- Name: ulkeler id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.ulkeler ALTER COLUMN id SET DEFAULT nextval('public.ulkeler_id_seq'::regclass);
--
-- Data for Name: akademisyenler; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO public.akademisyenler VALUES (4, 100003, '12345', 2, true, 13);
INSERT INTO public.akademisyenler VALUES (3, 100002, '12345', 1, true, 12);
--
-- Data for Name: dersler; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO public.dersler VALUES (3, 'Veritabanı Yönetim Sistemleri', 400002, 100002, true);
--
-- Data for Name: doktoraBolumleri; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO public."doktoraBolumleri" VALUES (1, 'Büyük Veri');
INSERT INTO public."doktoraBolumleri" VALUES (2, 'Veri Analizi');
INSERT INTO public."doktoraBolumleri" VALUES (3, 'Veri İletişimi');
--
-- Data for Name: fakulteler; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO public.fakulteler VALUES (1, 'Bilgisayar ve Bilişim Bilimleri Fakültesi', 'BBBF');
INSERT INTO public.fakulteler VALUES (2, 'Tıp Fakültesi', 'TF');
--
-- Data for Name: ilceler; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO public.ilceler VALUES (1, 'Bagcilar');
INSERT INTO public.ilceler VALUES (2, 'Pendik');
--
-- Data for Name: iller; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO public.iller VALUES (1, 34, 'İstanbul');
INSERT INTO public.iller VALUES (2, 6, 'Ankara');
--
-- Data for Name: kisiler; Type: TABLE DATA; Schema: public; Owner: postgres
--
INSERT INTO public.kisiler VALUES (10, 'GÖKMEN SEZİKLİ', 1, 34, 1, 1, NULL, NULL);
INSERT INTO public.kisiler VALUES (11, 'BİROL TEKELİ', 1, 34, 1, 1, NULL, NULL);
INSERT INTO public.kisiler VALUES (12, 'SİNEM YAMAK', 1, 34, 1, 1, 1, 1);
INSERT INTO public.kisiler VALUES (13, 'MUSTAFA ABDULLAH DEVECİ', 1, 34, 1, 1, 2, 2);
--
-- Data for Name: lisansBolumleri; Type: TABLE DATA; Schema: public; Owner: postgres
--