Hello, I originall asked this question on Reddit : https://www.reddit.com/r/Supabase/comments/15pu5gn/how_do_you_organize_business_logic_with_sql_in/<p>Re asking it here, to get more answers, thoughts.<p>---------------------------------------------------<p>I am Postgres fan just like Supabase and also big fan of Supabase due to their contributions to Postgres ecosystem and their opensource philosophy.<p>Now to the question, currently we are developing project using Postgraphile which also use PGSQL, SQL to write business logic similar to Supabase postgREST.<p>But we are having a hard time organizing business logic in SQL ex: large functions with series of mutations and data fetching, organizing code to higher abstractions than functions and etc.<p>We are aware of general SOLID principles, but it is difficult to implement them in practice with database mutations, Is there any best practices, tips to follow when writing business logic in SQL?<p>It would be great, to see response from Supabase team on this.