On Apr 11, 2007, at 11:39 PM, Robert Livingston wrote: > Third Choice > > Or create an object (arrayTable) made up of the number and type of > arrays that are needed to match the fields of the record. > That object would be using standard REALbasic commands to search in > the arrays, append and delete elements in that arrays etc. > >> There's a choice as to EITHER have separate arrays for >> each field (each array containing the given field for all the >> records) OR create an object class for the records which holds all >> the fields and make an array for those records (the object >> instances).
Fourth Choice Use Operator_Lookup. Create a class you can point at a table and it loads the field values into a dictionary. Then you use Operator_Lookup to make it convenient to refer to the values in the dictionary. It's only syntactic sugar, but you can take this quite a long way. You can detect and track all fields accesses, so your class can know which values have to be written out to the database when you want to save the record. I've written quite the elaborate OR mapping framework this way. If I can ever find the time to rewrite it (usual story: you have to do something once to know how you really *should* have done it), I might even make it available. Regards, Guyren G Howe Relevant Logic LLC guyren-at-relevantlogic.com ~ http://relevantlogic.com REALbasic, PHP, Ruby/Rails, Python programming PostgreSQL, MySQL database design and consulting Technical writing and training _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>