NYCPHP Meetup

NYPHP.org

[nycphp-talk] db design/ app logic: making certain rows immutable

David Mintz david at davidmintz.org
Fri Jul 15 12:09:17 EDT 2011


On Fri, Jul 15, 2011 at 11:44 AM, David Mintz <david at davidmintz.org> wrote:

>
>
> On Fri, Jul 15, 2011 at 11:43 AM, Dan Cech <dcech at phpwerx.net> wrote:
>
>> It sounds like you really just need to change the way in_court is used,
>> having multiple options instead of just yes/no.
>>
>> Then your javascript can key off that and your users can create any event
>> types they require and specify where they take place.
>
>
> OMG! That does sound promising!
>

In my previous description of the case, for brevity's sake I lied about
in_court being boolean. There already is 1, 0 and -1. To the application -1
means "not applicable" and it's for one thing we interpreters sometimes do
-- translate written documents -- which really isn't "in" or "out," and
which per the business requirements is counted differently from all the
rest.  If I were to have another value signifying "usually even further
'out', like off-site" that would seem appropriate from one point of view but
it smells a little funny. The location is not and shouldn't be tightly bound
to the event_type; rather, it's an attribute of the event. I made the
mistake of coupling the what with the where in my last iteration of this
project, and it came back to bite me.

Looks litke there needs to be some pain however I slice it; the model is
complex because the reality it models is complex. But Dan's approach feels
like it's the right track, so many thanks again -- to all.

-- 
David Mintz
http://davidmintz.org/
It ain't over:
http://www.healthcare-now.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20110715/bb18c0f2/attachment.html>


More information about the talk mailing list