All this talk about DataBases - but how to select?

Peter Alcibiades palcibiades-first at yahoo.co.uk
Thu May 31 03:34:10 EDT 2007


Well first of all, thanks yet again to Jacque for Find and Mark and Scroll 
through - wonderful, thanks!  Another of these things which are totally 
obvious the minute you read them, and which you would never have found for 
yourself. 

Here is what I don't get though about Richard's approach.  Obviously it works, 
but I can't see how to do it.  Two cases, maybe will beg for help on the 
second one later.  Case one is a data set of about 3000 records, each with 
about 40 fields. Some of the fields are a few lines of text.

There seem to be three ways of doing this:  

(1)  put the lot into one field on one card with the records one per line and 
the values separated by tabs   This is Richard's approach, yes?  Except that 
sometimes he puts them in custom properties also.

(2) put each record in one field on a separate card, ie 3000 cards each with 
one field on.  This is Jacque's?

(3) put each record on one card, and have one field per value, or 3000 cards 
and 40 fields on each.  This seemed to be the approach that Richard was 
criticising as being too much overhead? 

The object of it all would be to allow searches, then bring up the records 
with a given chunk of text in them and allow scrolling through them.  Display 
them with labels for the values, appropriately styled and pretty - for 
instance a grey rectangle around the legend 'condition', followed by some 
statement of the condition, which would be the value.  Also to allow editing 
of the values and allow adding to them.

I can see how to do this by method (3) fairly readily.  I can't really see how 
to do the layouts in the other ways.  Do I have to read in the data as 
chunks, and create a temporary card with artwork for every record found, and 
fields for the values?  In that case why not go the whole hog and right away 
to (3), it wouldn't be much more work.  In fact, it would be less - there'd 
be no creating cards on the fly and then deleting them.

Find and Mark will evidently let you produce a scrollable set of cards very 
nicely in case (3)

Its the kind of thing which would take me all of an hour in Filemaker complete 
with the csv import - but alas, it don't come for this OS.  But as I start 
thinking about how to do it, its hard to avoid the reflection that anything 
except (3) is going to involve writing a flat file database complete with 
form creation for search and edit and add records, from scratch.  Or is there 
something else obvious like Find and Mark that I'm missing?

I have DS's book by the way, and it fell to bits early on from beng read.... 
Its great, as far as it goes.  But its not helping much with this!

Peter



More information about the use-livecode mailing list