CREATE TABLE ANDROID_MODULO(
ID_MODULO INTEGER PRIMARY KEY AUTOINCREMENT,
NMODULO VARCHAR(50)
);
CREATE TABLE ANDROID_SUBMODULO(
ID_SUBMODULO INTEGER PRIMARY KEY AUTOINCREMENT,
ID_MODULO INT NOT NULL
REFERENCES ANDROID_MODULO
ON DELETE NO ACTION ON UPDATE NO ACTION,
NSUBMODULO VARCHAR(50)
);
CREATE TABLE ANDROID_FUNCOES(
ID_FUNCAO INTEGER PRIMARY KEY AUTOINCREMENT,
ID_MODULO INT NOT NULL
REFERENCES ANDROID_MODULO(ID_MODULO)
ON DELETE NO ACTION ON UPDATE NO ACTION,
ID_SUBMODULO INT NOT NULL
REFERENCES ANDROID_SUBMODULO (ID_SUBMODULO)
ON DELETE NO ACTION ON UPDATE NO ACTION,
NFUNCAO VARCHAR(60)
);
I'm getting the value of the module and write the id of it in the table of Attendances, but in the display of the sub modules and functions I can not load the data correctly, thank you already.