Database is a collection of data and its format is fixed.
Database can not access as fast as file the reason is first
user has require to connect with it.
As security purpose database is best option.
While File is in different format.
File access will be faster than the database.
The reason is that file is store in same memory.