introduce a separate file for database manipulation.