FOLDER(CodFO,name,path,dim,ContainerFolder)
FILE(CodFI,name,CodFO,path,dateC,dateE,dim)
After a file is inserted into the FILE class , its path field gets updated after the instert in a way that it has to be the concatenation of the path of the container folder and of the name of the file itself.
CREATE TRIGGER CheckPath
AFTER INSERT ON file OF path
FOR EACH ROW
BEGIN
SELECT CodFI , CodFO
FROM Folder as FO JOIN File as FI ON FO.CodFO=FI.CodFO
GROUP BY CodFI;
INSERT INTO FILE
VALUES (New.CodFI,New.name,New.path,New.dateC,New.dateE,New.dim)
END;