What does flushing the database mean? Also with "flash"

11,985

Flushing: To sync the temporary state of your application data with the permanent state of the data (in a database, or on disk).

Explanation: Flushing is really a caching term, not a database term. When you save data using an ORM or an application, you usually have an object reference to it in memory. For instance, a User. The state of that user could be represented like this: {name: Bob, id: 10}. When you flush with the database you update both references to match each other. Some ORMs, like Hibernate cache the datasets (even without you configuring caching) and when the data is updated by triggers or other systems or processes outside of the current session, the data is out-of-sync until you "flush" it.

Flash: I'm assuming you mean "Flash Memory"? This just means the hardware you are storing data on is storing the data as 1s and 0s using electricity, whereas traditional memory devices store the memory as magnetic positive or negative charges. All you really need to know is that it is much faster than magnetic drives.

Hope this helps!

Share:
11,985
user5150273
Author by

user5150273

Updated on June 12, 2022

Comments

  • user5150273
    user5150273 almost 2 years

    I want to know what "flush" and "flash" means and the difference between them.