I want to ask a question about MongoDB and its design with Spring Boot – MongoRepository.
I want to design a system for a project. As models, I’ll have
- User
- Market
The user can add markets to his/her favorites. But the user will have his/her username, password, etc.
How could you design a system like above? I don’t want to keep the password and favorites in the same class since it’ll have security vulnerabilities. Am I right? Is it good to hold passwords and favorites in the same documents?
I’m a beginner in BE – Database development so all answers are appreciated!
Have a good weekend!