Skip to content
Advertisement

What’s the standard practice for naming an intermediary table in SQL?

I have a table called Product and a table called Shop. Each shop has a list of Products that it sells. I need an intermediate table that has ShopID and ProductID in it. What should I call that table? My mind has drawn a blank.

ShopProducts?

Edit: Perhaps I should call it “ShopAvailableProducts”? Or is that too confusing.

Advertisement

Answer

Yes ShopProduct (depending on the plurals you use) would be how I’d name a link entity.

Shop
  |
-----
| | |
ShopProduct
| | |
-----
  |
Product

So a shop can have many products and each product can be sold in many shops

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement