Should I include user_id in multiple tables?
Posted
by Drarok
on Stack Overflow
See other posts from Stack Overflow
or by Drarok
Published on 2010-03-26T00:01:13Z
Indexed on
2010/03/26
0:03 UTC
Read the original article
Hit count: 360
I'm at the planning stages of a multi-user application where each user will only have access their own data. There'll be a few tables that relate to each other, so I could use JOINs to ensure they're accessing only their data, but should I include user_id in each table? Would this be faster? It would certainly make some of the queries easier in the long run.
Thanks!
© Stack Overflow or respective owner