Displaying 1 result from an estimated 1 matches for "documents_tag".
Did you mean:
documents_tags
2006 Apr 01
5
Triple relationship
Hi list,
I need to represent a relationship between three tables:
Tags (id, name)
Users (id, name, email, ... )
Documents (id, title, ... )
I created a forth table called Assignments(id, tag-id, user-id,
document-id, date).
I have couple of questions:
Should I use belongs-to and has-many to capture this? If so, How can I
do that?
should I have the id as the primary key in Assignment table or