Database Design – Naming a Table Storing Only Foreign Keys

database-design

enter image description here

Right now I am designing a new database for our family business. I have a few tables like in the image above, where the table only contains two foreign keys in order to represent an association between two records in two different tables.

Ex: transaction_id 123 contains the purchase of membership_id 100.

Is there a proper naming convention or a word for tables like this? For now I have been using the word "index" as a placeholder, but I am not sure if this word is appropriate.

Best Answer

The proper term is associative table, though most often I've heard it called is a Linker table.

Typically this table is used to support a many-to-many relationship.

As for a naming convention, that would be up to you, though I will usually just pluralize the second name, in your example I would use TransactionMemberships

Related Topic