DWQA QuestionsCategory: ProgramHow to store and display the avatar data in mongodb website
Busmeys asked 4 weeks ago

Ladies and gentlemen, I want to achieve the same function as the news column of the circle of friends in the website. I use mongodb to store such information as follows:
User name, user profile icon, user shared… 》Wait, such a record.
I would like to ask, that every day in the record of the user’s small head icon such information, will it cause the table to be very large? Can mongodb do the associated table operation? I separate the user name and the user icon into another table and then associate it? How should such a requirement be realized?

Li shisan replied 4 weeks ago

Put the user’s Avatar in the CDN, qiniu, and save a link

1 Answers
Be aggressive answered 4 weeks ago

Don’t worry. No problem. We have commercial landing experience. Neither CDN scheme nor direct storage of Base64 will be a problem. And mongodb has very good performance.
In addition, since NoSQL is selected, you can’t expect to be a database level table Association (foreign key). You need to associate multiple queries in the application memory. Otherwise, the performance under massive data will be more general.