pspp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: casefile random access


From: John Darrington
Subject: Re: casefile random access
Date: Thu, 8 Jun 2006 13:34:41 +0800
User-agent: Mutt/1.5.9i

On Wed, Jun 07, 2006 at 09:45:23PM -0700, Ben Pfaff wrote:
     It is possible, but nontrivial, to fix casefiles to solve both of
     these problems.
     
     Cases could be inserted by adding a second file and reading its
     data partway through the middle of the first one; some kind of
     index would be necessary.  Deleting cases is simpler; you just
     arrange to ignore the ones that are deleted.  

I was thinking of something similar.  The index is the tricky bit.
Seeking is also complicated.  If I insert a case before case #10, and
another before case #30.  Then to find case 40, I actually have to
index the casefile with 42, and to find case 20 I have to use the
index 21 etc.   My idea was a binary tree which stores pointers to the
inserted cases, and keeps a record of how many cases have been
inserted where. 

     If this sort of
     thing is taken to its logical extreme, you end up with a database
     system like Berkeley DB's Recno access method.

I'm not familiar with that.
     
     Variables could be inserted by adding a second file and reading
     it in parallel with the first one.  To delete a variable, ignore
     that data as you read it.

Again, there'd also be the problem of mapping the old  indeces to the
new (casefile, index) pairs.
     
     How important is it to solve these problems at the casefile
     level?

I don't know at this stage.  Maybe a higher level would be more
appropriate.   Anyway, I'll try to get the sheet scrolling properly
with a single casefile, and perhaps temporarily drop the ability to
insert and delete.

J'

-- 
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://pgp.mit.edu or any PGP keyserver for public key.


Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]