I've been pondering a potentially sticky issue that will be of crucial importance when I decide to move out of the prototype stage and into a real-working version. The prototype doesn't care much for speed, so I can can 'query' quite easy by iterating the atributes of all my objects. As you can imagine, scale this up a hundred (or eve a thousand) fold and we're starting to think of real number to work with. Instead of storing copies of the attributes in the objects, I'm going to need to have a way of typing things together to ensure things such as indexes are updated. The best way I see so far is to have multiple indexes stored within the database and the database itself being effectively a 'pot' of attributes with a reference to the object it belongs to. Likewise, the objects need to maintain references to the attributes they hold.
I'll work on this problem later, but must bear it in mind at this prototype stage as it will likely affect my interfaces and how the objects link together.