Click here to Skip to main content
15,905,508 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: SQL -- more on language choice Pin
obermd20-May-23 15:48
obermd20-May-23 15:48 
GeneralRe: SQL -- more on language choice Pin
honey the codewitch20-May-23 15:52
mvahoney the codewitch20-May-23 15:52 
GeneralRe: SQL -- more on language choice Pin
Sander Rossel23-May-23 3:12
professionalSander Rossel23-May-23 3:12 
GeneralRe: SQL -- more on language choice Pin
PIEBALDconsult23-May-23 4:06
mvePIEBALDconsult23-May-23 4:06 
GeneralRe: SQL -- more on language choice Pin
jschell23-May-23 5:43
jschell23-May-23 5:43 
GeneralRe: SQL -- more on language choice Pin
PIEBALDconsult23-May-23 6:19
mvePIEBALDconsult23-May-23 6:19 
GeneralRe: SQL -- more on language choice Pin
jschell23-May-23 5:41
jschell23-May-23 5:41 
GeneralRe: SQL -- more on language choice Pin
Sander Rossel23-May-23 22:31
professionalSander Rossel23-May-23 22:31 
jschell wrote:
For the most part, especially the way companies use it the vast majority of time ANSI SQL is not that difficult.
True, but when it comes to complex business logic, SQL is really not the best tool for the job.
jschell wrote:
Not sure where you are going with this.
SQL just isn't the tool to build complex systems with loops, if-then-elses, XML and JSON parsing and generation, and even sending out emails.
I've seen stuff like writing to table variables within a transaction so that the data can be written outside of the transaction even when the transaction is rolled back... Or using temp tables because the table should be used across procedures, but still within a transaction while not losing the data on a rollback... Stuff of nightmares really.
And if that's what you're going to do with SQL it becomes very difficult very fast.
And there's just no way to debug all this unless you're going to set breakpoints (which isn't straightforward and will block your entire server, I've never actually seen anyone doing this besides myself).
Just because you can doesn't mean you should.
So yeah, I'm talking about actual programming in SQL (with all the limitations that come with it).
jschell wrote:
But for most businesses, most of the code should in fact be simple.
If you're running a multi billion multinational the code is never simple.
These are some of the customers I've seen this method of working.
jschell wrote:
It is pointless that everyone be a database DBA because there is generally no need for the expertise all of the time.
True, but these companies have their complex business logic written in SQL by people who don't even have the professional courtesy to format their code.
These people have never written code because they're not coders.
They're more accustomed to one-off scripts and that's how they write their not-so one-off SQL too.
Last week I met someone who had never seen a CREATE TABLE script and who didn't know how to write an UPDATE from the top of his head, and he maintains over 10K of stored procedures Dead | X|

I even met someone once who opened a new query window by right clicking on a table and creating a DROP TABLE script, he then deleted the script and so he had an empty query window Dead | X|
He was kind of surprised when I yelled "NO WAIT!" (this was on a production server) and I was even more surprised when he told me he always opened a query window like that.
I then showed him the new query button.

These people shouldn't even be allowed near a database, yet here they are, developing and maintaining huge databases for huge companies.
And my point is, these applications shouldn't be developed in SQL in the first place, but when it is, it should at least be developed by people with proper training.
And if you need people with proper training you might as well hire developers and pick the right tool for the job.

But I guess there's two things at play here, the Dunning-Kruger effect and when all you have is a hammer every problem looks like a nail.
So we have someone who completely overestimates his SQL knowledge and now every problem is solved using SQL.

GeneralRe: SQL -- more on language choice Pin
jschell24-May-23 5:48
jschell24-May-23 5:48 
GeneralRe: SQL -- more on language choice Pin
Sander Rossel24-May-23 21:26
professionalSander Rossel24-May-23 21:26 
GeneralRe: SQL -- more on language choice Pin
jschell25-May-23 6:41
jschell25-May-23 6:41 
GeneralGTA V Premium in offer Pin
Nelek19-May-23 9:44
protectorNelek19-May-23 9:44 
GeneralRe: GTA V Premium in offer Pin
dandy7219-May-23 10:24
dandy7219-May-23 10:24 
GeneralRe: GTA V Premium in offer Pin
Nelek19-May-23 10:38
protectorNelek19-May-23 10:38 
GeneralRe: GTA V Premium in offer Pin
dandy7221-May-23 4:04
dandy7221-May-23 4:04 
GeneralRe: GTA V Premium in offer Pin
Nelek21-May-23 9:51
protectorNelek21-May-23 9:51 
GeneralRe: GTA V Premium in offer Pin
dandy7222-May-23 3:45
dandy7222-May-23 3:45 
GeneralRe: GTA V Premium in offer Pin
OriginalGriff19-May-23 19:08
mveOriginalGriff19-May-23 19:08 
GeneralRe: GTA V Premium in offer Pin
dandy7221-May-23 4:06
dandy7221-May-23 4:06 
GeneralRe: GTA V Premium in offer Pin
OriginalGriff21-May-23 4:14
mveOriginalGriff21-May-23 4:14 
Generalworldle 483 2/6 Pin
jmaida19-May-23 9:02
jmaida19-May-23 9:02 
GeneralIt's Coming Monday. Pin
Gerry Schmitz19-May-23 5:36
mveGerry Schmitz19-May-23 5:36 
GeneralRe: It's Coming Monday. Pin
PIEBALDconsult19-May-23 6:13
mvePIEBALDconsult19-May-23 6:13 
GeneralRe: It's Coming Monday. Pin
Single Step Debugger19-May-23 7:04
Single Step Debugger19-May-23 7:04 
GeneralRe: It's Coming Monday. Pin
MarkTJohnson19-May-23 7:50
professionalMarkTJohnson19-May-23 7:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.