Put business logic in the application, not the database

We’ve all done it. We needed to pull data out of an SQL database, and the query we needed to pull out data was a complex query with multiple table joins, complex filter criteria, and sophisticated WHERE clauses.And why not? SQL databases such as MySQL and PostgreSQL are really good at performing complex joins, filtering, and sorting in order to get exactly the data you need out of a query and nothing more. Let the database do the work! It sure is a lot easier than having to write that logic in the application code, right?Wrong. [ Also on InfoWorld: How to choose a cloud database ] By performing these operations inside the database, what you are really doing is pushing application business logic down into the bowels of your database. You are taking this business logic out of your application code, and moving it into database logic instead.To read this article in full, please click here

Nov 30, -0001 - 00:00
 0
Put business logic in the application, not the database
Techatty All-in-1 Publishing
Techatty All-in-1 Publishing

We’ve all done it. We needed to pull data out of an SQL database, and the query we needed to pull out data was a complex query with multiple table joins, complex filter criteria, and sophisticated WHERE clauses.

And why not? SQL databases such as MySQL and PostgreSQL are really good at performing complex joins, filtering, and sorting in order to get exactly the data you need out of a query and nothing more. Let the database do the work! It sure is a lot easier than having to write that logic in the application code, right?

Wrong.

By performing these operations inside the database, what you are really doing is pushing application business logic down into the bowels of your database. You are taking this business logic out of your application code, and moving it into database logic instead.

To read this article in full, please click here

Talk to Techatty
Talk to Techatty
Techatty Connecting the world of tech differently! Read. Write. Learn. Thrive. Make an informed decision without distractions. We are building tech media and publication networks to connect YOU and everyone to reliable information, opportunities, and resources to achieve greater success.
Vote HARRIS for PRESIDENT.
Vote HARRIS for PRESIDENT.