Searching Data in Custom Properties

Richard Gaskin ambassador at fourthworld.com
Tue Jun 14 01:25:51 EDT 2005


zack wrote:
> Hello,
> 
> I am newbie to RunRev.  I have been developing databases using other  
> tools for about 10 years.  I am trying to get my head around this  idea 
> of storing data in custom properties. I have read Richard  Gaskin's post 
> on the subject and I am begining top get my head around  setting the 
> data into custom props and getting it out when you now  where a 
> particular piece of data is.
> 
> But how do you search for a string that maybe in a custom property?
> 
> Or if you need searching is it time to move to a RDBMS.  I am quite  
> comfortable with that if that is what is required, but I just don't  know.

As with so many things in computing, the answer is "depends". :)

There are many things an RDBMS can be good for, and searching is 
definitely among them.

But there are also very flexible things that can be done with native 
Transcript too.

You can structure data in a wide variety of ways to get what you need. 
In an application I've been working on I need multiple tables of data 
that are rarely directly related, but in which searching and sorting had 
to be efficient.

I found that by using simple tab-delimited data stored in properties I 
was able to get a good mix of what I need from native Transcript, using 
functions like offset, lineoffset, filter, and sort.

In some cases I use the keys for these properties as an index, and with 
multiple property sets it's easy to use the same key into different 
collections of data.

For example, we have one tab-delimited table which has data that the 
user can annotate, and we store the annotations separately because we do 
a lot of operations on the annotations only.

By using the same key for the current collection and the user's 
annotation about the collection I get to what I need quickly and easily:

   put the uMainDataA[myKey] of stack "data" into tMyData
   put the uAnnotations[myKey] of stack "data" into tMyAnno

So you may find that using a DMBS is a good move, but you may also find 
that you can get what you need in native Transcript.

What type of data are you working with, and what do you need to do with it?

--
  Richard Gaskin
  Fourth World Media Corporation
  __________________________________________________
  Rev tools and more: http://www.fourthworld.com/rev


More information about the use-livecode mailing list