I’m working on new project, and we decided to use Flask, SQLAlchemy, Mysql. I’m get used to using foreign key, however, for this time DBA told us we can’t use foreign key. So I would like to check if data exists in other table to keep data as clean and pure before insert or update data. I can write some code to check this out, but I would like to know If there is a way to check data existence on SQLAlchemy or flask, because any kinds of API using this table always have to check data existence and it is gonna be waste to implement same code for one reason.
Also, I want to know if this kinds of situation is common(restricted to use foreign key)