I was looking at the elgg schema. It's weird. Basically it has a
concept of  a node and a concept of a relationship. Nodes an be
anything, a post, a comment, a user etc. You establish a relationship
between nodes by specifying the parent, child and the relationship
type.

For some type of nodes they add a one to one table. This table has
additional fields required for the item like the users login
information, hair color etc.

Now that all seems pretty insane to me but...

I have been looking into the CE code and I see a lot of tables that
look very similar to each other.  It seems to me that a more generic
approach may be suitable for some types. You can use single table
inheritance to model the different types of objects. For counter
caches you'd have to override the decrement_counter_cache and
increment_counter_cache.  Any additional data could be serialzed as
long as it doesn't need to be indexed or searched.

Does this make sense to anybody?

-- 
You received this message because you are subscribed to the Google Groups 
"CommunityEngine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/communityengine?hl=en.

Reply via email to