NYCPHP Meetup

NYPHP.org

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

federico ulfo rainelemental at gmail.com
Fri Jul 15 10:11:58 EDT 2011


It's simple just add a permission table :) linked to the content table and
to the users and to the groups:
Permission ( permission_id, content_id, users_id, group_id, permission )

Also normalization is not always necessary in my experience I found faster
and easier sometimes to just "brake the law" and keep all info on a single
table, not elegant but if works better/faster why not?

My 2 cents

Sent from my iPhone

On Jul 15, 2011, at 10:04 AM, David Mintz <david at davidmintz.org> wrote:



On Fri, Jul 15, 2011 at 9:59 AM, Philip Camilleri <
philip.camilleri at gmail.com> wrote:

> hi David,
>
> simply put -- No!
>
> It's not quite good design, and you risk having several issues down the
> road. Better to split the table in two (even though from a normalized design
> perspective, that's not quite right -- however, you give yourself a lot more
> flexibility, and then can either create a view joining both tables, or just
> join in your queries).
>
> Phil.
>


Well, I'm not totally convinced, and I haven't described my scenario in any
detail to try to convince you. But it's food for thought that I will duly
consider.

Whenever I see myself getting too fancy, Occam's Razor makes me skeptical of
my own thinking. And I do have the Razor here hovering over my shoulder.

-- 
David Mintz
http://davidmintz.org/
It ain't over:
http://www.healthcare-now.org/


_______________________________________________
New York PHP Users Group Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

http://www.nyphp.org/Show-Participation
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20110715/ad4e4d6b/attachment.html>


More information about the talk mailing list