views:

68

answers:

5

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.

+3  A: 

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

amelvin
Fair enough. Thanks!
SLC
+1  A: 

I prefer something along the lines of ShopProductsJunction. This article might give a few other naming hints:

...also known as a cross-reference table, bridge table, join table, map table, intersection table, linking table, or link table

Anton Gogolev
+1 would definitely go for ShopProductsJunction.
this. __curious_geek
A: 

Yes, ShopProducts is good enough. No problem with that

vodkhang
A: 

Personally I would just use ShopProduct as it makes sense in my language a product for/from/asociated-with a shop.

Preet Sangha
A: 

Shop2Product (or Product2Shop) is better: "2" in mid shows that this is intermediary table.

SQLDev