Answer the question
In order to leave comments, you need to log in
What is the best way to store the data of a 7-level affiliate program in the database in one table or in different ones?
Guys, hello!
Such a theoretical question - how best to store data? In different tables or in one?
Now I have such a structure - the USER table and it contains - ref1, ref2, ref3, ref4, ref5, ref6, ref7.
But such a structure confuses me, on the one hand it seems to be convenient, but this is probably not correct, because. there will be duplication of data, which is good according to the rules of normalization.
Accordingly, the idea arises to create 7 separate tables - Level1, Level2, Level3, Level4, Level5, Level6, Level7.
But then the question arises, what to write in these tables? If someone has experience, please tell me how best to do it. I just started writing code, but this is something that confuses me. It's just a question of how to track the data when paying partners. And will there be many queries to the database?
I would be very grateful if you share your experience - please do not send books and books to Google, I have already rummaged through a ton of material. I implemented a one-level affiliate program, but here is the question.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question