Best name for link table

by Tim   Last Updated May 18, 2016 08:02 AM

I was wondering what the best name for a linked table in this situation (or any) would be. I've searched for this, but could not find any concrete examples.

In example, I have this following tables:

  • restaurant_table
  • restaurant_table_feature

Now I want to link multiple features to a table row, with a linked table. Should I call the linking table restaurant_table_feature_table or restaurant_table_to_feature. I've seen both possibilities in multiple systems, but which one would be the preferred on?

I also could simple rename restaurant_table_feature to restaurant_feature, and create a restaurant_table_feature table as link table. However if I also have a restaurant_location table for which I would have features (which differ from the table features) I would run into problems.

What would be the best name to use here?



Answers 3


I guess link table expresses some relationship, for example current feature to table availability or plans to deploy feature or history or all of them (requires more attributes besides just FKs). So it may be availability#restaurant_table_feature#restaurant_table for the first case or status#restaurant_table_feature#restaurant_table for the last one.

Serg
Serg
May 18, 2016 10:07 AM

Seeing that these features would essentially be just additional attributes of a restaurant table, you could view the mapping table as an extension to restaurant_table. Therefore, consider

restaurant_table_extended_info

or

restaurant_table_additional_info
Andriy M
Andriy M
May 18, 2016 10:19 AM

I would suggest restaurant_table_continued

Syed Fawaz Ahmed
Syed Fawaz Ahmed
May 18, 2016 12:21 PM

Related Questions



Converting SQL to Relational Algebra / Calculus

Updated June 20, 2017 15:06 PM


auto-related table mysql

Updated February 28, 2017 17:06 PM