﻿-- DICTIONARY
ALTER TABLE [DBO].T_DKT_ALKALMAZOTTBEALLITAS 
  ADD CONSTRAINT FK_DKT_AlkalmazottBeallitas_AvatarTipusId_IntezmenyId_TanevId_REF_DKT_DIC_AvatarTipus 
  FOREIGN KEY (C_AVATARTIPUSID, C_INTEZMENYID, C_TANEVID) 
  REFERENCES [dbo].T_DKT_DIC_AVATARTIPUS (ID, C_INTEZMENYID, C_TANEVID)
GO

ALTER TABLE [DBO].T_DKT_ALKALMAZOTTBEALLITAS 
  ADD CONSTRAINT FK_DKT_AlkalmazottBeallitas_CsakTanarIrhatUzenofalraTipusId_IntezmenyId_TanevId_REF_DKT_DIC_CsakTanarIrhatUzenofalraTipus 
  FOREIGN KEY (C_CSAKTANARIRHATUZENOFALRATIPU, C_INTEZMENYID, C_TANEVID) 
  REFERENCES [dbo].T_DKT_DIC_CSAKTANARIRHATUZENOFALRATIPUS (ID, C_INTEZMENYID, C_TANEVID)
GO

ALTER TABLE [DBO].T_DKT_ALKALMAZOTTBEALLITAS 
  ADD CONSTRAINT FK_DKT_AlkalmazottBeallitas_HfBeadandoTipusId_IntezmenyId_TanevId_REF_DKT_DIC_HfBeadandoTipus 
  FOREIGN KEY (C_HFBEADANDOTIPUSID, C_INTEZMENYID, C_TANEVID) 
  REFERENCES [dbo].T_DKT_DIC_HFBEADANDOTIPUS (ID, C_INTEZMENYID, C_TANEVID)
GO

ALTER TABLE [DBO].T_DKT_ALKALMAZOTTBEALLITAS 
  ADD CONSTRAINT FK_DKT_AlkalmazottBeallitas_HfCsatolasEngedelyezesTipusId_IntezmenyId_TanevId_REF_DKT_DIC_HfCsatolasEngedelyezesTipus 
  FOREIGN KEY (C_HFCSATOLASENGEDELYEZESTIPUSI, C_INTEZMENYID, C_TANEVID) 
  REFERENCES [dbo].T_DKT_DIC_HFCSATOLASENGEDELYEZESTIPUS (ID, C_INTEZMENYID, C_TANEVID)
GO

ALTER TABLE [DBO].T_DKT_ALKALMAZOTTBEALLITAS 
  ADD CONSTRAINT FK_DKT_AlkalmazottBeallitas_HfEloreBeirtFeladatMegjeleniteseId_IntezmenyId_TanevId_REF_DKT_DIC_HfEloreBeirtFeladatMegjelenitese 
  FOREIGN KEY (C_HFELOREBEIRTFELADATMEGJELENI, C_INTEZMENYID, C_TANEVID) 
  REFERENCES [dbo].T_DKT_DIC_HFELOREBEIRTFELADATMEGJELENITESE (ID, C_INTEZMENYID, C_TANEVID)
GO

ALTER TABLE [DBO].T_DKT_ALKALMAZOTTBEALLITAS 
  ADD CONSTRAINT FK_DKT_AlkalmazottBeallitas_HfErteklesTipusId_IntezmenyId_TanevId_REF_DKT_DIC_HfErteklesTipus 
  FOREIGN KEY (C_HFERTEKLESTIPUSID, C_INTEZMENYID, C_TANEVID) 
  REFERENCES [dbo].T_DKT_DIC_HFERTEKLESTIPUS (ID, C_INTEZMENYID, C_TANEVID)
GO

ALTER TABLE [DBO].T_DKT_ALKALMAZOTTBEALLITAS 
  ADD CONSTRAINT FK_DKT_AlkalmazottBeallitas_HfUzenofalEngedelyezesTipusId_IntezmenyId_TanevId_REF_DKT_DIC_HfUzenofalEngedelyezesTipus 
  FOREIGN KEY (C_HFUZENOFALENGEDELYEZESTIPUSI, C_INTEZMENYID, C_TANEVID) 
  REFERENCES [dbo].T_DKT_DIC_HFUZENOFALENGEDELYEZESTIPUS (ID, C_INTEZMENYID, C_TANEVID)
GO

ALTER TABLE [DBO].T_DKT_ALKALMAZOTTBEALLITAS 
  ADD CONSTRAINT FK_DKT_AlkalmazottBeallitas_MindenUzenetKozpontiFalonTipusId_IntezmenyId_TanevId_REF_DKT_DIC_MindenUzenetKozpontiFalonTipus 
  FOREIGN KEY (C_MINDENUZENETKOZPONTIFALONTIP, C_INTEZMENYID, C_TANEVID) 
  REFERENCES [dbo].T_DKT_DIC_MINDENUZENETKOZPONTIFALONTIPUS (ID, C_INTEZMENYID, C_TANEVID)
GO

ALTER TABLE [DBO].T_DKT_ALKALMAZOTTBEALLITAS 
  ADD CONSTRAINT FK_DKT_AlkalmazottBeallitas_OfBeadandoTipusId_IntezmenyId_TanevId_REF_DKT_DIC_OfBeadandoTipus 
  FOREIGN KEY (C_OFBEADANDOTIPUSID, C_INTEZMENYID, C_TANEVID) 
  REFERENCES [dbo].T_DKT_DIC_OFBEADANDOTIPUS (ID, C_INTEZMENYID, C_TANEVID)
GO

ALTER TABLE [DBO].T_DKT_ALKALMAZOTTBEALLITAS 
  ADD CONSTRAINT FK_DKT_AlkalmazottBeallitas_OfCsatolasEngedelyezesTipusId_IntezmenyId_TanevId_REF_DKT_DIC_OfCsatolasEngedelyezesTipus 
  FOREIGN KEY (C_OFCSATOLASENGEDELYEZESTIPUSI, C_INTEZMENYID, C_TANEVID) 
  REFERENCES [dbo].T_DKT_DIC_OFCSATOLASENGEDELYEZESTIPUS (ID, C_INTEZMENYID, C_TANEVID)
GO

ALTER TABLE [DBO].T_DKT_ALKALMAZOTTBEALLITAS 
  ADD CONSTRAINT FK_DKT_AlkalmazottBeallitas_OfEgyediErtekelesTipusId_IntezmenyId_TanevId_REF_DKT_DIC_OfEgyediErtekelesTipus 
  FOREIGN KEY (C_OFEGYEDIERTEKELESTIPUSID, C_INTEZMENYID, C_TANEVID) 
  REFERENCES [dbo].T_DKT_DIC_OFEGYEDIERTEKELESTIPUS (ID, C_INTEZMENYID, C_TANEVID)
GO

ALTER TABLE [DBO].T_DKT_ALKALMAZOTTBEALLITAS 
  ADD CONSTRAINT FK_DKT_AlkalmazottBeallitas_OfEloreBeirtFeladatMegjeleniteseId_IntezmenyId_TanevId_REF_DKT_DIC_OfEloreBeirtFeladatMegjelenitese 
  FOREIGN KEY (C_OFELOREBEIRTFELADATMEGJELENI, C_INTEZMENYID, C_TANEVID) 
  REFERENCES [dbo].T_DKT_DIC_OFELOREBEIRTFELADATMEGJELENITESE (ID, C_INTEZMENYID, C_TANEVID)
GO

ALTER TABLE [DBO].T_DKT_ALKALMAZOTTBEALLITAS 
  ADD CONSTRAINT FK_DKT_AlkalmazottBeallitas_OfErtekelesTipusId_IntezmenyId_TanevId_REF_DKT_DIC_OfErteklesTipus 
  FOREIGN KEY (C_OFERTEKELESTIPUSID, C_INTEZMENYID, C_TANEVID) 
  REFERENCES [dbo].T_DKT_DIC_OFERTEKLESTIPUS (ID, C_INTEZMENYID, C_TANEVID)
GO

ALTER TABLE [DBO].T_DKT_ALKALMAZOTTBEALLITAS 
  ADD CONSTRAINT FK_DKT_AlkalmazottBeallitas_OfUzenofalEngedelyezesTipusId_IntezmenyId_TanevId_REF_DKT_DIC_OfUzenofalEngedelyezesTipus 
  FOREIGN KEY (C_OFUZENOFALENGEDELYEZESTIPUSI, C_INTEZMENYID, C_TANEVID) 
  REFERENCES [dbo].T_DKT_DIC_OFUZENOFALENGEDELYEZESTIPUS (ID, C_INTEZMENYID, C_TANEVID)
GO

ALTER TABLE [DBO].T_DKT_TANULOFELADATBEADAS 
  ADD CONSTRAINT FK_DKT_TanuloFeladatbeadas_FeladatErtekelesTipusId_IntezmenyId_TanevId_REF_DKT_DIC_FeladatErtekelesTipus 
  FOREIGN KEY (C_FELADATERTEKELESTIPUSID, C_INTEZMENYID, C_TANEVID) 
  REFERENCES [dbo].T_DKT_DIC_FELADATERTEKELESTIPUS (ID, C_INTEZMENYID, C_TANEVID)
GO

ALTER TABLE [DBO].T_DKT_TANULOFELADATBEADAS 
  ADD CONSTRAINT FK_DKT_TanuloFeladatbeadas_TanuloFeladatbeadasStatuszId_IntezmenyId_TanevId_REF_DKT_DIC_TanuloFeladatbeadasStatusz 
  FOREIGN KEY (C_TANULOFELADATBEADASSTATUSZID, C_INTEZMENYID, C_TANEVID) 
  REFERENCES [dbo].T_DKT_DIC_TANULOFELADATBEADASSTATUSZ (ID, C_INTEZMENYID, C_TANEVID)
GO

ALTER TABLE [DBO].T_DKT_FELADAT 
  ADD CONSTRAINT FK_DKT_Feladat_FeladatErtekelesTipusId_IntezmenyId_TanevId_REF_DKT_DIC_FeladatErtekelesTipus 
  FOREIGN KEY (C_FELADATERTEKELESTIPUSID, C_INTEZMENYID, C_TANEVID) 
  REFERENCES [dbo].T_DKT_DIC_FELADATERTEKELESTIPUS (ID, C_INTEZMENYID, C_TANEVID)
GO

ALTER TABLE [DBO].T_DKT_FELADAT 
  ADD CONSTRAINT FK_DKT_Feladat_FeladatTipusId_IntezmenyId_TanevId_REF_DKT_DIC_FeladatTipus 
  FOREIGN KEY (C_FELADATTIPUSID, C_INTEZMENYID, C_TANEVID) 
  REFERENCES [dbo].T_DKT_DIC_FELADATTIPUS (ID, C_INTEZMENYID, C_TANEVID)
GO

ALTER TABLE [DBO].T_DKT_FELADAT 
  ADD CONSTRAINT FK_DKT_Feladat_HfBeadandoTipusId_IntezmenyId_TanevId_REF_DKT_DIC_HfBeadandoTipus 
  FOREIGN KEY (C_HFBEADANDOTIPUSID, C_INTEZMENYID, C_TANEVID) 
  REFERENCES [dbo].T_DKT_DIC_HFBEADANDOTIPUS (ID, C_INTEZMENYID, C_TANEVID)
GO

ALTER TABLE [DBO].T_DKT_FELADAT 
  ADD CONSTRAINT FK_DKT_Feladat_HfCsatolasEngedelyezesTipusId_IntezmenyId_TanevId_REF_DKT_DIC_HfCsatolasEngedelyezesTipus 
  FOREIGN KEY (C_HFCSATOLASENGEDELYEZESTIPUSI, C_INTEZMENYID, C_TANEVID) 
  REFERENCES [dbo].T_DKT_DIC_HFCSATOLASENGEDELYEZESTIPUS (ID, C_INTEZMENYID, C_TANEVID)
GO

ALTER TABLE [DBO].T_DKT_FELADAT 
  ADD CONSTRAINT FK_DKT_Feladat_HfEloreBeirtFeladatMegjeleniteseId_IntezmenyId_TanevId_REF_DKT_DIC_HfEloreBeirtFeladatMegjelenitese 
  FOREIGN KEY (C_HFELOREBEIRTFELADATMEGJELENI, C_INTEZMENYID, C_TANEVID) 
  REFERENCES [dbo].T_DKT_DIC_HFELOREBEIRTFELADATMEGJELENITESE (ID, C_INTEZMENYID, C_TANEVID)
GO

ALTER TABLE [DBO].T_DKT_FELADAT 
  ADD CONSTRAINT FK_DKT_Feladat_OfBeadandoTipusId_IntezmenyId_TanevId_REF_DKT_DIC_OfBeadandoTipus 
  FOREIGN KEY (C_OFBEADANDOTIPUSID, C_INTEZMENYID, C_TANEVID) 
  REFERENCES [dbo].T_DKT_DIC_OFBEADANDOTIPUS (ID, C_INTEZMENYID, C_TANEVID)
GO

ALTER TABLE [DBO].T_DKT_FELADAT 
  ADD CONSTRAINT FK_DKT_Feladat_OfCsatolasEngedelyezesTipusId_IntezmenyId_TanevId_REF_DKT_DIC_OfCsatolasEngedelyezesTipus 
  FOREIGN KEY (C_OFCSATOLASENGEDELYEZESTIPUSI, C_INTEZMENYID, C_TANEVID) 
  REFERENCES [dbo].T_DKT_DIC_OFCSATOLASENGEDELYEZESTIPUS (ID, C_INTEZMENYID, C_TANEVID)
GO

ALTER TABLE [DBO].T_DKT_FELADAT 
  ADD CONSTRAINT FK_DKT_Feladat_OfEloreBeirtFeladatMegjeleniteseId_IntezmenyId_TanevId_REF_DKT_DIC_OfEloreBeirtFeladatMegjelenitese 
  FOREIGN KEY (C_OFELOREBEIRTFELADATMEGJELENI, C_INTEZMENYID, C_TANEVID) 
  REFERENCES [dbo].T_DKT_DIC_OFELOREBEIRTFELADATMEGJELENITESE (ID, C_INTEZMENYID, C_TANEVID)
GO

-- NORMAL TABLA
ALTER TABLE [DBO].T_DKT_DIC_OFUZENOFALENGEDELYEZESTIPUS 
  ADD CONSTRAINT FK_DKT_DIC_OfUzenofalEngedelyezesTipus_IntezmenyId_REF_Intezmeny 
  FOREIGN KEY (C_INTEZMENYID) 
  REFERENCES [DBO].T_INTEZMENY (ID)
GO

ALTER TABLE [DBO].T_DKT_DIC_OFUZENOFALENGEDELYEZESTIPUS 
  ADD CONSTRAINT FK_DKT_DIC_OfUzenofalEngedelyezesTipus_TanevId_REF_Tanev 
  FOREIGN KEY (C_TANEVID) 
  REFERENCES [DBO].T_TANEV (ID)
GO

ALTER TABLE [DBO].T_DKT_DIC_OFCSATOLASENGEDELYEZESTIPUS 
  ADD CONSTRAINT FK_DKT_DIC_OfCsatolasEngedelyezesTipus_IntezmenyId_REF_Intezmeny 
  FOREIGN KEY (C_INTEZMENYID) 
  REFERENCES [DBO].T_INTEZMENY (ID)
GO

ALTER TABLE [DBO].T_DKT_DIC_OFCSATOLASENGEDELYEZESTIPUS 
  ADD CONSTRAINT FK_DKT_DIC_OfCsatolasEngedelyezesTipus_TanevId_REF_Tanev 
  FOREIGN KEY (C_TANEVID) 
  REFERENCES [DBO].T_TANEV (ID)
GO

ALTER TABLE [DBO].T_DKT_DIC_OFEGYEDIERTEKELESTIPUS 
  ADD CONSTRAINT FK_DKT_DIC_OfEgyediErtekelesTipus_IntezmenyId_REF_Intezmeny 
  FOREIGN KEY (C_INTEZMENYID) 
  REFERENCES [DBO].T_INTEZMENY (ID)
GO

ALTER TABLE [DBO].T_DKT_DIC_OFEGYEDIERTEKELESTIPUS 
  ADD CONSTRAINT FK_DKT_DIC_OfEgyediErtekelesTipus_TanevId_REF_Tanev 
  FOREIGN KEY (C_TANEVID) 
  REFERENCES [DBO].T_TANEV (ID)
GO

ALTER TABLE [DBO].T_DKT_DIC_HFUZENOFALENGEDELYEZESTIPUS 
  ADD CONSTRAINT FK_DKT_DIC_HfUzenofalEngedelyezesTipus_IntezmenyId_REF_Intezmeny 
  FOREIGN KEY (C_INTEZMENYID) 
  REFERENCES [DBO].T_INTEZMENY (ID)
GO

ALTER TABLE [DBO].T_DKT_DIC_HFUZENOFALENGEDELYEZESTIPUS 
  ADD CONSTRAINT FK_DKT_DIC_HfUzenofalEngedelyezesTipus_TanevId_REF_Tanev 
  FOREIGN KEY (C_TANEVID) 
  REFERENCES [DBO].T_TANEV (ID)
GO

ALTER TABLE [DBO].T_DKT_ALKALMAZOTTBEALLITAS 
  ADD CONSTRAINT FK_DKT_AlkalmazottBeallitas_AlkalmazottId_REF_Alkalmazott 
  FOREIGN KEY (C_ALKALMAZOTTID) 
  REFERENCES [DBO].T_ALKALMAZOTT (ID)
GO

ALTER TABLE [DBO].T_DKT_ALKALMAZOTTBEALLITAS 
  ADD CONSTRAINT FK_DKT_AlkalmazottBeallitas_IntezmenyId_REF_Intezmeny 
  FOREIGN KEY (C_INTEZMENYID) 
  REFERENCES [DBO].T_INTEZMENY (ID)
GO

ALTER TABLE [DBO].T_DKT_ALKALMAZOTTBEALLITAS 
  ADD CONSTRAINT FK_DKT_AlkalmazottBeallitas_TanevId_REF_Tanev 
  FOREIGN KEY (C_TANEVID) 
  REFERENCES [DBO].T_TANEV (ID)
GO

ALTER TABLE [DBO].T_DKT_DIC_OFERTEKLESTIPUS 
  ADD CONSTRAINT FK_DKT_DIC_OfErteklesTipus_IntezmenyId_REF_Intezmeny 
  FOREIGN KEY (C_INTEZMENYID) 
  REFERENCES [DBO].T_INTEZMENY (ID)
GO

ALTER TABLE [DBO].T_DKT_DIC_OFERTEKLESTIPUS 
  ADD CONSTRAINT FK_DKT_DIC_OfErteklesTipus_TanevId_REF_Tanev 
  FOREIGN KEY (C_TANEVID) 
  REFERENCES [DBO].T_TANEV (ID)
GO

ALTER TABLE [DBO].T_DKT_DIC_OFBEADANDOTIPUS 
  ADD CONSTRAINT FK_DKT_DIC_OfBeadandoTipus_IntezmenyId_REF_Intezmeny 
  FOREIGN KEY (C_INTEZMENYID) 
  REFERENCES [DBO].T_INTEZMENY (ID)
GO

ALTER TABLE [DBO].T_DKT_DIC_OFBEADANDOTIPUS 
  ADD CONSTRAINT FK_DKT_DIC_OfBeadandoTipus_TanevId_REF_Tanev 
  FOREIGN KEY (C_TANEVID) 
  REFERENCES [DBO].T_TANEV (ID)
GO

ALTER TABLE [DBO].T_DKT_DIC_HFCSATOLASENGEDELYEZESTIPUS 
  ADD CONSTRAINT FK_DKT_DIC_HfCsatolasEngedelyezesTipus_IntezmenyId_REF_Intezmeny 
  FOREIGN KEY (C_INTEZMENYID) 
  REFERENCES [DBO].T_INTEZMENY (ID)
GO

ALTER TABLE [DBO].T_DKT_DIC_HFCSATOLASENGEDELYEZESTIPUS 
  ADD CONSTRAINT FK_DKT_DIC_HfCsatolasEngedelyezesTipus_TanevId_REF_Tanev 
  FOREIGN KEY (C_TANEVID) 
  REFERENCES [DBO].T_TANEV (ID)
GO

ALTER TABLE [DBO].T_DKT_DIC_MINDENUZENETKOZPONTIFALONTIPUS 
  ADD CONSTRAINT FK_DKT_DIC_MindenUzenetKozpontiFalonTipus_IntezmenyId_REF_Intezmeny 
  FOREIGN KEY (C_INTEZMENYID) 
  REFERENCES [DBO].T_INTEZMENY (ID)
GO

ALTER TABLE [DBO].T_DKT_DIC_MINDENUZENETKOZPONTIFALONTIPUS 
  ADD CONSTRAINT FK_DKT_DIC_MindenUzenetKozpontiFalonTipus_TanevId_REF_Tanev 
  FOREIGN KEY (C_TANEVID) 
  REFERENCES [DBO].T_TANEV (ID)
GO

ALTER TABLE [DBO].T_DKT_DIC_CSAKTANARIRHATUZENOFALRATIPUS 
  ADD CONSTRAINT FK_DKT_DIC_CsakTanarIrhatUzenofalraTipus_IntezmenyId_REF_Intezmeny 
  FOREIGN KEY (C_INTEZMENYID) 
  REFERENCES [DBO].T_INTEZMENY (ID)
GO

ALTER TABLE [DBO].T_DKT_DIC_CSAKTANARIRHATUZENOFALRATIPUS 
  ADD CONSTRAINT FK_DKT_DIC_CsakTanarIrhatUzenofalraTipus_TanevId_REF_Tanev 
  FOREIGN KEY (C_TANEVID) 
  REFERENCES [DBO].T_TANEV (ID)
GO

ALTER TABLE [DBO].T_DKT_DIC_HFERTEKLESTIPUS 
  ADD CONSTRAINT FK_DKT_DIC_HfErteklesTipus_IntezmenyId_REF_Intezmeny 
  FOREIGN KEY (C_INTEZMENYID) 
  REFERENCES [DBO].T_INTEZMENY (ID)
GO

ALTER TABLE [DBO].T_DKT_DIC_HFERTEKLESTIPUS 
  ADD CONSTRAINT FK_DKT_DIC_HfErteklesTipus_TanevId_REF_Tanev 
  FOREIGN KEY (C_TANEVID) 
  REFERENCES [DBO].T_TANEV (ID)
GO

ALTER TABLE [DBO].T_DKT_DIC_AVATARTIPUS 
  ADD CONSTRAINT FK_DKT_DIC_AvatarTipus_IntezmenyId_REF_Intezmeny 
  FOREIGN KEY (C_INTEZMENYID) 
  REFERENCES [DBO].T_INTEZMENY (ID)
GO

ALTER TABLE [DBO].T_DKT_DIC_AVATARTIPUS 
  ADD CONSTRAINT FK_DKT_DIC_AvatarTipus_TanevId_REF_Tanev 
  FOREIGN KEY (C_TANEVID) 
  REFERENCES [DBO].T_TANEV (ID)
GO

ALTER TABLE [DBO].T_DKT_DIC_OFELOREBEIRTFELADATMEGJELENITESE 
  ADD CONSTRAINT FK_DKT_DIC_OfEloreBeirtFeladatMegjelenitese_IntezmenyId_REF_Intezmeny 
  FOREIGN KEY (C_INTEZMENYID) 
  REFERENCES [DBO].T_INTEZMENY (ID)
GO

ALTER TABLE [DBO].T_DKT_DIC_OFELOREBEIRTFELADATMEGJELENITESE 
  ADD CONSTRAINT FK_DKT_DIC_OfEloreBeirtFeladatMegjelenitese_TanevId_REF_Tanev 
  FOREIGN KEY (C_TANEVID) 
  REFERENCES [DBO].T_TANEV (ID)
GO

ALTER TABLE [DBO].T_DKT_DIC_TANULOFELADATBEADASSTATUSZ 
  ADD CONSTRAINT FK_DKT_DIC_TanuloFeladatbeadasStatusz_IntezmenyId_REF_Intezmeny 
  FOREIGN KEY (C_INTEZMENYID) 
  REFERENCES [DBO].T_INTEZMENY (ID)
GO

ALTER TABLE [DBO].T_DKT_DIC_TANULOFELADATBEADASSTATUSZ 
  ADD CONSTRAINT FK_DKT_DIC_TanuloFeladatbeadasStatusz_TanevId_REF_Tanev 
  FOREIGN KEY (C_TANEVID) 
  REFERENCES [DBO].T_TANEV (ID)
GO

ALTER TABLE [DBO].T_DKT_TANULOFELADATBEADAS 
  ADD CONSTRAINT FK_DKT_TanuloFeladatbeadas_TanuloErtekelesId_REF_TanuloErtekeles 
  FOREIGN KEY (C_TANULOERTEKELESID) 
  REFERENCES [DBO].T_TANULOERTEKELES (ID)
GO

ALTER TABLE [DBO].T_DKT_TANULOFELADATBEADAS 
  ADD CONSTRAINT FK_DKT_TanuloFeladatbeadas_TanuloId_REF_Tanulo 
  FOREIGN KEY (C_TANULOID) 
  REFERENCES [DBO].T_TANULO (ID)
GO

ALTER TABLE [DBO].T_DKT_TANULOFELADATBEADAS 
  ADD CONSTRAINT FK_DKT_TanuloFeladatbeadas_FeladatId_REF_DKT_Feladat 
  FOREIGN KEY (C_FELADATID) 
  REFERENCES [DBO].T_DKT_FELADAT (ID)
GO

ALTER TABLE [DBO].T_DKT_TANULOFELADATBEADAS 
  ADD CONSTRAINT FK_DKT_TanuloFeladatbeadas_JavitoAlkalmazottId_REF_Alkalmazott 
  FOREIGN KEY (C_JAVITOALKALMAZOTTID) 
  REFERENCES [DBO].T_ALKALMAZOTT (ID)
GO

ALTER TABLE [DBO].T_DKT_TANULOFELADATBEADAS 
  ADD CONSTRAINT FK_DKT_TanuloFeladatbeadas_ErtekeloAlkalmazottId_REF_Alkalmazott 
  FOREIGN KEY (C_ERTEKELOALKALMAZOTTID) 
  REFERENCES [DBO].T_ALKALMAZOTT (ID)
GO

ALTER TABLE [DBO].T_DKT_TANULOFELADATBEADAS 
  ADD CONSTRAINT FK_DKT_TanuloFeladatbeadas_IntezmenyId_REF_Intezmeny 
  FOREIGN KEY (C_INTEZMENYID) 
  REFERENCES [DBO].T_INTEZMENY (ID)
GO

ALTER TABLE [DBO].T_DKT_TANULOFELADATBEADAS 
  ADD CONSTRAINT FK_DKT_TanuloFeladatbeadas_TanevId_REF_Tanev 
  FOREIGN KEY (C_TANEVID) 
  REFERENCES [DBO].T_TANEV (ID)
GO

ALTER TABLE [DBO].T_DKT_DIC_HFELOREBEIRTFELADATMEGJELENITESE 
  ADD CONSTRAINT FK_DKT_DIC_HfEloreBeirtFeladatMegjelenitese_IntezmenyId_REF_Intezmeny 
  FOREIGN KEY (C_INTEZMENYID) 
  REFERENCES [DBO].T_INTEZMENY (ID)
GO

ALTER TABLE [DBO].T_DKT_DIC_HFELOREBEIRTFELADATMEGJELENITESE 
  ADD CONSTRAINT FK_DKT_DIC_HfEloreBeirtFeladatMegjelenitese_TanevId_REF_Tanev 
  FOREIGN KEY (C_TANEVID) 
  REFERENCES [DBO].T_TANEV (ID)
GO

ALTER TABLE [DBO].T_DKT_DIC_HFBEADANDOTIPUS 
  ADD CONSTRAINT FK_DKT_DIC_HfBeadandoTipus_IntezmenyId_REF_Intezmeny 
  FOREIGN KEY (C_INTEZMENYID) 
  REFERENCES [DBO].T_INTEZMENY (ID)
GO

ALTER TABLE [DBO].T_DKT_DIC_HFBEADANDOTIPUS 
  ADD CONSTRAINT FK_DKT_DIC_HfBeadandoTipus_TanevId_REF_Tanev 
  FOREIGN KEY (C_TANEVID) 
  REFERENCES [DBO].T_TANEV (ID)
GO

ALTER TABLE [DBO].T_DKT_FELADAT 
  ADD CONSTRAINT FK_DKT_Feladat_TantargyId_REF_Tantargy 
  FOREIGN KEY (C_TANTARGYID) 
  REFERENCES [DBO].T_TANTARGY (ID)
GO

ALTER TABLE [DBO].T_DKT_FELADAT 
  ADD CONSTRAINT FK_DKT_Feladat_OsztalyCsoportId_REF_OsztalyCsoport 
  FOREIGN KEY (C_OSZTALYCSOPORTID) 
  REFERENCES [DBO].T_OSZTALYCSOPORT (ID)
GO

ALTER TABLE [DBO].T_DKT_FELADAT 
  ADD CONSTRAINT FK_DKT_Feladat_AlkalmazottId_REF_Alkalmazott 
  FOREIGN KEY (C_ALKALMAZOTTID) 
  REFERENCES [DBO].T_ALKALMAZOTT (ID)
GO

ALTER TABLE [DBO].T_DKT_FELADAT 
  ADD CONSTRAINT FK_DKT_Feladat_HelyettesitoAlkalmazottId_REF_Alkalmazott 
  FOREIGN KEY (C_HELYETTESITOALKALMAZOTTID) 
  REFERENCES [DBO].T_ALKALMAZOTT (ID)
GO

ALTER TABLE [DBO].T_DKT_FELADAT 
  ADD CONSTRAINT FK_DKT_Feladat_RogzitoAlkalmazottId_REF_Alkalmazott 
  FOREIGN KEY (C_ROGZITOALKALMAZOTTID) 
  REFERENCES [DBO].T_ALKALMAZOTT (ID)
GO

ALTER TABLE [DBO].T_DKT_FELADAT 
  ADD CONSTRAINT FK_DKT_Feladat_IntezmenyId_REF_Intezmeny 
  FOREIGN KEY (C_INTEZMENYID) 
  REFERENCES [DBO].T_INTEZMENY (ID)
GO

ALTER TABLE [DBO].T_DKT_FELADAT 
  ADD CONSTRAINT FK_DKT_Feladat_TanevId_REF_Tanev 
  FOREIGN KEY (C_TANEVID) 
  REFERENCES [DBO].T_TANEV (ID)
GO

ALTER TABLE [DBO].T_DKT_DIC_FELADATTIPUS 
  ADD CONSTRAINT FK_DKT_DIC_FeladatTipus_IntezmenyId_REF_Intezmeny 
  FOREIGN KEY (C_INTEZMENYID) 
  REFERENCES [DBO].T_INTEZMENY (ID)
GO

ALTER TABLE [DBO].T_DKT_DIC_FELADATTIPUS 
  ADD CONSTRAINT FK_DKT_DIC_FeladatTipus_TanevId_REF_Tanev 
  FOREIGN KEY (C_TANEVID) 
  REFERENCES [DBO].T_TANEV (ID)
GO

ALTER TABLE [DBO].T_DKT_DIC_FELADATERTEKELESTIPUS 
  ADD CONSTRAINT FK_DKT_DIC_FeladatErtekelesTipus_IntezmenyId_REF_Intezmeny 
  FOREIGN KEY (C_INTEZMENYID) 
  REFERENCES [DBO].T_INTEZMENY (ID)
GO

ALTER TABLE [DBO].T_DKT_DIC_FELADATERTEKELESTIPUS 
  ADD CONSTRAINT FK_DKT_DIC_FeladatErtekelesTipus_TanevId_REF_Tanev 
  FOREIGN KEY (C_TANEVID) 
  REFERENCES [DBO].T_TANEV (ID)
GO
