pspp-dev
[Top][All Lists]
Advanced

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

Re: casefile random access


From: Ben Pfaff
Subject: Re: casefile random access
Date: Thu, 08 Jun 2006 09:47:36 -0700
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)

John Darrington <address@hidden> writes:

> Another problem I've encountered:  I'm getting this assertion in
> casefile_append : 
>
>  assert (cf->mode == WRITE);
>
> Would it not be appropriate to allow write-after-read for random
> casereaders ?

It should be possible, although I'll note that writing is not
associated with a casereader.

I'm beginning to believe that casefiles should not be used for
GUI access.  Instead, we should create a new, more dynamic
structure for GUI access, one that supports the casefile
operations.  For convenience, I'll call it a "flexfile", because
it's flexible.  The GUI would use flexfiles where the TUI uses
casefiles.  I'd write a wrapper that allowed them to be used
interchangeably.

I've been thinking about how to implement such a data structure.
I think what would be wanted is a B-tree (as I think you
mentioned), where each item in the tree is a group of columns.
Inserting or deleting cases inserts or deletes items in the
B-tree.

Initially there would only be a single B-tree.  Inserting columns
would create additional B-trees parallel to the initial one.
Because each B-tree would have the same structure, only a single
index would be necessary.

This could be easily prototyped with Berkeley DB.  It sounds like
you don't know about Berkeley DB, but it's enormously useful, so
I'd recommend looking it up: http://dev.sleepycat.com/index.html
-- 
Ben Pfaff 
email: address@hidden
web: http://benpfaff.org




reply via email to

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