4 ms·
If you write your code in such a way where business logic and database access are separated you won't have to mock out the database. Business logic is where the
by bluntfang 6y ago
If you write your code in such a way where business logic and database access are separated you won't have to mock out the database. Business logic is where the Good Stuff is. We can trust that the database access package is working because we probably didn't write it and it probably has it's own set of tests.
- btilly 6y agoIf your business application deals with large volumes of data, trying to abstract out the database is a recipe for performance problems. Instead you want to push logic to the database. To give a real example, I'm working with time series generated by sensors on factory equipment. They can easily have millions of records per day.