SQLite Forum

Serious problems with STORED columns
Login
> Also, the STORED value is written to the database, right? After all, the point of STORED is to not have to calculate it again, so it must be written out. And if it's written out, then it - by definition - is persistent - from the database's point of view.

I felt uneasy about that statement, so thought I would make a separate post tackling it.

This is well known logic fallacy, or more commonly known as a semantic argument or semantic error. A common problem of language not being mathematics.

Saying that if it is stored, it is "by definition" persistent, may be correct in some sense, but not others.   
It's like saying that someone who is driving a car is "by definition" a driver.  What about if he takes a Taxi tomorrow? May we no longer call him a driver?  What about if he is 12 years old and doesn't possess a driving permit, is he still by definition "a driver"? Maybe he is in the technical sense, but the court judge certainly won't hear of it, in the legal sense he is NOT a driver.

So if you are talking "does the bytes go into the persistent storage?" then YES a STORED column is persistent *in that sense*, but in the sense that it is NOT the data you put there, and never will be, and the data it has is fleeting and will be updated on a whim by some other column that happens to be in its calculation expression, then NO, it is most certainly NOT persistent in that sense, it is derived.

I hope that helps to clear up some of the other texts on the matter.