Database – Naming convention for associative entity

databasedatabase-designnaming

When designing Many-to-Many relationship on a database, we need to put another table in the middle so it become 3 tables with 1-to-many relationship. Wikipedia told me that it's called associative entity

I always have problem naming these kind of tables. Is there any convention for them? or how do you name these tables?

Best Answer

Say I have a customer table and an address table. Obviously a customer can have more than one address, and more than one customer can be at the same address, so I have a many to many relationship.

The name of the table that allows them to be joined together can simply be customerAddresses.

So I think the scheme I use is to split the two entities into "thing that owns" and "thing that is owned", and that gives the simple name above.

Edit: It might be better to use the analogy of "thing that acts" and "thing being acted upon" for some cases.

Related Topic