When designing a database, what usually determines what tables will be the primary and foreign table in a relationship?
For example, if I have a table called posts and it contains and id column postid and I have a table called comments and it contains a column called postid. Which of these tables would be the primary one in the relationship. I would assume it is the posts table. I am saying this because this is a one-to-many relationship and it seems like the table with one entry would be the primary one and the table with the many would be the foreign table.
What about many to many relationships or 1 to 1 relationships, what are the primary and foreign tables in those scenarios?