Say I have those three tables for a basic forum: Thread:
- id [PK]
(and a few other columns)
user_thread:
- id [PK]
- thread_id [FK1]
- user_id [Fk2]
User:
- id [PK]
- name
(and a few other columns)
My questions here are basically:
1) When I'm working with the "Thread" table in a query, what's the best way to fetch user name associated with that "Thread"? or should that be in a different query?
2) Am I doing the relations correctly? to be honest, I don't know when I should have an intermediate table between related tables, I just guessed that.
Bookmarks