Here is ERD model of my DB:

Here is create table codes i used so far: pastebin
I have created all tables and now I'm trying to alter them to create foreign keys,
but this alter doesn't work.
Alter table uskladnena_surovina add foreign key (datum_spotreby,id_dodavatela,id_suroviny) references ponukana_surovina (datum_spotreby,id_dodavatela,id_suroviny)
/
It says:
"DATUM_SPOTREBY":
00904. 00000 - "%s: invalid identifier"
date data type. Change tointmaybe?