Learn English – Which preposition follows “persist”

prepositionsword-choice

Which of the following is correct?

  1. The program persists the data in the database.
  2. The program persists the data to the database.

In feels a little more natural to me, but I have no particular basis for that.

Best Answer

The program persists the data in the database.

Here is what I would say in general:

  • save the object in the database
  • update the object in the database
  • persist the object in the database (same as save or update)
  • load the object from the database
  • write the object to a file
  • read the object from a file
Related Topic