dimanche 6 décembre 2015

alternative names or synonyms for sqlite objects

I have application using written in oracle database , which i need to port to sqlite. I have quite few instances where a table object is referred by different names . In one instance a table would be referred as ADT and in other instance it is referred as TBA_AUDIT_TABLE . In case of oracle database , ADT is synonym working on underlying table of TBA_AUDIT_TABLE. For Sqlite , there seems to be no synonym support . I could think of following solution . I do not want to change my application code for database change. 1) create table TBA_AUDIT_TABLE 2) create view ADT 3) create instead of trigger on ADT , which will update/insert TBA_AUDIT_TABLE

Any better solution

Aucun commentaire:

Enregistrer un commentaire