mysql - multiple foreign keys to same table -
There are several fields in my table whose values were:
No, yes, yes ( Front), yes (back), yes (above), yes (front and back), ....
So yes, it also has a situation I have two options, first of all: each column Add another location field to the second, to create another table to store these values and references to that table. And I choose another implementation.
But to retrieve the data, I will have to be included in the same table several times (7 times) and I have to do about 15 other (like brand name ). If my parents have only ten thousand records in the table and there are 10 or 11 records for just getting the data in the reference table, then which method is a better form performance perspective?
1- Create a function in my application and get the value from it Enter the reference ID
2- Use of joining and renaming the reference table in each join
If you experience the same problem then I will be appropriated to share it with me.
Thank you in advance.
Comments
Post a Comment