[Tutor] Fwd: Is this possible and should it be done?

Jordan wolfrage8765 at gmail.com
Mon May 21 22:24:39 CEST 2012

On 05/21/2012 07:24 PM, Alan Gauld wrote:
> On 21/05/12 15:23, wolfrage8765 at gmail.com wrote:
>> if any of these formats offer file locking with in them, ;et me say
>> that better. Can I open a, as example, tar file and lock a file with
>> in it, with out locking the entire tar archive?
> No and you probably shouldn't.
> If two users are accessing the same file at once and one of them is
> modifying it (writing) while the other is trying to read it bad things
> are very likely to happen. Remember that these virtual files inside
> the tar file(say) are really just blocks of data within a single file.
> If you want to try modifying blocks inside a single store you will be
> better with a database. But that's not usually a single file (Access,
> SQLite etc excepted). Actually SQLite might do what you want by
> locking at the table row level, I haven't checked. You would need a
> single table of BLOB records where each BLOB represented a virtual
> file...
Very interesting idea, I have actually used a SQLite file in this way
before, not sure why I did not think of that possibility. SQLite's BLOB
could be the perfect already created solution. Thank you all for your
> Version control tools like CVS and SVN don't quite fit your needs
> either since they use multiple files not a single file. Although they
> do usually store all the historic versions of each file in one. So if
> it is really only historic data you need CVS, SVN, RCS etc may work.

More information about the Tutor mailing list