[Tutor] Is it possible to archive subsets of data from an SQLite db and restore it later?
Ben Finney
ben+python at benfinney.id.au
Tue Aug 18 11:02:35 CEST 2015
Alan Gauld <alan.gauld at btinternet.com> writes:
> A flag column that can be used to include/exclude students from
> reports.
Boolean flags very commonly indicate something that can be different at
different times. When the name is of the form “currently_foo”, that's
almost certainly something that is different at different points in
time.
So better than a boolean in the database, would be a timestamp (or just
a date) indicating *when* the status changes. Either an ‘enrolled’
timestamp, or a ‘departed’ timestamp, or both.
Then you can interrogate the database about past, present, or future, by
comparing that value with whatever point in time is of interest.
--
\ “Faith is the determination to remain ignorant in the face of |
`\ all evidence that you are ignorant.” —Shaun Mason |
_o__) |
Ben Finney
More information about the Tutor
mailing list