While designing an enterprise application using MS SQL, .NET Core and React JS, using the microservices-based architecture.
Suppose it is related to employees and we have their salaries, payrolls, leaves, taxes and all related data. They need to view their income taxes, commissions, and salary taxes over time.
- Now what is the best approach for business logic i.e. calculations related to income taxes and others? Should it be at the DB level or the Code level? Which is better and best practice?
- Now for highly related Data i.e data is required from 7-10 tables and then need to perform calculations on it, should it be done at DB level? If not then to do so at the code level should I fetch the data from each table separately or should I use any view to merge data and get it in one call?
- What is the case where we should use stored procedures and what is the case where I need to prefer code level over stored procedures for business logic?
I am trying to learn the architectural things and can’t find any course or site that is open source for learning
Kashan Khan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.