On Nov 1, 2009, at 8:22 AM, Shravan Kumar. M wrote: clearly order "matters" to you, which means that ordering is "real data" and should be represented in your db explicitly, not achieved with trickery.
+1
PKs and FKs are artifacts of the DB, not data. One of the banes of my current job is that there are lots of places in our apps where PKs and FKs were exposed as class attributes and used to set and change relationships. There's a few places where this is actually needed due to server architecture, but in only about 1% of the places it was used. So there's lots of places where the not only does the attribute get set, but also the relationship, otherwise EOF would get confused.
Any time you want to use a PK or FK directly in a WO app, you should ask yourself if you really, really, really need to do it. Maybe you do, but you almost certainly don't.
Dave |