I recently encountered some mysql design issues, which were a bit disturbing, so I came to discuss them with you.
My first question is, is database design very important in the early stage of software development?
If you ask me to answer this question, I think it is very important. But the leaders don't think so now. They think that the data is as simple as being stored in the database, so it should be very fast.
But the current demand is like this. What we are doing now is the strategy of product marketing activities. These strategies are relatively flexible, such as
If you order more than 10 pieces of all products under a certain brand, you can order 1 piece of a popular item, with a maximum of 5 pieces of this popular item.
Order 5 pieces of a certain product, and you will be rewarded with A1 piece of a popular product + B1 piece of a popular product.
A certain popular item is only open to VIP3 and above, and the number of items that can be ordered is different depending on the VIP level.
Wait, wait, wait. . There are many restrictions and rules. The leader's idea is to save data, put these activity rules in a json string and save it in mysql. My idea is to split the tables as much as possible, because mysql is a relational database, and it is stored in json strings, which is not conducive to reading. This is where the disagreement arises. . Then the second question comes,
The second question is whether it is appropriate to put these rules and restrictions in a json string? How to better store and manage these flexible activity rules.
Thank you all in advance, thank you all, ~(≧▽≦)/~ la la la.
I recently encountered some mysql design issues, which were a bit disturbing, so I came to discuss them with you.
My first question is, is database design very important in the early stage of software development?
If you ask me to answer this question, I think it is very important. But the leaders don't think so now. They think that the data is as simple as being stored in the database, so it should be very fast.
But the current demand is like this. What we are doing now is the strategy of product marketing activities. These strategies are relatively flexible, such as
If you order more than 10 pieces of all products under a certain brand, you can order 1 piece of a popular item, with a maximum of 5 pieces of this popular item.
Order 5 pieces of a certain product, and you will be rewarded with A1 piece of a popular product + B1 piece of a popular product.
A certain popular item is only open to VIP3 and above, and the number of items that can be ordered is different depending on the VIP level.
Wait, wait, wait. . There are many restrictions and rules. The leader's idea is to save data, put these activity rules in a json string and save it in mysql. My idea is to split the tables as much as possible, because mysql is a relational database, and it is stored in json strings, which is not conducive to reading. This is where the disagreement arises. . Then the second question comes,
The second question is whether it is appropriate to put these rules and restrictions in a json string? How to better store and manage these flexible activity rules.
Thank you all in advance, thank you all, ~(≧▽≦)/~ la la la.