Database file handling