-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstaffevaluation.sql
1512 lines (1331 loc) · 81.9 KB
/
staffevaluation.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
-- MySQL dump 10.13 Distrib 8.0.23, for Win64 (x86_64)
--
-- Host: localhost Database: staffevaluation
-- ------------------------------------------------------
-- Server version 8.0.22
/*!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 */;
/*!50503 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `administrator`
--
DROP TABLE IF EXISTS `administrator`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `administrator` (
`username` varchar(12) NOT NULL,
PRIMARY KEY (`username`),
CONSTRAINT `ADMINUSR` FOREIGN KEY (`username`) REFERENCES `user` (`username`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=greek;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `administrator`
--
LOCK TABLES `administrator` WRITE;
/*!40000 ALTER TABLE `administrator` DISABLE KEYS */;
INSERT INTO `administrator` VALUES ('iosifzax'),('mairypap'),('marzax'),('xristanag');
/*!40000 ALTER TABLE `administrator` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `antikeim`
--
DROP TABLE IF EXISTS `antikeim`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `antikeim` (
`title` varchar(36) NOT NULL,
`descr` tinytext,
`belongs_to` varchar(36) DEFAULT NULL,
PRIMARY KEY (`title`),
KEY `ANTIKEIM` (`belongs_to`),
CONSTRAINT `ANTIKEIM` FOREIGN KEY (`belongs_to`) REFERENCES `antikeim` (`title`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=greek;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `antikeim`
--
LOCK TABLES `antikeim` WRITE;
/*!40000 ALTER TABLE `antikeim` DISABLE KEYS */;
INSERT INTO `antikeim` VALUES ('2D','Level two element, child of Graphics','Graphics'),('3D','Level two element, child of Graphics','Graphics'),('AI','Level one element, child of Computer Science','Computer Science'),('Algorithms','Level one element, child of Computer Science','Computer Science'),('Animation','Level two element, child of Graphics','Graphics'),('Complexity and Efficiency','Level two element, child of Algorithms','Algorithms'),('Computer Science','Root element, no more general antikeim',NULL),('Data structures','Level two element, child of Algorithms','Algorithms'),('Databases','Level one element, child of Computer Science','Computer Science'),('Device connectivity','Level two element, child of Networking','Networking'),('Graphics','Level one element, child of Computer Science','Computer Science'),('Information Retieval','Level three element, child of NLP','NLP'),('Language analysis',' Level three element, child of NLP','NLP'),('Machine Learning','Level one element,child of AI','AI'),('Mobile Apps','Level two element, child of Programming','Programming'),('Network setup and maintainance','Level two element, child of Networking','Networking'),('Networking','Level one element, child of Computer Science','Computer Science'),('NLP','Level two element, child of AI','AI'),('NoSQL DBs','Level two element, child of Databases','Databases'),('Object-Oriented DBs','Level two element, child of Databases','Databases'),('Programming','Level one element, child of Computer Science','Computer Science'),('Relational DBs','Level two element, child of Databases','Databases'),('Robotics','Level two element, child of AI','AI'),('Web Programming','Level two element, child of Programming','Programming');
/*!40000 ALTER TABLE `antikeim` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `company`
--
DROP TABLE IF EXISTS `company`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `company` (
`AFM` char(9) NOT NULL,
`DOY` varchar(15) DEFAULT NULL,
`name` varchar(35) NOT NULL DEFAULT 'unknown',
`phone` bigint NOT NULL,
`street` varchar(15) NOT NULL,
`num` tinyint DEFAULT NULL,
`city` varchar(15) NOT NULL DEFAULT 'unknown',
`country` varchar(15) NOT NULL DEFAULT 'unknown',
PRIMARY KEY (`AFM`)
) ENGINE=InnoDB DEFAULT CHARSET=greek;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `company`
--
LOCK TABLES `company` WRITE;
/*!40000 ALTER TABLE `company` DISABLE KEYS */;
INSERT INTO `company` VALUES ('023451232','A Patras','Typology Ltd',2610231452,'Korinthou',56,'Patra','Greece'),('023453344','C Patras','EXPENDITURE Ltd',2610256321,'Maizonos',123,'Patra','Greece'),('05694712','A Athinwn','Electrical A.A.',2100202022,'Kifisias',26,'Athina','Greece'),('123432211','A Geraka','SoftSol A.E.',2103452133,'Ahepa',44,'Athina','Greece'),('18765549','C Peiraia','Unigram',2610678900,'Korinthou',97,'Aigio','Greece'),('23122345','SF 1234 BG','SocialSc',3200123451,'General Sklevi',35,'Sofia','Bulgaria'),('561234561','GS 35321 L','InCodeWeTrust',1242345612,'Oxford',12,'London','United Kingdom'),('97833111','C Athinwn','Universal',2107827632,'Pelopos',92,'Athina','Greece');
/*!40000 ALTER TABLE `company` ENABLE KEYS */;
UNLOCK TABLES;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8mb4 */ ;
/*!50003 SET character_set_results = utf8mb4 */ ;
/*!50003 SET collation_connection = utf8mb4_0900_ai_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `cannotchangefieldsofcompany` BEFORE UPDATE ON `company` FOR EACH ROW BEGIN
IF(NEW.AFM <> OLD.AFM OR NEW.DOY <> OLD.DOY OR NEW.name <> OLD.name) THEN
SET NEW.AFM=OLD.AFM;
SET NEW.DOY=OLD.DOY;
SET NEW.name=OLD.name;
END IF;
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
--
-- Table structure for table `degree`
--
DROP TABLE IF EXISTS `degree`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `degree` (
`titlos` varchar(50) NOT NULL,
`idryma` varchar(40) NOT NULL,
`bathmida` enum('LYKEIO','UNIV','MASTER','PHD') DEFAULT NULL,
PRIMARY KEY (`titlos`,`idryma`)
) ENGINE=InnoDB DEFAULT CHARSET=greek;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `degree`
--
LOCK TABLES `degree` WRITE;
/*!40000 ALTER TABLE `degree` DISABLE KEYS */;
INSERT INTO `degree` VALUES ('Advanced Rendering Techniques','Delft University of Technology','MASTER'),('Artificial Intelligence',' Cambrigde University','MASTER'),('Big Data and Analytics',' Imperial College London','MASTER'),('Big Data Structures and Algorithms','Technical University of Denmark','MASTER'),('Computer and Infromatics Eng.',' Patras University','UNIV'),('Computer Science and Engineering','Delft University of Technology','UNIV'),('Computer Science Dipl.','Lancster University','UNIV'),('Computer Vision and Modelling','Princeton University','MASTER'),('Data Science Bachelor','Eindhoven University of Technology','UNIV'),('Electrical and Computer Eng.','Metsovio Polytexneio','UNIV'),('Lysium certificate','2nd Lysium of Aigaleo','LYKEIO'),('NLP related high efficiency algorithms','Patras University','PHD'),('PDEng Data Science','Eindhoven University of Technology','PHD');
/*!40000 ALTER TABLE `degree` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `employee`
--
DROP TABLE IF EXISTS `employee`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `employee` (
`username` varchar(12) NOT NULL,
`exp_years` tinyint DEFAULT NULL,
`bio` text,
`sistatikes` varchar(35) NOT NULL,
`certificates` varchar(35) NOT NULL,
`awards` varchar(35) NOT NULL,
`firm` char(9) NOT NULL,
PRIMARY KEY (`username`),
KEY `EMPLCOMP` (`firm`),
CONSTRAINT `EMPLCOMP` FOREIGN KEY (`firm`) REFERENCES `company` (`AFM`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `EMPLUSR` FOREIGN KEY (`username`) REFERENCES `user` (`username`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=greek;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `employee`
--
LOCK TABLES `employee` WRITE;
/*!40000 ALTER TABLE `employee` DISABLE KEYS */;
INSERT INTO `employee` VALUES ('abrown',4,'bio2','sistatikes2','certificates2','awards2','023451232'),('cleogeo',6,'bio5','sistatikes5','certificates5','awards5','561234561'),('elenineo',2,'bio3','sistatikes3','certificates3','awards3','123432211'),('jennyk',2,'bio9','sistatikes9','certificates9','awards9','023451232'),('kwstasneo',1,'bio4','sistatikes4','certificates4','awards4','18765549'),('liagourma',1,'bio11','sistatikes11','certificates11','awards11','18765549'),('lionarF',8,'bio7','sistatikes7','certificates7','awards7','05694712'),('miltH',9,'bio10','sistatikes10','certificates10','awards10','123432211'),('mnikol',3,'bio1','sistatikes1','certificates1','awards1','023453344'),('msmith',12,'bio8','sistatikes8','certificates8','awards8','023453344'),('niktsakon',5,'bio12','sistatikes12','certificates12','awards12','123432211'),('zazahir23',1,'bio6','sistatikes6','certificates6','awards6','23122345');
/*!40000 ALTER TABLE `employee` ENABLE KEYS */;
UNLOCK TABLES;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8mb4 */ ;
/*!50003 SET character_set_results = utf8mb4 */ ;
/*!50003 SET collation_connection = utf8mb4_0900_ai_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `insertinginto_employee` BEFORE INSERT ON `employee` FOR EACH ROW BEGIN
IF(NEW.username IN (SELECT username FROM employee))
THEN
INSERT INTO log
VALUES(@useronoma,CURRENT_TIMESTAMP,'NO','INSERT','employee');
ELSE
INSERT INTO log
VALUES(@useronoma,CURRENT_TIMESTAMP,'YES','INSERT','employee');
END IF;
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8mb4 */ ;
/*!50003 SET character_set_results = utf8mb4 */ ;
/*!50003 SET collation_connection = utf8mb4_0900_ai_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `updatingtable_employee` BEFORE UPDATE ON `employee` FOR EACH ROW BEGIN
IF(NEW.username=OLD.username AND NEW.exp_years=OLD.exp_years AND NEW.bio=OLD.bio AND NEW.sistatikes=OLD.sistatikes AND NEW.certificates=OLD.certificates
AND OLD.awards=NEW.awards AND OLD.firm=NEW.firm) THEN
INSERT INTO log
VALUES(@useronoma,CURRENT_TIMESTAMP,'NO','UPDATE','employee');
ELSE
INSERT INTO log
VALUES(@useronoma,CURRENT_TIMESTAMP,'YES','UPDATE','employee');
END IF;
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8mb4 */ ;
/*!50003 SET character_set_results = utf8mb4 */ ;
/*!50003 SET collation_connection = utf8mb4_0900_ai_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `deletingfrom_employee` BEFORE DELETE ON `employee` FOR EACH ROW BEGIN
IF(OLD.username NOT IN (SELECT username FROM employee)) THEN
INSERT INTO log
VALUES(@useronoma,CURRENT_TIMESTAMP,'NO','DELETE','employee');
ELSE
INSERT INTO log
VALUES(@useronoma,CURRENT_TIMESTAMP,'YES','DELETE','employee');
END IF;
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
--
-- Table structure for table `evaluation`
--
DROP TABLE IF EXISTS `evaluation`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `evaluation` (
`emplusername` varchar(12) NOT NULL,
`evalusername` varchar(12) NOT NULL,
`jobid` int NOT NULL,
`aksiologisi1` enum('0','1','2','3','4') DEFAULT NULL,
`aksiologisi2` enum('0','1','2','3','4') DEFAULT NULL,
`aksiologisi3` enum('0','1','2') DEFAULT NULL,
`comments` varchar(255) NOT NULL,
`eval_id` int NOT NULL,
KEY `EVL_EMP` (`emplusername`),
KEY `EVAL_EVL` (`evalusername`),
KEY `EVAL_JOB` (`jobid`),
CONSTRAINT `EVAL_EVL` FOREIGN KEY (`evalusername`) REFERENCES `evaluator` (`username`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `EVAL_JOB` FOREIGN KEY (`jobid`) REFERENCES `job` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `EVL_EMP` FOREIGN KEY (`emplusername`) REFERENCES `employee` (`username`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=greek;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `evaluation`
--
LOCK TABLES `evaluation` WRITE;
/*!40000 ALTER TABLE `evaluation` DISABLE KEYS */;
INSERT INTO `evaluation` VALUES ('mnikol','hlgeor',1,'4','3','1','good',20),('mnikol','vlasster',111,'1',NULL,NULL,'not good',21),('abrown','akisgoud',456,'2','3','2','good',22),('abrown','hlgeor',1,NULL,'3','1','good',23),('elenineo','efstang',789,'2','4','2','good',24),('elenineo','adonkab',123,'1',NULL,'0','not good',25),('kwstasneo','dionkok',321,'3','2','0','good',26),('kwstasneo','swtirzan',654,NULL,'4','2','good',27),('cleogeo','hlgeor',987,'4','4','2','good',28),('cleogeo','vlasster',147,'3',NULL,'1','not good',29),('zazahir23','akisgoud',258,'4','0','0','not good',30),('zazahir23','efstang',369,NULL,NULL,'2','not good',31),('lionarF','adonkab',963,'2','2','2','good',32),('lionarF','hlgeor',1,'3','1',NULL,'not good',33),('liagourma','vlasster',111,'4','4','2','good',34),('liagourma','akisgoud',456,'1','2',NULL,'not good',35),('msmith','efstang',789,'4','1','1','good',36),('msmith','adonkab',123,NULL,'2',NULL,'not good',37),('jennyk','dionkok',321,'2','4','2','good',38),('jennyk','swtirzan',654,NULL,'4','2','good',39),('miltH','akisgoud',456,'4','3','2','good',40),('miltH','adonkab',963,NULL,'3','2','good',41);
/*!40000 ALTER TABLE `evaluation` ENABLE KEYS */;
UNLOCK TABLES;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8mb4 */ ;
/*!50003 SET character_set_results = utf8mb4 */ ;
/*!50003 SET collation_connection = utf8mb4_0900_ai_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `SumOfEvaluations` AFTER INSERT ON `evaluation` FOR EACH ROW BEGIN
SET @eval_1 = NEW.aksiologisi1;
SET @eval_2 = NEW.aksiologisi2;
SET @eval_3 = NEW.aksiologisi3;
IF(@eval_1 <> '' AND @eval_2 <> '' AND @eval_3 <> '') THEN
SET @sum = @eval_1 + @eval_2 + @eval_3;
INSERT INTO evaluationresult
VALUES (NEW.eval_id,NEW.emplusername,NEW.jobid,@sum,NEW.comments);
END IF;
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
--
-- Table structure for table `evaluationresult`
--
DROP TABLE IF EXISTS `evaluationresult`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `evaluationresult` (
`EvId` int NOT NULL,
`empl_usrname` varchar(12) NOT NULL,
`job_id` int NOT NULL,
`grade` int NOT NULL,
`comments` varchar(255) NOT NULL,
PRIMARY KEY (`EvId`,`empl_usrname`),
KEY `EMPL_EVALR` (`empl_usrname`),
KEY `JOB_EVALR` (`job_id`),
CONSTRAINT `EMPL_EVALR` FOREIGN KEY (`empl_usrname`) REFERENCES `employee` (`username`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `JOB_EVALR` FOREIGN KEY (`job_id`) REFERENCES `job` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=greek;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `evaluationresult`
--
LOCK TABLES `evaluationresult` WRITE;
/*!40000 ALTER TABLE `evaluationresult` DISABLE KEYS */;
INSERT INTO `evaluationresult` VALUES (20,'mnikol',1,8,'good'),(22,'abrown',456,7,'good'),(24,'elenineo',789,8,'good'),(26,'kwstasneo',321,5,'good'),(28,'cleogeo',987,10,'good'),(30,'zazahir23',258,4,'not good'),(32,'lionarF',963,6,'good'),(34,'liagourma',111,10,'good'),(36,'msmith',789,6,'good'),(38,'jennyk',321,8,'good'),(40,'miltH',456,9,'good');
/*!40000 ALTER TABLE `evaluationresult` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `evaluator`
--
DROP TABLE IF EXISTS `evaluator`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `evaluator` (
`username` varchar(12) NOT NULL,
`exp_years` tinyint DEFAULT NULL,
`firm` char(9) NOT NULL,
PRIMARY KEY (`username`),
KEY `EVALCMP` (`firm`),
CONSTRAINT `EVALCMP` FOREIGN KEY (`firm`) REFERENCES `company` (`AFM`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `EVALUSR` FOREIGN KEY (`username`) REFERENCES `user` (`username`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=greek;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `evaluator`
--
LOCK TABLES `evaluator` WRITE;
/*!40000 ALTER TABLE `evaluator` DISABLE KEYS */;
INSERT INTO `evaluator` VALUES ('adonkab',5,'561234561'),('akisgoud',11,'123432211'),('dionkok',1,'23122345'),('efstang',3,'18765549'),('elefasla',6,'123432211'),('hlgeor',10,'18765549'),('swtirzan',7,'05694712'),('vlasster',8,'023451232');
/*!40000 ALTER TABLE `evaluator` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `has_degree`
--
DROP TABLE IF EXISTS `has_degree`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `has_degree` (
`degr_title` varchar(50) NOT NULL,
`degr_idryma` varchar(40) NOT NULL,
`empl_username` varchar(12) NOT NULL,
`etos` year DEFAULT NULL,
`grade` float(3,1) DEFAULT NULL,
PRIMARY KEY (`degr_title`,`degr_idryma`,`empl_username`),
KEY `HASEMPL` (`empl_username`),
CONSTRAINT `HASDEGR` FOREIGN KEY (`degr_title`, `degr_idryma`) REFERENCES `degree` (`titlos`, `idryma`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `HASEMPL` FOREIGN KEY (`empl_username`) REFERENCES `employee` (`username`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=greek;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `has_degree`
--
LOCK TABLES `has_degree` WRITE;
/*!40000 ALTER TABLE `has_degree` DISABLE KEYS */;
INSERT INTO `has_degree` VALUES ('Artificial Intelligence',' Cambrigde University','zazahir23',2008,8.0),('Big Data and Analytics',' Imperial College London','jennyk',2006,8.0),('Big Data Structures and Algorithms','Technical University of Denmark','miltH',2008,8.2),('Computer and Infromatics Eng.',' Patras University','cleogeo',2003,8.6),('Computer Science and Engineering','Delft University of Technology','mnikol',2000,8.2),('Computer Science Dipl.','Lancster University','liagourma',2001,8.4),('Computer Vision and Modelling','Princeton University','jennyk',2006,7.4),('Computer Vision and Modelling','Princeton University','kwstasneo',2001,8.5),('Data Science Bachelor','Eindhoven University of Technology','jennyk',2004,9.2),('Electrical and Computer Eng.','Metsovio Polytexneio','kwstasneo',1998,7.6),('Lysium certificate','2nd Lysium of Aigaleo','mnikol',1999,19.2),('NLP related high efficiency algorithms','Patras University','liagourma',2013,9.0),('PDEng Data Science','Eindhoven University of Technology','elenineo',2006,9.0);
/*!40000 ALTER TABLE `has_degree` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `job`
--
DROP TABLE IF EXISTS `job`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `job` (
`id` int NOT NULL,
`start_date` date NOT NULL,
`salary` float(6,1) DEFAULT NULL,
`position` varchar(40) DEFAULT NULL,
`edra` varchar(45) DEFAULT NULL,
`evaluator` varchar(12) NOT NULL,
`announce_date` datetime DEFAULT CURRENT_TIMESTAMP,
`submission_date` date NOT NULL,
PRIMARY KEY (`id`),
KEY `JOBEVLTR` (`evaluator`),
CONSTRAINT `JOBEVLTR` FOREIGN KEY (`evaluator`) REFERENCES `evaluator` (`username`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=greek;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `job`
--
LOCK TABLES `job` WRITE;
/*!40000 ALTER TABLE `job` DISABLE KEYS */;
INSERT INTO `job` VALUES (1,'2019-01-01',1800.0,'data analyst','Patra, Greece','hlgeor','2018-07-13 10:00:00','2018-12-20'),(111,'2019-02-01',1450.0,'web programmer','Patra, Greece','vlasster','2018-07-13 11:00:00','2019-01-10'),(123,'2019-03-01',2100.0,'Graphics designer','Peiraias, Greece','adonkab','2018-10-10 00:00:00','2019-02-01'),(147,'2019-05-01',1850.0,'DB expert','Athina, Greece','vlasster','2018-11-20 00:00:00','2019-04-12'),(258,'2019-04-01',2100.0,'AI expert','Sofia, Bulgaria','akisgoud','2018-11-21 00:00:00','2019-03-10'),(272,'2018-07-22',2389.0,'ML expert','Thessaloniki,Greece','hlgeor','2021-02-11 20:52:56','2019-10-29'),(321,'0201-03-01',2300.0,'Visualization expert','Peiraias, Greece','dionkok','2018-10-20 00:00:00','2019-01-10'),(369,'2019-02-01',2600.0,'Algorithmic efficiency expert','Sofia, Bulgaria','efstang','2018-11-01 00:00:00','2019-01-16'),(456,'2019-02-01',2100.0,'mobile app developer','Patra, Greece','akisgoud','2018-10-24 12:00:00','2018-01-12'),(654,'2019-05-01',1850.0,'web and mobile app programmer','Athina, Greece','swtirzan','2018-11-20 00:00:00','2019-04-12'),(789,'2018-12-25',2700.0,'NLP expert','Peiraias, Greece','efstang','2018-10-10 00:00:00','2018-11-10'),(963,'2019-03-01',2800.0,'web and media programmer','Oxford, London','adonkab','2018-11-01 00:00:00','2019-01-03'),(987,'2019-05-01',1600.0,'graphics expert','Athina, Greece','hlgeor','2018-11-20 00:00:00','2019-04-12');
/*!40000 ALTER TABLE `job` ENABLE KEYS */;
UNLOCK TABLES;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8mb4 */ ;
/*!50003 SET character_set_results = utf8mb4 */ ;
/*!50003 SET collation_connection = utf8mb4_0900_ai_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `inserting_intojob` BEFORE INSERT ON `job` FOR EACH ROW BEGIN
IF(NEW.id IN (SELECT id FROM job))
THEN
INSERT INTO log
VALUES(@useronoma,CURRENT_TIMESTAMP,'NO','INSERT','job');
ELSE
INSERT INTO log
VALUES(@useronoma,CURRENT_TIMESTAMP,'YES','INSERT','job');
END IF;
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8mb4 */ ;
/*!50003 SET character_set_results = utf8mb4 */ ;
/*!50003 SET collation_connection = utf8mb4_0900_ai_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `updatingtable_job` BEFORE UPDATE ON `job` FOR EACH ROW BEGIN
IF(NEW.id=OLD.id AND NEW.start_date=OLD.start_date AND NEW.salary=OLD.salary AND NEW.position=OLD.position AND OLD.edra=NEW.edra AND OLD.evaluator=NEW.evaluator
AND NEW.announce_date=OLD.announce_date AND NEW.submission_date=OLD.submission_date) THEN
INSERT INTO log
VALUES(@useronoma,CURRENT_TIMESTAMP,'NO','UPDATE','job');
ELSE
INSERT INTO log
VALUES(@useronoma,CURRENT_TIMESTAMP,'YES','UPDATE','job');
END IF;
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8mb4 */ ;
/*!50003 SET character_set_results = utf8mb4 */ ;
/*!50003 SET collation_connection = utf8mb4_0900_ai_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `deletingfrom_job` BEFORE DELETE ON `job` FOR EACH ROW BEGIN
IF(OLD.id NOT IN (SELECT id FROM job)) THEN
INSERT INTO log
VALUES(@useronoma,CURRENT_TIMESTAMP,'NO','DELETE','job');
ELSE
INSERT INTO log
VALUES(@useronoma,CURRENT_TIMESTAMP,'YES','DELETE','job');
END IF;
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
--
-- Table structure for table `languages`
--
DROP TABLE IF EXISTS `languages`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `languages` (
`employee` varchar(12) NOT NULL,
`lang` set('EN','FR','SP','GR') NOT NULL,
PRIMARY KEY (`employee`,`lang`),
CONSTRAINT `EMPLLANG` FOREIGN KEY (`employee`) REFERENCES `employee` (`username`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=greek;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `languages`
--
LOCK TABLES `languages` WRITE;
/*!40000 ALTER TABLE `languages` DISABLE KEYS */;
INSERT INTO `languages` VALUES ('abrown','EN,GR'),('cleogeo','FR,GR'),('elenineo','EN,FR'),('jennyk','SP,GR'),('kwstasneo','EN,GR'),('liagourma','FR'),('lionarF','EN,GR'),('miltH','EN,GR'),('mnikol','EN,SP,GR'),('msmith','EN,FR,SP,GR'),('zazahir23','EN,FR,SP');
/*!40000 ALTER TABLE `languages` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `log`
--
DROP TABLE IF EXISTS `log`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `log` (
`username_xrhsth` varchar(12) DEFAULT NULL,
`Date_time` datetime DEFAULT NULL,
`ektelesi` enum('YES','NO') NOT NULL,
`typeofaction` varchar(10) NOT NULL,
`table_name` varchar(25) NOT NULL,
KEY `LOG_USER` (`username_xrhsth`),
CONSTRAINT `LOG_USER` FOREIGN KEY (`username_xrhsth`) REFERENCES `user` (`username`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=greek;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `log`
--
LOCK TABLES `log` WRITE;
/*!40000 ALTER TABLE `log` DISABLE KEYS */;
INSERT INTO `log` VALUES (NULL,'2021-01-24 16:02:05','YES','UPDATE','job'),(NULL,'2021-01-24 16:07:17','NO','UPDATE','job'),(NULL,'2021-01-24 16:22:32','YES','UPDATE','employee'),(NULL,'2021-01-24 16:23:53','NO','UPDATE','employee'),(NULL,'2021-01-24 16:35:01','YES','UPDATE','requestsevaluation'),(NULL,'2021-01-24 16:35:42','NO','UPDATE','requestsevaluation'),(NULL,'2021-01-24 17:05:54','YES','UPDATE','job'),(NULL,'2021-01-24 19:54:03','YES','UPDATE','employee'),(NULL,'2021-01-24 22:29:40','YES','UPDATE','job'),(NULL,'2021-01-24 22:29:40','YES','UPDATE','job'),(NULL,'2021-01-24 22:36:07','YES','UPDATE','job'),(NULL,'2021-01-24 22:36:37','YES','UPDATE','job'),(NULL,'2021-01-24 23:27:29','YES','UPDATE','job'),('nikipap','2021-01-24 23:47:23','YES','UPDATE','job'),(NULL,'2021-01-24 23:52:21','YES','UPDATE','employee'),('nikipap','2021-01-24 23:53:53','NO','UPDATE','employee'),('nikipap','2021-01-24 23:54:04','YES','UPDATE','employee'),(NULL,'2021-01-26 00:11:10','YES','UPDATE','job'),(NULL,'2021-01-26 00:12:10','YES','UPDATE','job'),('elenineo','2021-01-26 01:09:19','YES','UPDATE','employee'),('elenineo','2021-01-26 01:11:22','YES','UPDATE','employee'),(NULL,'2021-01-26 12:12:16','YES','UPDATE','employee'),(NULL,'2021-01-26 12:13:16','YES','UPDATE','employee'),('hlgeor','2021-01-26 14:28:06','YES','INSERT','requestsevaluation'),('hlgeor','2021-01-26 14:28:48','YES','INSERT','requestsevaluation'),('hlgeor','2021-01-26 14:29:00','NO','INSERT','requestsevaluation'),('hlgeor','2021-01-27 17:18:52','YES','UPDATE','job'),('hlgeor','2021-01-27 17:19:41','YES','UPDATE','job'),(NULL,'2021-01-27 17:33:05','YES','UPDATE','job'),(NULL,'2021-01-27 17:33:30','YES','UPDATE','job'),(NULL,'2021-01-27 18:49:07','YES','UPDATE','employee'),(NULL,'2021-01-27 18:49:11','NO','UPDATE','employee'),(NULL,'2021-01-27 18:49:43','YES','UPDATE','employee'),(NULL,'2021-01-27 18:53:57','NO','INSERT','requestsevaluation'),(NULL,'2021-01-27 18:57:38','NO','INSERT','requestsevaluation'),(NULL,'2021-01-27 18:57:43','NO','INSERT','requestsevaluation'),(NULL,'2021-01-27 19:01:55','NO','INSERT','requestsevaluation'),(NULL,'2021-01-27 19:08:32','YES','INSERT','requestsevaluation'),(NULL,'2021-01-28 01:25:00','YES','INSERT','employee'),(NULL,'2021-01-29 02:48:37','YES','INSERT','job'),(NULL,'2021-02-11 17:57:17','YES','UPDATE','job'),(NULL,'2021-02-11 18:04:41','YES','UPDATE','job'),(NULL,'2021-02-11 18:08:08','YES','UPDATE','job'),(NULL,'2021-02-11 18:41:07','YES','UPDATE','job'),(NULL,'2021-02-11 20:52:56','YES','UPDATE','job'),(NULL,'2021-02-12 00:05:11','YES','UPDATE','employee'),(NULL,'2021-02-12 00:06:05','YES','UPDATE','employee'),('elenineo','2021-02-12 00:10:42','YES','UPDATE','job'),('elenineo','2021-02-12 00:11:03','YES','UPDATE','job'),(NULL,'2021-02-12 00:14:41','YES','UPDATE','employee'),(NULL,'2021-02-12 00:15:10','YES','UPDATE','employee'),('elenineo','2021-02-12 00:18:15','YES','UPDATE','employee'),('elenineo','2021-02-12 00:18:48','YES','UPDATE','employee');
/*!40000 ALTER TABLE `log` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `manager`
--
DROP TABLE IF EXISTS `manager`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `manager` (
`managerUsername` varchar(12) NOT NULL,
`exp_years` tinyint DEFAULT NULL,
`firm` char(9) NOT NULL,
PRIMARY KEY (`managerUsername`),
KEY `MANAGERCMP` (`firm`),
CONSTRAINT `MANAGERCMP` FOREIGN KEY (`firm`) REFERENCES `company` (`AFM`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `MANAGERUSR` FOREIGN KEY (`managerUsername`) REFERENCES `user` (`username`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=greek;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `manager`
--
LOCK TABLES `manager` WRITE;
/*!40000 ALTER TABLE `manager` DISABLE KEYS */;
INSERT INTO `manager` VALUES ('lolapol',4,'561234561'),('nikipap',6,'18765549'),('nikospap',2,'023453344'),('panxrist',5,'023451232'),('ptolkor',5,'05694712'),('stavroskost',9,'23122345'),('Theoxrist',1,'123432211'),('vasmitr',3,'561234561');
/*!40000 ALTER TABLE `manager` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `needs`
--
DROP TABLE IF EXISTS `needs`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `needs` (
`job_id` int NOT NULL,
`antikeim_title` varchar(36) NOT NULL,
PRIMARY KEY (`job_id`,`antikeim_title`),
KEY `NEEDSANTIK` (`antikeim_title`),
CONSTRAINT `JOBNEEDS` FOREIGN KEY (`job_id`) REFERENCES `job` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `NEEDSANTIK` FOREIGN KEY (`antikeim_title`) REFERENCES `antikeim` (`title`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=greek;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `needs`
--
LOCK TABLES `needs` WRITE;
/*!40000 ALTER TABLE `needs` DISABLE KEYS */;
INSERT INTO `needs` VALUES (258,'2D'),(963,'3D'),(123,'AI'),(456,'AI'),(1,'Algorithms'),(147,'Algorithms'),(654,'Algorithms'),(111,'Animation'),(789,'Animation'),(789,'Complexity and Efficiency'),(1,'Databases'),(963,'Databases'),(321,'Graphics'),(654,'Graphics'),(272,'Machine Learning'),(147,'Mobile Apps'),(369,'Mobile Apps'),(456,'Mobile Apps'),(321,'NLP'),(963,'NoSQL DBs'),(111,'Programming'),(987,'Programming'),(258,'Web Programming'),(456,'Web Programming'),(987,'Web Programming');
/*!40000 ALTER TABLE `needs` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `project`
--
DROP TABLE IF EXISTS `project`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `project` (
`empl` varchar(12) NOT NULL,
`num` tinyint NOT NULL,
`descr` text NOT NULL,
`url` varchar(60) DEFAULT NULL,
PRIMARY KEY (`empl`,`num`),
CONSTRAINT `PROJEMPL` FOREIGN KEY (`empl`) REFERENCES `employee` (`username`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=greek;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `project`
--
LOCK TABLES `project` WRITE;
/*!40000 ALTER TABLE `project` DISABLE KEYS */;
INSERT INTO `project` VALUES ('elenineo',1,'Essential Cheat Sheets for deep learning and machine learning researchers','https://github.com/elenineo/cheatsheets-ai'),('elenineo',2,'Python sample codes for robotics algorithms.','https://github.com/elenineo/PythonRobotics'),('jennyk',1,'HTML5 Mobile App UI templates created using Intel App Framework.','https://github.com/jenny/appframework-templates'),('jennyk',2,'Mobile Version of Travel sample App using Couchbase Lite 2.0.','https://github.com/jenny/mobile-travel-sample'),('jennyk',3,'Appium Demo App with clearly defined Page Object Pattern for React Native Mobile App. Test Language - Javascript.','https://github.com/jenny/Appium-Page-Object-Model-Demo'),('miltH',1,'WebGL2 powered geospatial visualization layers. offers an extensive catalog of pre-packaged visualization \"layers\", including ScatterplotLayer, ArcLayer, TextLayer, GeoJsonLayer, etc. The input to a layer is usually an array of JSON objects. Each layer offers highly-flexible API to customize how the data should be rendered.','https://github.com/milti/deck.gl'),('miltH',2,'Messy datasets? Missing values? missingno provides a small toolset of flexible and easy-to-use missing data visualizations and utilities that allows a quick visual summary of the completeness (or lack thereof) of the dataset.','https://github.com/milti/missingno'),('miltH',3,'Repository to track the progress in Natural Language Processing (NLP), including the datasets and the current state-of-the-art for the most common NLP tasks','https://github.com/milti/NLP-progress'),('miltH',4,'Supporting Rapid Prototyping with a Toolkit (incl. Datasets and Neural Network Layers)','https://github.com/milti/PyTorch-NLP'),('mnikol',1,'Minimal examples of data structures and algorithms in Python','https://github.com/mnikol/algorithms'),('mnikol',2,'Interactive Online Platform that Visualizes Algorithms from Code','https://github.com/mnikol/algorithm-visualizer'),('mnikol',3,'Repository which contains links and resources on different topics of Computer Science','https://github.com/mnikol/AlgoWiki'),('zazahir23',1,'Go Graphics - 2D rendering in Go with a simple API.','https://github.com/mob@s/gg'),('zazahir23',2,'Draco is a library for compressing and decompressing 3D geometric meshes and point clouds. It is intended to improve the storage and transmission of 3D graphics.','https://github.com/mob@s/draco'),('zazahir23',3,'Data Discovery and Lineage for Big Data Ecosystem.','https://github.com/linkedin/WhereHows');
/*!40000 ALTER TABLE `project` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `promotion`
--
DROP TABLE IF EXISTS `promotion`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `promotion` (
`manag_username` varchar(12) NOT NULL,
`evaluat_username` varchar(12) NOT NULL,
`id_job` int NOT NULL,
PRIMARY KEY (`manag_username`,`evaluat_username`,`id_job`),
KEY `PROM_EVAL` (`evaluat_username`),
KEY `PROM_JO` (`id_job`),
CONSTRAINT `PROM_EVAL` FOREIGN KEY (`evaluat_username`) REFERENCES `evaluator` (`username`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `PROM_JO` FOREIGN KEY (`id_job`) REFERENCES `job` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `PROM_MANAG` FOREIGN KEY (`manag_username`) REFERENCES `manager` (`managerUsername`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=greek;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `promotion`
--
LOCK TABLES `promotion` WRITE;
/*!40000 ALTER TABLE `promotion` DISABLE KEYS */;
INSERT INTO `promotion` VALUES ('nikospap','hlgeor',1),('panxrist','vlasster',111),('vasmitr','dionkok',123),('nikipap','hlgeor',272),('nikipap','efstang',369),('ptolkor','akisgoud',456),('nikipap','swtirzan',654),('Theoxrist','efstang',789),('stavroskost','adonkab',963);
/*!40000 ALTER TABLE `promotion` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `requestsevaluation`
--
DROP TABLE IF EXISTS `requestsevaluation`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `requestsevaluation` (
`empl_usrname` varchar(12) NOT NULL,
`job_id` int NOT NULL,
PRIMARY KEY (`empl_usrname`,`job_id`),
KEY `EVALJ` (`job_id`),
CONSTRAINT `EVALEMPLOY` FOREIGN KEY (`empl_usrname`) REFERENCES `employee` (`username`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `EVALJ` FOREIGN KEY (`job_id`) REFERENCES `job` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=greek;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `requestsevaluation`
--
LOCK TABLES `requestsevaluation` WRITE;
/*!40000 ALTER TABLE `requestsevaluation` DISABLE KEYS */;
INSERT INTO `requestsevaluation` VALUES ('abrown',1),('lionarF',1),('mnikol',111),('elenineo',123),('msmith',123),('cleogeo',147),('zazahir23',369),('liagourma',456),('jennyk',654),('kwstasneo',654),('miltH',963);
/*!40000 ALTER TABLE `requestsevaluation` ENABLE KEYS */;
UNLOCK TABLES;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8mb4 */ ;
/*!50003 SET character_set_results = utf8mb4 */ ;
/*!50003 SET collation_connection = utf8mb4_0900_ai_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `insertinginto_requestsevaluation` BEFORE INSERT ON `requestsevaluation` FOR EACH ROW BEGIN
IF(NEW.empl_usrname IN (SELECT empl_usrname FROM requestsevaluation) AND NEW.job_id IN (SELECT job_id FROM requestsevaluation) )
THEN
INSERT INTO log
VALUES(@useronoma,CURRENT_TIMESTAMP,'NO','INSERT','requestsevaluation');
ELSE
INSERT INTO log
VALUES(@useronoma,CURRENT_TIMESTAMP,'YES','INSERT','requestsevaluation');
END IF;
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8mb4 */ ;
/*!50003 SET character_set_results = utf8mb4 */ ;
/*!50003 SET collation_connection = utf8mb4_0900_ai_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `updatingtable_requestsevaluation` BEFORE UPDATE ON `requestsevaluation` FOR EACH ROW BEGIN
IF(NEW.empl_usrname=OLD.empl_usrname AND NEW.job_id=OLD.job_id) THEN
INSERT INTO log
VALUES(@useronoma ,CURRENT_TIMESTAMP,'NO','UPDATE','requestsevaluation');
ELSE
INSERT INTO log
VALUES(@useronoma ,CURRENT_TIMESTAMP,'YES','UPDATE','requestsevaluation');
END IF;
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8mb4 */ ;
/*!50003 SET character_set_results = utf8mb4 */ ;
/*!50003 SET collation_connection = utf8mb4_0900_ai_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `deletingfrom_requestsevaluation` BEFORE DELETE ON `requestsevaluation` FOR EACH ROW BEGIN
IF(OLD.empl_usrname AND OLD.job_id NOT IN (SELECT empl_usrname FROM requestsevaluation)) THEN
INSERT INTO log
VALUES(@useronoma ,CURRENT_TIMESTAMP,'NO','DELETE','requestsevaluation');
ELSE
INSERT INTO log
VALUES(@useronoma ,CURRENT_TIMESTAMP,'YES','DELETE','requestsevaluation');
END IF;
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
--
-- Table structure for table `requestspromotion`
--
DROP TABLE IF EXISTS `requestspromotion`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `requestspromotion` (
`emplo_username` varchar(12) NOT NULL,
`jobID` int NOT NULL,
PRIMARY KEY (`emplo_username`,`jobID`),
KEY `EVALJOB` (`jobID`),
CONSTRAINT `EVALEMPLO` FOREIGN KEY (`emplo_username`) REFERENCES `employee` (`username`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `EVALJOB` FOREIGN KEY (`jobID`) REFERENCES `job` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=greek;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `requestspromotion`
--
LOCK TABLES `requestspromotion` WRITE;
/*!40000 ALTER TABLE `requestspromotion` DISABLE KEYS */;
INSERT INTO `requestspromotion` VALUES ('cleogeo',1),('elenineo',1),('abrown',111),('elenineo',111),('elenineo',123),('elenineo',456),('mnikol',456),('elenineo',654),('elenineo',789),('elenineo',963);
/*!40000 ALTER TABLE `requestspromotion` ENABLE KEYS */;
UNLOCK TABLES;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8mb4 */ ;
/*!50003 SET character_set_results = utf8mb4 */ ;
/*!50003 SET collation_connection = utf8mb4_0900_ai_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `applyingforjob_promotion` BEFORE INSERT ON `requestspromotion` FOR EACH ROW BEGIN
IF NEW.job_id NOT IN (SELECT id_job FROM promotion WHERE id_job=NEW.job_id)
THEN
SIGNAL SQLSTATE VALUE '45000'
SET MESSAGE_TEXT = 'There is no promotion for this job.';
END IF;
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
--
-- Table structure for table `user`
--
DROP TABLE IF EXISTS `user`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `user` (
`username` varchar(12) NOT NULL,
`password` varchar(10) DEFAULT NULL,
`name` varchar(25) NOT NULL DEFAULT 'unknown',
`surname` varchar(35) NOT NULL DEFAULT 'unknown',
`reg_date` datetime DEFAULT NULL,
`email` varchar(30) NOT NULL,
PRIMARY KEY (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=greek;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `user`
--
LOCK TABLES `user` WRITE;
/*!40000 ALTER TABLE `user` DISABLE KEYS */;
INSERT INTO `user` VALUES ('abrown','w1lcoxon','Andrew','McBrown','2018-01-27 16:02:56','andrewbr@yahoo.com'),('adonkab','kab78','Adonis','Kabouris','2010-01-01 10:16:20','adon@mail.gr'),('akisgoud','we341','Akis','Goudis','2008-06-17 13:15:00','ak@hotmail.com'),('cleogeo','upL34r','Cleomenis','Georgiadis','2018-02-13 12:23:34','cleom17@gmail.com'),('dionkok','67kok','Dionisios','Kokkinakis','2000-02-12 16:00:41','dionk@hotmail.com'),('efstang','ef38','Efstathios','Anagnwstakis','2006-05-14 15:20:59','anagef@yahoo.gr'),('elefasla','555','Eleftheria','Aslanoglou','2021-01-28 00:47:56','eleftheria@yahoo.gr'),('elenineo','369','Eleni','Neofytou','2016-01-06 14:50:00','neofytoue@gmail.com'),('hlgeor','hlias90','Hlias','Georgiadis','2003-02-12 12:00:21','hl20@mail.com'),('iosifzax','543','Iosif','Zaxariou','2007-01-08 11:00:00','zaxar@mail.com'),('jennyk','k555','Jenny','Kiriakou','2013-03-20 20:21:00','jenkir@gmail.com'),('kwstasneo','2149','Neofytos','Kwstas','2005-03-14 16:10:00','neofytos@gmail.com'),('liagourma','sionpass','Maria','Liagkoumi','2018-05-22 17:03:01','mliagkr@gmail.com'),('lionarF','erg2378','Freddy','Lionar','2018-10-07 20:09:10','Lionarfre@ezra.co.uk'),('lolapol','wait1','Lola','Politi','2021-01-28 00:24:58','lolapol@gmail.com'),('mairypap','646','Mairy','Papas','2006-12-05 14:05:00','mapapado@yahoo.com'),('marzax','348','Maria','Zaxariou','2011-02-20 17:00:00','zaxarm@mail.com'),('miltH','milto95','Miltiadis','Hristidis','2019-07-22 16:51:32','miltiadis@yahoo.com'),('mnikol','m@n0lis','Manolis','Nikopoloulos','2017-11-08 21:07:12','nikolp@gmail.com'),('msmith','lol123','Mike','Smith','2014-02-01 17:00:00','msmith@hotmail.com'),('nikipap','343','Niki','Papadopoulou','2010-04-03 14:00:00','papadopoulou@gmail.com'),('nikospap','1123','Nikos','Papadopoulos','1992-10-02 12:00:00','papadop@gmail.com'),('niktsakon','n1k@s','Nikitas','Tsakonas','2021-01-28 01:25:00','nikitastsak@hotmail.com'),('panxrist','112','Panagioths','Xristopoulos','1995-05-20 14:00:00','xristo@mail.com'),('ptolkor','222','Ptolemaios','Koromilas','2003-05-16 14:10:00','koromilas@yahoo.com'),('stavroskost','166','Stavros','Kostopoulos','2004-09-25 09:00:00','kostopoulos@hotmail.com'),('swtirzan','swt235','Swtiris','Zanos','2007-03-12 18:05:30','swtiris@yahoo.com'),('Theoxrist','253','Theodwra','Xristou','2001-11-12 12:21:00','theodxristo@gmail.com'),('vasmitr','515','Vasiliki','Dimitriou','2009-02-20 13:00:00','dimitr@hotmail.com'),('vlasster','sterr','Vlassis','Stergiou','2005-12-25 14:20:00','stervl@gmail.gr'),('xristanag','764','Xristina','Anagnwstopoulou','2011-09-01 10:00:00','anagnos@hotmail.gr'),('zazahir23','zoolhger','Ahmet','Mobasher-Hirs','2017-05-11 14:08:23','ahmetTech@yahoo.com');
/*!40000 ALTER TABLE `user` ENABLE KEYS */;
UNLOCK TABLES;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8mb4 */ ;
/*!50003 SET character_set_results = utf8mb4 */ ;
/*!50003 SET collation_connection = utf8mb4_0900_ai_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `usercannotchangefields` BEFORE UPDATE ON `user` FOR EACH ROW BEGIN
IF (@useronoma IN (SELECT managerUsername FROM manager)) THEN
SET NEW.username=OLD.username;
SET NEW.name=OLD.name;
SET NEW.surname=OLD.surname;
SET NEW.reg_date=OLD.reg_date;
ELSEIF(@useronoma IN (SELECT username FROM evaluator)) THEN
SET NEW.username=OLD.username;
ELSEIF(@useronoma IN (SELECT username FROM employee)) THEN
SET NEW.email=OLD.email;
SET NEW.username=OLD.username;
SET NEW.name=OLD.name;
SET NEW.surname=OLD.surname;
SET NEW.reg_date=OLD.reg_date;
ELSEIF(@useronoma IN (SELECT username FROM administrator)) THEN
SET NEW.username=OLD.username;
END IF;
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
--
-- Dumping routines for database 'staffevaluation'
--
/*!50003 DROP PROCEDURE IF EXISTS `admininsert_employee` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8mb4 */ ;
/*!50003 SET character_set_results = utf8mb4 */ ;
/*!50003 SET collation_connection = utf8mb4_0900_ai_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `admininsert_employee`(IN e_username varchar(12),IN e_password varchar(10),IN e_name varchar(25),IN e_surname varchar(35) ,IN e_email varchar(30),IN e_exp_years INT,IN e_bio text,IN e_sistatikes varchar(35),IN e_certificates varchar(35),IN e_awards varchar(35),IN e_firm char(9))
BEGIN
INSERT INTO user
VALUES(e_username,e_password,e_name,e_surname,CURRENT_TIMESTAMP,e_email);
INSERT INTO employee
VALUES(e_username,e_exp_years,e_bio,e_sistatikes,e_certificates,e_awards,e_firm);
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
/*!50003 DROP PROCEDURE IF EXISTS `admininsert_evaluator` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8mb4 */ ;
/*!50003 SET character_set_results = utf8mb4 */ ;
/*!50003 SET collation_connection = utf8mb4_0900_ai_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `admininsert_evaluator`(IN eval_username varchar(12),IN eval_password varchar(10),IN eval_name varchar(25),IN eval_surname varchar(35) ,IN eval_email varchar(30),IN eval_exp_years INT,IN eval_firm char(9))
BEGIN
INSERT INTO user
VALUES(eval_username,eval_password,eval_name,eval_surname,CURRENT_TIMESTAMP,eval_email);
INSERT INTO evaluator
VALUES(eval_username,eval_exp_years,eval_firm);
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
/*!50003 DROP PROCEDURE IF EXISTS `admininsert_manager` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8mb4 */ ;
/*!50003 SET character_set_results = utf8mb4 */ ;
/*!50003 SET collation_connection = utf8mb4_0900_ai_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `admininsert_manager`(IN man_username varchar(12),IN password varchar(10),IN name varchar(25),IN surname varchar(35) ,IN email varchar(30),IN exp_years INT,IN firm char(9))
BEGIN
INSERT INTO user
VALUES(man_username,password,name,surname,CURRENT_TIMESTAMP,email);
INSERT INTO manager
VALUES(man_username,exp_years,firm);
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
/*!50003 DROP PROCEDURE IF EXISTS `aitiseis_aksiologiseis_evaluatorOfEmployee` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8mb4 */ ;
/*!50003 SET character_set_results = utf8mb4 */ ;
/*!50003 SET collation_connection = utf8mb4_0900_ai_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `aitiseis_aksiologiseis_evaluatorOfEmployee`(IN Name varchar(25), IN SurName varchar(35))