SQL implementation for file storage