[elephant-ticket] #78: Persistent associations

elephant elephant-devel at common-lisp.net
Wed Feb 27 19:36:09 UTC 2008


#78: Persistent associations
--------------------------+-------------------------------------------------
 Reporter:  ieslick       |       Owner:  ieslick
     Type:  enhancement   |      Status:  new    
 Priority:  major         |   Milestone:         
Component:  metaprotocol  |     Version:         
 Keywords:                |  
--------------------------+-------------------------------------------------
 With psets and a bit of hackery, we can create slots that maintain a list
 of other objects and insert/remove objects from the pset.  ManyToMany
 slots in SQL systems are maintained by doing a lookup in a separate table
 consisting of pairs of related elements.  This table consists of a pair ID
 and the pair of UID references.  Speeding accesses to these tables can be
 tricky (index on each pair value, for instance).

 This ticket proposes that, as part of the referential integrity fix in
 ticket #3, we extend slot semantics to support native associations.

 cl-perec has a more SQL oriented model of associations by defining them
 external to the class as functions rather than slot definitions.  This
 probably makes sense.  You declare an association and the methods used to
 access them from either object - virtual slots that use the new table to
 lookup the association.

 A class should be able to keep track of the associations defined against
 it for introspection purposes.  This info will have to be stored in the
 database, so this feature might be co-resident with an explicit storage of
 schemas in the DB.

 Bootstrapping is also an issue.  Code defines the mapping, but connection
 to the persistent storage may come after code definition time so, like
 class indexing, connection happens on the first access.

 For multi-store operations, associations will only exist between instances
 of classes in the same store.

-- 
Ticket URL: <http://trac.common-lisp.net/elephant/ticket/78>
elephant <http://common-lisp.net/project/elephant>
elephant


More information about the elephant-ticket mailing list