And So I be aware of convention for naming M-M relationship tables in SQL would be to have something similar to so:

For tables User and Data the connection table could be known as


or something like that similar (from here)

What goes on then if you want to have multiple associations between User and Data, representing each in the own table? I've got a site I am focusing on where I've two primary products and multiple independent M-M associations together. I understand I possibly could only use just one relationship table and also have a area which determines the connection type, but I am unsure whether this is an excellent solution. Presuming I do not go down that path, what naming convention must i follow to operate around my original problem?

To really make it more obvious, say my website is definitely an auction (it is not however the principle is comparable). I've registered customers and that i have products, a person doesn't have to become registered to publish a product however they need to be to complete other things. I've table User that has information on registered customers and Products that has information on published products. Now a person can invest in a product, however they may also report a item (junk e-mail, etc.), these two are M-M associations. Everything occurs when either event happens is the fact that an e-mail is produced, during my scenario I've pointless to keep an eye on the particular "report" or "bid" apart from to understand who bid/reported on which.

I believe you need to title tables after their function. Allows say we've Cars the ones tables. Vehicle has proprietors and vehicle has designated motorists. Driver might have several vehicle. Among the tables you can call CarsDrivers, second CarsOwners.


Inside your situation I believe you ought to have two tables: AuctionsBids and AuctionsReports. In my opinion that relate requires additional dictinary (junk e-mail, illegal item,...) and bid requires other parameters like cost, bid date. So getting two tables is justified. You'll propably become more frequently being able to access bids than reviews. Delivering email is going to be a little more complicated when this information is saved in a single table, but it's not just a large problem.

I do not really check this out like a true M-M mapping table. Individuals usually are only a mapping. Out of your example many of these may have more information too. For instance, a table of bids, which may possess a User as well as an Item, will most likely have information on exactly what the bid was, if this was placed, etc. I'd refer to this as table... wait for this... Bids.

For confirming products you may want that which was offensive about this, if this was placed, etc. Refer to this as table OffenseReports or something like that.

You are able to title tables anything you want. I'd just title them something which is sensible. I believe the convention of naming them Table1Table2 is simply because sometimes the associations don't make a lot of sense for an outdoors observer.

There is no official or unofficial convention on relations or tables names. You are able to title them as you would like, wish.

For those who have multiple user_data associations with similar secrets which makes simply no sense. For those who have different secrets, title the relation inside a descriptive way like: stores_products_manufacturers or stores_products_paymentMethods

Then your relation will contribute. For example a regular has 2 companies connected: an company along with a buyer. The connection is determined through the role parents and child play to one another.

You can either put each role inside a separate table that you simply title using the role (IE Stock_Company, Stock_Buyer etc, both link one - many to company - stock)

The stock example is fairly fixed, so two tables could be fine. When you will find multiple kinds of relations possible and also you can't anticipate them now, normalizing it right into a relationtype column would appear the greater option.

This is dependent on the standard from the designers needing to use your model. The column approach is a little more abstract... but when they do not have it maybe they'd better avoid databases altogether..

Both works fine I suppose.

Best of luck, GJ