On Wed, 2008-04-09 at 13:36 -0400, Aaron Feng wrote: > I have learned a good deal about elephant so far, but I'm still unsure > on how to design my schema with elephant, so I'll post what I have > later on today. All suggestions are welcome!
This may seem silly and you may be beyond it, but the first thing you should do is just design a good object-oriented system without worrying about persistence at all. That is, model your domain in a natural way with CLOS classes, in a way that you think will support your purpose. In "Enterprise" applications this is usually expressed in language of "define your business objects" and "keep your business rules clearly defined. That language makes sense for commercial websites; it isn't natural for every application. Then make a clear distinction between objects that you want to persist, and those that don't need to be persisted. For example, a "session" is often a transient object that doesn't need to be persisted. Then take the persistent classes and switch from "defclass" to "defpclass". Then use "mapclass" as your workhorse function for doing things to those classes. When you notice something being too slow, think about adding an index to a slot to make it's retrieval rapid by looking up the persistent object based on that slot value. _______________________________________________ elephant-devel site list elephant-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/elephant-devel