Sharing SQL queries among a team

I don’t even want to think about how many man-hours were spent writing the same queries in order to join the same tables in my company.

When I first started my work, I defined it as inefficiency and began to write representations in a separate scheme for the sole purpose of the convenience of developers.
My boss didn’t like it very much, and I recommended starting to fulfill my general requests for managing source codes in a separate folder from production SQL. This makes sense because some scripts require parameters, and not all of them are read-only.

What is a generic request?

  • Script is used to diagnose certain problems.
  • Script to view the relationships between multiple tables (performing multiple joins)
  • Script, which we do not need in the stored procedure, because it is often configured to diagnose the problem of the day.

Problems I want to send

  • Openness, requests will be rewritten if they are not found
  • Integration with the IDE to be able to easily view requests in the IDE. I tried SQL Server solutions, but they really suck because they only block you from working with this set of files.

I was wondering how all developers use common SQL queries.

thanks

+3
source share
5 answers

, op , SQL, / , .

, :

  • --, SQL , .
  • , SQL .

, SQL- , " ".

+4

, "", , , , .

, - .. , , , .

- , , Share Point . , , , , . - , , .

+2

.

+1

( , ):

  • Formal data sharing for client code
0
source

Submission is the right way to deal with such things. Or, in some cases, a stored procedure.

But there is no rule stating that you also cannot store the DDL for viewing or stored procedure in the original control.

0
source

Source: https://habr.com/ru/post/1713271/


All Articles