# Miscellaneous > Database Design >  Foreign Key Importance

## rvrk_reddy

We don't have foreign keys (FK)  in our database.
I think FK's are very important to enforce data integrity and also it's very easy to understand data flow. But one of our developer argues we can maintain data integrity through java code, without FK's it's easy to merge/migrate data (TRUNCATE works without FK's). 
My point is we should fix migration script otherwise we end up several with several orphan records, also some time there could be bugs in Java code. Can any DBA or design expert advice me what 
are other benefits of FK's (coding time, performance, indexes...etc).
Thanks.

----------


## skhanal

Data integrity is the most important one, as you never know someday somebody wants to load data without using the front end using batch program and if it fails to check proper references then all your data become corrupted.

----------

