Dody,

> ...for performance reason I would put both foreignkey
> (one 2 many) to company and user in newsposting model...

I was actually thinking about that, was wondering if it breaks the
system for some unknown reason. I am glad it is common practice and I
can count on it within my application.

Thank you for your elaborate and informative response. I guess I fail
to properly understand the significance of Primary Keys. Isn't it there
just to make our records Unique? Then, who cares if the other XXX_id's
are unique or not! I'd rather impose such rules within my application
logic anyway.

>From all your feedbacks, I will go for the approach #1 and include
company_id into my records to optimize the database for speed.

Thanks,
Mike

Reply via email to