Filtering array vs plain list

Len Morgan len-morgan at crcom.net
Sat Feb 2 08:33:38 EST 2008


Shari,

Why are you writing off using a database?  I think you would find that 
for the amount of data you have and the way it's organized, it's going 
to be MUCH faster than anything you can do with arrays and scripts.

For example to select all the Red Sox fans born in 1960 you would write:

SELECT * FROM people WHERE baseballteam='Red Sox' AND birthyear='1960'

To use your example of changing the baseball team:

UPDATE people SET baseballteam='White Sox' WHERE baseballteam='Red Sox' 
AND birthyear='1960'

All you have to do is read the statement above and you know what it 
does.  Databases are designed for exactly this purpose and  to do it in 
a script instead is IMHO, reinventing a very efficient, tested, wheel.

Len Morgan

Shari wrote:
>
> Note that this is not for a database, but for a game where I need to 
> track thousands of people each having about 300 pieces of info 
> defining them, the defining info will change constantly, and changes 
> need to be instantaneous.
>



More information about the use-livecode mailing list