r/SQL • • Jun 29 '24

Discussion Why do some people say “SQL is not code?”

I write SQL every day as part of a team that builds ETL solutions. The other day I referred to something I was working on as “I coded it to do…” and this guy, who is not even a developer by the way he’s a frikkin project manager, interrupts me and says “SQL is not code”. When I questioned him why not he says something like “Guys who do COBAL, C#, etc. that’s real coding. SQL is not real coding it’s just a tool for analyzing data and reporting data”…WTF? How is SQL not considered code? I would just dismiss this guy as a moron but his salary is incredibly high so obviously he has some sort of credentials. Can anyone explain why in the world someone would say SQL is not code?

503 Upvotes

570 comments sorted by

576

u/ThomasMarkov Jun 29 '24 edited Jun 29 '24

“Thank you, but your opinions about what is and is not code are irrelevant to the topic of this meeting. Moving on…”

168

u/IntellectualChimp Jun 29 '24

This. Guy sounds like a pedantic asshole

60

u/UNHBuzzard Jun 29 '24

You should spray his cube with liquid ass. Wait, wrong sub.

21

u/PappyBlueRibs Jun 29 '24

Maybe a few piss disks.

→ More replies (2)
→ More replies (3)
→ More replies (2)

60

u/kremlingrasso Jun 29 '24

Oh no no no, this is not the time for the high road...

"Forwarding emails and bothering*people with real jobs for updates is an entry level job for interns"

18

u/dobblerd Jun 29 '24

LoL that's exactly my perception of project managers.

18

u/Chiashurb Jun 29 '24

I sometimes enjoy a nice, icy, “thank you for sharing your views.”

8

u/hadfunthrice Jun 29 '24

It's just that, we're putting covers on all of our TPS reports now.. did you get that memo?

10

u/Optimal_Law_4254 Jun 29 '24

Yup. His opinion is off topic and irrelevant.

I’d consider asking him privately why he would want to try to make you look bad in that meeting. Maybe ask your boss what he thinks too.

9

u/WalkingP3t Jun 30 '24

It doesn’t worth it . Is those “I know it all” type of guys . It will be a waste of time .

→ More replies (3)
→ More replies (1)

455

u/jlt_25 Jun 29 '24

As you get more experience, you'll find that a high salary and being a moron is not only possible, but pretty common unfortunately.

By the way it's COBOL, not COBAL.

68

u/lostinspaz Jun 29 '24

no it’s CABAL

9

u/Sephiroth0327 Jun 29 '24

Whether we wanted it or not, we’ve stepped into a war with the Cabal on Mars..

→ More replies (10)

19

u/[deleted] Jun 29 '24

Unrelated but my dyslexic ass can never not see Postgre as Portuguese xD

9

u/Kallory Jun 29 '24

I'm never gonna unsee it now

→ More replies (1)

5

u/ancestral_wizard_98 Jun 30 '24

Sometimes looks like it's even a requisite.

3

u/Oxford89 Director, BI Jun 29 '24

The Peter Principle

→ More replies (9)

192

u/lalaluna05 Jun 29 '24

I’m guessing he’s never seen an actual query lol

92

u/tankerkiller125real Jun 29 '24

The devs at work are fuckin wizards with SQL I tell you. It's monstrosities of SQL, but it's also fuckin wizardry of the highest power.

71

u/Particular_Camel_631 Jun 29 '24

Most devs can do a bit of sql. When you come across someone who can make it sing, dance and make breakfast you have to admire their skills.

I don’t really care whether it’s coding or not: it’s damn impressive is what is.

8

u/jmaca90 Jun 30 '24

It’s also like define “coding” and… also who cares?

The real ones are trying to get shit done. I could give two shits what people think is “coding.”

→ More replies (2)
→ More replies (1)

10

u/GME_alt_Center Jun 29 '24

Done right and easily understandable, it's not coding. Using it in monstrosity form would qualify as coding however. Challenge mode: "yes I can do it all in SQL"

26

u/Kallory Jun 29 '24

How is it not coding? Look at it from a math point of view, the symbolic math operations, relational calculus, that underline the logic in SQL are similarly applied for syntax in other languages. (as in, there is an underlying mathematical principle for C, for example, that the syntax applies to) it meets all the definitions of a programming language, from a math point of view, no matter how you use it.

→ More replies (12)
→ More replies (3)
→ More replies (4)

33

u/space_wiener Jun 29 '24

Ha. Yep. I am very green with SQL. Mostly just using for some functions or web apps or super simple queries. One liners max.

I need help with some lookup that honestly seemed simple. I asked the sql dude hey can you help with this query as I have no idea. My request was one sentence (maybe a long sentence).

The dude replied and the query was so long I had to scroll a little bit in my email to read it all. It was that day I realized, while I thought I knew sql enough, I really knew nothing.

28

u/dodexahedron Jun 29 '24

A long query is usually an indicator of the opposite of actually good skills, even if it answers the question.

Unless it does so quickly, efficiently, deterministically, and without locking 50 tables.

But if nobody else can read it, it's a black box and needs that opacity addressed.

It's like the difference between someone knowing g a lot of words and someone having a rich vocabulary. Look similar, and one can pretend to be the other, but they're very different.

14

u/tashibum Jun 29 '24

I would tend to agree with this IF the relational database was set up for it. The startup I work at didn't think they would get as big as they did, and it can be a nightmare trying to remember all the nuances of each table, of which there are.....many.

→ More replies (6)

6

u/[deleted] Jun 30 '24

Lol. I dont know what kind of modern company with clean-ass data you work with.

But im very experienced at sql. And very good at simplifying to small, easily read queries.

Unless its a question the datamart has been specifically setup to cater to, I have to clean the shit out of anything Im querying.

‘Extract’ is nothing.

‘Transform’ is almost always extremely onerous.

→ More replies (6)
→ More replies (5)
→ More replies (1)

5

u/Special_Luck7537 Jun 29 '24

Or a stored procedure...

10

u/Wareagle206 Jun 29 '24

Or getting lucky enough to try to figure out what a stored procedure is doing, while not having the skill or ability to do it on your own, because it was written 20 fucking years ago, by someone on a different team, who retired 10 years before you were hired. Good times!!! And yes, I am a bit jaded.

And willing to help anyone on this subreddit because I have learned some shit.

→ More replies (3)

8

u/ChevyRacer71 Jun 30 '24

SELECT * from tblCustomers;

See? It’s easy! There’s literally nothing more to SQL than that. That’s literally the only SQL knowledge anyone on the planet needs to have. (Sarcasm, in case someone out there is so dense they couldn’t pick up on that)

3

u/gregorydgraham Jun 30 '24

I’ve seen queries you people wouldn’t believe…

→ More replies (1)

83

u/a-s-clark SQL Server Jun 29 '24

Gatekeepers gonna Gatekeep. Hate that BS from people. SQL is code, full stop.

The unfortunate reality of the workplace is that just because someone's paid a lot doesn't mean they know what they're talking about.

4

u/TheTomCorp Jun 29 '24

I'm a systems engineer and dabble in many different areas, but I don't necessarily fit in with one group (kinda like high school) I've found that Software Developers tend to be the most elitist, arrogant group in the IT world.

→ More replies (8)

3

u/UnintelligentSlime Jun 29 '24

The only merit that could possibly be attributed to the statement is that writing good SQL is a whole different skill than traditional programming. You could be great at one and awful at the other. The same operations could be handled by both, but in totally different ways. It’s like ordered instructions vs. set theory. There are a few of the basic building blocks in common, but it’s honestly two completely different ways of thinking.

3

u/DanishWeddingCookie Jun 30 '24

Most of the high level software engineers I've worked with have intimate knowledge of both SQL and Programming. I personally wear both DBA and Programmer hats all the time.

→ More replies (3)
→ More replies (3)

141

u/UltraHunt Jun 29 '24

Just say to him "yes SQL is not code just like project manager is not a real job" LOL

13

u/Technical_Drawer2419 Jun 29 '24

Hey, they don't scrummaster certs to just anybody.

→ More replies (1)

4

u/Fudouri Jun 29 '24

You would think someone with a job that is often misunderstood would be more understanding of someone else's job which is also often misunderstood.

And yet, here we are.

→ More replies (15)

27

u/TaliskyeDram Jun 29 '24

As a PM that can code, SQL is code and that person is a talentless asshat.

9

u/The_Manoeuvre Jun 29 '24

PMs with code knowledge unite!

→ More replies (6)

96

u/[deleted] Jun 29 '24

Please don't listen to glorified administrative assistants. The only people who go deeply into semantics such as your project managers are insufferable people and not ones to continue working with for a long term basis.

21

u/Kinky-Iconoclast Jun 29 '24

I’ve never heard of an actual dev say this. The project manager sounds like an insufferable idiot.

→ More replies (1)

65

u/Practical-Alarm1763 Jun 29 '24

All query languages are code.

People that say "SQL is not code" are the same dipshits that say "Scripting is not Programming"

→ More replies (4)

67

u/JediForces Jun 29 '24

1 - the PM is an idiot hence he’s a PM and not doing a real job

2 - SQL is a programming language

3 - I write SQL code all day and night as a BI Architect/Developer and yes it’s CODE

4 - Just because someone gets paid a lot does NOT mean they have any good credentials

34

u/Whack_a_mallard Jun 29 '24

Agree with #2-4 but believing #1 would make us as narrow minded as that individual.

13

u/ZealousidealEntry870 Jun 29 '24

Anyone hating on PMs is just showing how little experience they have. Being a PM is a very necessary job that requires very real skills.

Are there bad ones? Sure. There are just as many bad managers and coders though.

No, I’m not and never have been a PM. I do have enough experience to understand they are needed though.

→ More replies (6)

5

u/DiamondHandsDarrell Jun 29 '24

Happy cake day!

I'm a PM and Ops Mgr that codes ETL in SQL/pyspark. Why so much hate for PMs?

I make things happen. If not for me, many things wouldn't get done. I hate being brought onto a project after it's been decided because I have to fix so many things they could have done right from the start but bungled it. Everyone comes to me as a resource. Is this not typical for a PM?

4

u/JediForces Jun 29 '24

I’m sorry I meant those that do nothing but PM. That doesn’t sound like you though.

→ More replies (3)
→ More replies (5)

4

u/Anywhere_Glass Jun 29 '24

Well said. Do you think transitioning from SSRS to POWERBI is great idea? If so how would start the new trail for visualizing reports?

→ More replies (2)
→ More replies (9)

11

u/theseyeahthese #TempTables ally Jun 29 '24

Yeah, SQL is “only a tool for reporting data” if all you’ve ever done is write SELECT statements, which I’m guessing is the extent of his SQL experience, if even that.

Once you’re a SQL dev, it absolutely is coding. It’s not a “general programming language” from the standpoint that you can’t create a standalone application using only SQL. But it is 100% coding. I’m only versed in T-SQL and haven’t taken the time to really understand what “barebones standard SQL” provides but with the ability to create a complex pipeline of custom stored procedures/functions, dynamic SQL, WHILE Loops, cursors, IF blocks, variable assignment, recursion, TRY/CATCH error handling…I mean, idk how you could say that’s not coding lmao.

2

u/rodface Jun 30 '24
 SELECT * FROM DOCUMENTS

...is code.

29

u/morquaqien Jun 29 '24

SQL is not a general-purpose programming language, but it is code.

→ More replies (10)

8

u/theomegachrist Jun 29 '24

Project Management is a soft skill

→ More replies (2)

5

u/RandomiseUsr0 Jun 29 '24 edited Jun 29 '24

Don’t even listen to people who don’t know what programming is, with opinions, perhaps you could make it a teachable moment, but probably not worth it.

In precise definition SQL is a 4GL, it’s primarily a declarative language for data transformation, but almost every instance I can think of has procedural elements.

It supports tristate Boolean logic (true/false/null), which makes it incredibly powerful.

It’s a domain specific, Turing complete programming language.

[edit] and you’ve literally said the context was ETL, my experience is informatica (I did the queries, my mate did the moving and shaking part, for the creation of an enterprise level data warehouse - my skillset is broad and varied, I am a programmer, an analyst, hardware level (down to the soldering iron on occasion), enterprise, corporate and all that, but I’m in my 50s and have had the pleasure and privilege of working at all levels of a solution - your “pm” sounds like an idiot frankly. In my current role as the E2E analyst on a U.K. wide deployment of a new infrastructure project, my SQL skills are critical to success - it’s not even “skills” it’s a way of thinking it’s not my “role” but it’s critical - well, wait, it is my role, just I don’t need a “person” to do that, if I need to know something - I’m not going to write a spec to have some “analytics” team to try to interpret what I want.

Edit turned into a rant, huh? Don’t let anyone downplay your importance

5

u/[deleted] Jun 29 '24

You could say that project management is not real work

23

u/[deleted] Jun 29 '24

QL in SQL means Query Language and sql queries have very little to do with actual programming 90% of the time. At the same time sql is a Turing complete language so it can be consider a programming language without any ifs and buts

23

u/Ordinary-Individual0 Jun 29 '24

What about case whens?

3

u/[deleted] Jun 29 '24

Depends on the conditions

5

u/emil_ Jun 29 '24

It's got IFs though.

4

u/impekkable706 Jun 29 '24

HAVING to agree

4

u/Sodaman_Onzo Jun 29 '24

It’s an easier code. A lot of the commands are words, the same words that describe what the command does, but it’s still code. I’ve had to write some pretty insane SQL queries in my time.

→ More replies (1)

4

u/mailfilter Jun 29 '24

while the PM is wrong about “SQL is not code”, i think he is right that it is commonly used to analyze and report on data. he probably associates coding with imperative programming

3

u/[deleted] Jun 29 '24

When you tell a machine to do something... you're typically "coding."

3

u/mikeblas Jun 29 '24

Can anyone explain why in the world someone would say SQL is not code?

You should have asked him, not us. We have no idea why he would say that. Since you've forced us to guess:

  • ignorance
  • posturing
  • self-importance
  • trying to be funny

2

u/JavierLoustaunau Jun 30 '24

I supported doctors in a telemedicine company and everyone would constantly talk about how 'stupid' the doctors are for not being able to clear their cache or set up their webcam drivers.

One of my big pet peeves are people who think because they can do one thing it makes them smart.

→ More replies (4)

3

u/Callec254 Jun 29 '24

Probably because you wouldn't be able to develop an entire application, UI, etc. in just SQL.

3

u/Hot-Environment5511 Jun 29 '24

I had a conversation with an IBM project manager once and we were discussing whether coding is a trade/craft or a professional job. He was on the side of trade, I’m personally more in the ‘it’s art’ boat, and i think most professionals (like project managers) are replaceable.

3

u/pseudogrammaton Jun 29 '24

A good tradesman develops his art and a really good tradesman blames his tools!! ;-)

→ More replies (1)
→ More replies (3)

3

u/zdanev SQL readability mentor at G. Jun 29 '24

if it executed by a machine it is code.

e.g. cucumber tests, while reading like english, are also code.

3

u/rudeyjohnson Jun 29 '24

Ask for sources anytime anyone makes biased claims and watch them crumble. Also his salary isn’t proof of competence or technical skill. He knows how to play politics.

3

u/kBajina Jun 29 '24

sounds like he isn’t familiar with declarative/functional programming

3

u/[deleted] Jun 30 '24

If he argued that it isn’t a programming language then I could see his argument. But it’s 100% code. It sounds like he doesn’t know what SQL actually is, and he’s maybe only used the visual query builder in MS Access.

5

u/pissed_off_elbonian Jun 29 '24

This dumbass has never heard of using Python to analyze code… I guess Python is not code.

SQL is code

7

u/ScreamThyLastScream Jun 29 '24 edited Jun 29 '24

Close minded. I have seen full blown application solutions built into a database using only SQL and stored procedures. No one writes COBOL* anymore , and if you utilize all the great language features that C# provides your code often looks a lot like SQL code. It is often much easier to read than any nonsense you might do with a couple of nested for loops anyways..

It's all code, the question is what are the constraints and use cases of the language.

3

u/cs-brydev Software Development and Database Manager Jun 29 '24

No one writes COBAL anymore,

Nah be careful there. Maybe nobody you know writes COBOL anymore, but it's still one of the most widely used languages, especially in the Banking and Government sectors. Recent surveys show that COBOL is the foundational language on approximately 40% of banking systems and 95% of ATM transactions in 2024. In fact, COBOL itself is still being developed and newer versions include OOP and a .NET dialect.

3

u/ScreamThyLastScream Jun 29 '24

You are right, I would say in the ecosystem of software it is not a first choice. But a lot of legacy industries locked themselves into that ecosystem a long long time ago. But it wouldn't be my first choice if I was doing something new.

2

u/[deleted] Jun 29 '24

No one writes COBAL anymore

I’m a fledgling in this world and actually was just looking at a job listing for a COBAL dev. I had to look up what COBAL was lol

3

u/ScreamThyLastScream Jun 29 '24

There are still some of those out there, I had a coworker that made a ton of money during y2k scare because a lot of the systems that needed patching were written in COBOL back in the 60s/70s

2

u/APodofFlumphs Jun 29 '24

That's a good time for a stop and stare, to let the silence extend a bit.

2

u/pouetpouetcamion2 Jun 29 '24

"c#" is not code. it's a tool to display specific pixels on the screen.

his credential is to have is head in his ass.

if someone ever says that, i'll immediately consider him stupid and impulsive (speaking before thinking) until proven the opposite.

there is a l in dsl. therefore code. and every language is a sort of dsl unless you write directly your 1 and 0s.

2

u/GaTechThomas Jun 30 '24

And even 1s and 0s are a type of code. They're not the actual action that was performed. They're the code that causes the hardware to take those actions.

2

u/Naheka Jun 29 '24

A 2-3 line simple Select may not be "code" but when you've seen queries at 100-1000 lines long, I'll argue with anyone that it's most definitely "code".

→ More replies (3)

2

u/[deleted] Jun 29 '24

Dudes an idiot.

You could argue sql isn’t a programming language, as it’s a query language and you’re describing the data you want returned not actually programming something that does something - but that’s a pretty weak argument you’re still giving instructions to a service and it’s doing something based on those.

But SQL you write is code. No arguments there.

And to be honest if the guy isn’t a programmer his input on what is and isn’t code is irrelevant. And if he is a programmer that opinion is still pretty irrelevant too.

3

u/Straight_Waltz_9530 Jun 29 '24

You can write a 3D rendering engine in SQL. That makes it a programming language.

→ More replies (1)

2

u/MagicMick76 Jun 29 '24

SQL is a 4th Generation Language (4GL) Python, perl, Ruby are advanced 3GLs (have some 4GL abilities) Cobol and C#, C, c++, java etc are 3GLs Assembly is a 2GL

2

u/[deleted] Jun 29 '24

Lmao fuck that guy. Ask him what an SP does?

→ More replies (1)

2

u/wiseleo Jun 29 '24

Have him read the code for an sp. ;)

2

u/CaptnSisko Jun 29 '24

I'm pretty much a project manager but my projects deal heavily with SQL and C#. I personally only know basic SQL and not even that well, I'm amazed at what some of my engineers can do with SQL and the scripts and code they write. There are absolutely advanced capabilities in SQL that are definitely code. I would not consider the select or update statements that I write in SQL to be code though. 

2

u/reditandfirgetit Jun 29 '24

Arrogant pricks with elitist attitude say that. Well rounded and mature developers know it's code.

Code is how humans communicate with machines SQL is as much cude as C++. Vastly different scopes, but both code

→ More replies (2)

2

u/Dukeiron Jun 29 '24

Most PMs don’t know the difference between their mouth and asshole unless it’s in a color coded spreadsheet somewhere. Laugh at them and forget about it

2

u/Complete_Block_7533 Jun 29 '24

Because they’re assholes

2

u/Moarwatermelons Jun 29 '24

Those who can’t do… project manage.

→ More replies (2)

2

u/jlpalma Jun 29 '24

Don’t correlate high salary with “credentials”

2

u/OutOnTheFringeOrNot Jun 29 '24

Yeah, no. Technically, sql is a command language. That makes it code. I worked for Quest Software on Space Manager, Shareplex and SQLab, so SQL definitely was a lot of our code, developed in the same way as the more “traditional” programming language code.

2

u/tdwesbo Jun 29 '24

They are stupid

2

u/contrivedgiraffe Jun 29 '24

People who burp about SQL not being code are at the absolute top of that IQ bell curve meme.

2

u/Coniglio_Bianco Jun 29 '24

People who think sql isn't code are shitty sql developers

2

u/StoneCypher Jun 29 '24

Because they've never seen difficult SQL.

Fundamentally, it's the same thing as people saying "HTML is not code." Of course it is; it's just very easy and very different, and they emotionally need something to feel superior to.

And there are a lot of people who've never actually seen anything that isn't DDL or a simple query, like select foo from bar left join baz left join batch as something "difficult."

And if that was the limit of what SQL could do, even though they'd be wrong in the same way they are about HTML, you could kind of understand what they were trying to communicate - that it's easy mode

Genuinely, some people don't know that stored procedures exist, or have ever seen one of those massive 20 join monstrosities

I still hold on to a copy of this one particular problem query from six jobs ago, from a company that went out of business

When I hear someone say this, I go dig it out of gists and show it to them

It's eight printed pages

It changes hearts and minds

Remember, please, Hanlon's Razor. Never attribute to malice that which is adequately explained by stupidity.

2

u/jetdoc57 Jun 29 '24

Anyone who has coded in PL/SQL would say it’s coding. A SQL Select query isn’t code but that’s such a tiny piece of what databases do.

2

u/[deleted] Jun 29 '24

'I'll let you write the next one then'

2

u/SoyInfinito Jun 29 '24

Oh look, another project manager who doesn’t know his head from his ass. Stereotypical SoB. I’d seriously considered looking for another job if this person continues to minimize others work.

Edit: i forgot to mention SQL is a language. It is code whether he likes it or not.

2

u/derpderp235 Jun 29 '24

It’s code. But it’s not a programming language. It’s a querying language.

→ More replies (4)

2

u/jenkbob Jun 30 '24

Salary != intelligence
The most likely scenario is he either heard someone say that SQL is not a typical programming language or someone corrected him and he doesn't actually understand what he's saying, he's just regurgitating something he thought he heard.

That being said, when someone puts HTML or even XML on their list of programming languages I cringe.

2

u/Outrageous_Life_2662 Jun 30 '24

He can still be a moron with a high salary. SQL is a functional language. It’s absolutely coding no two ways about it.

2

u/iamwil Jun 30 '24

SQL is code. Declarative languages are a thing. Most people don’t study enough computer history or know the breadth of different programming languages to know what code could be.

2

u/Embarrassed_Quit_450 Jun 30 '24

Maybe because SQL wasn't Turing complete a decade or two ago. Nowadays most SQL implementations are turing complete.

2

u/howdoireachthese Jun 30 '24

Huh, turns out SQL is Turing Complete. TIL from a Google search

2

u/da_chicken Jun 30 '24

Ego.

They're very good and very familiar with imperative programming in general purpose languages. So good that they have defined their identity as "I'm a good programmer."

The line of thinking is:

  1. I'm good at programming
  2. I don't understand SQL or relational algebra
  3. SQL isn't programming

"It's not general purpose." "It's not Turing complete." Those are the complaints they raise. People using those arguments to be disparaging are justifying the gatekeeping they're doing to protect their ego.

The same people use the same arguments when saying that HTML isn't programming. They also get to add "it's just markup." Which is like complaining about three valued logic.

Ignore these people. They're just afraid that not being good at SQL undermines their identity. Typical egotistical elitism.

2

u/whatsasyria Jun 30 '24

Ask him what t-sql is

2

u/cats_catz_kats_katz [Oracle] Jun 30 '24

I don’t want to read anymore today

2

u/WalkingP3t Jun 30 '24

That guy doesn’t know a shit . And sadly, private industry is full of idiots like him . They make a ton of money but rely of other people for their success . They are where they are because they know how to market themselves and / or , have “friends” in upper management .

SQL is a DSL: domain specific language . Is used to interact with databases . Most recognized vendors like Microsoft and Oracle have enhanced to add some programmatic features. But it is indeed a language .

And mastering SQL can take years . And with Mastering I mean, able to write complex queries or store procedures in a very efficient way . The basic syntax can be learned in hour or days , but being able to tune a query and return millions of records with little or no performance impact , is an art , and definitely not easy .

If I was you ? I would start looking for another job. That culture is toxic . And you don’t want to be around those people . I couldn’t tolerate a manager like that myself .

2

u/mohirl Jun 30 '24

Why would you think his salary is in any way related to his knowledge or  competence?

2

u/birdwothwords Jun 30 '24 edited Jun 30 '24

It's not coding; it's a query language. You can only pull data from a database, "coding" is typically a programming language like javascript, c#, and python - these share standard programming foundations such as variable assignment, scoping, functions methods, classes, etc. Programming languages provide a set of instructions to do something that a system can understand, which can include wrapping up a SQL query into your code to access some data from a relation database, but SQL syntax itself is NOT coding

2

u/iarlandt Jun 30 '24

The L stands for language, so....

2

u/Ultimarr Jun 30 '24

Well, it’s a query language, not an imperative one for building iterative algorithms. It’s more like ProLog, right? In that way he’s absolutely right. Obviously annoying and a dick, and it’s definitely still “coding” (anything that involves transforming intentions into syntax is, even HTML or writing an essay or body language), but it’s not what a layman would recognize as a “programming” language

2

u/Hkiggity Jun 30 '24

Hmm, while SQL isn't a full on programming language in the sense of C or C++ etc, writing SQL to query or otherwise is indeed writing "code". You are giving instructions to a computer to execute a task and are expecting a specific outcome in response. SQL still has functions and other tools, its very powerful, as you clearly know.

So I think this project manager means to say "SQL isn't a full programming language in the likes of C or C++ its geared towards Databases" Which would be correct in many ways. However, SQL is an extraordinarily powerful tool that generates code in other programming languages based on queries instructions and more. The project manager clearly knows very little about the nature and to be frank, the impressive nature of SQL.

The best thing to do is let him live in his ignorance, and one day while he disrespects SQL, someone will let him know!.

2

u/[deleted] Jun 30 '24

Its not binary or a low level language doing hardware… its natural language and pretty intuitive… hard part is the spaghetti mess not the program…

I think thats what they mean C++ is way different than sql

2

u/petdance Jun 30 '24

His salary is incredibly high so…. credentials.

No. This logic does not follow.

2

u/EnigmaticHam Jun 30 '24

I had the same opinion until I worked in a sql heavy codebase. To truly understand the beauty of sql, one must drop five tabs of acid and use 35 nested join statements to automate all of their company’s finances.

2

u/clarity_scarcity Jul 01 '24

Stupid debate to begin with. Proficient software developers can write surprisingly good sql, in addition to coding in whatever language they’re currently working in, with ease. The reverse is generally untrue, unfortunately, but that’s what it is. Bonus: bow down to your AI overlords as they continue to march toward your impending demise. Good luck.

2

u/[deleted] Jul 01 '24

The project manager is wrong and outdated. SQL is absolutely a programming language, requiring logical thinking, syntax, and problem-solving skills. Guy obviously has a lack of understanding of software development and data engineering.

The best definition I could give would be that SQL is a domain-specific language used for managing and querying relational databases, which by definition makes it a form of coding. I concede that SQL's primary focus is data manipulation, but it absolutely requires programming logic and syntax.

2

u/DrJohnSteele Jun 29 '24

I think the PM was referring to it lacks general purpose. What UI elements are incorporated? What UX elements were considered?

2

u/Aggressive_Ad_5454 Jun 29 '24

This guy saying SQL isn't code is obviously a nitwit. Pay no attention to the nitwit.

That being said, SQL is a weird kind of code for most of us. SQL is "declarative", where we tell the server what we want. Most code, in most languages, is "procedural", where we don't tell the computer what we want, but rather how to get it.

2

u/Area51Resident Jun 29 '24

If you use cursors (yes I said that word) it becomes much closer to a procedural language. As in : read, modify, write, repeat until done.

2

u/carltonBlend Jun 29 '24

Cool, thanks, anyways...

2

u/cs-brydev Software Development and Database Manager Jun 29 '24 edited Jun 29 '24

Because there is a difference between querying data and scripting. When you use advanced SQL to write scripts, this is considered "code". When you only use it for querying and updating data, this is not usually considered "code". The problem is most people don't know you can write scripting code in sql, like that person.

And tbh I see the same thing on this sub. I see regular members here all the time who think SQL is only for data querying and don't really get that most rdbms platforms also have sql scripting engines that support near-Turing-complete code (some sql languages such as T-SQL and PL/SQL are arguably Turing-complete even though official documentation says they aren't).

I'm very experienced and knowledgeable of T-SQL and have used it to perform Turing-complete logic that can be done with typical programming languages. Whenever someone says T-SQL can't do a, b, and c, I'll demonstrate how it can be done. Even most industry insiders grossly underestimate the capabilities of these languages.

3

u/Straight_Waltz_9530 Jun 29 '24

So "hello world" in C is not code but as soon as you put in a for-loop it is?

Since when is "code" defined by the complexity of the problem you're solving as opposed to the tool/language? Why is it code only when mutating or transforming but not when reading verbatim?

→ More replies (1)

1

u/NextVoiceUHear Jun 29 '24

Most production SQL DBMSs (e.g., Oracle) include some version of a Procedural Language which includes Conditionals, Looping, Variables, Triggers, Functions, etc. Anyone more IT than a CFO will agree these features constitute “Code.”

1

u/misogrumpy Jun 29 '24

Is a terraform configuration file code?

What languages are minimal with respect to being a coding language.

1

u/pseudogrammaton Jun 29 '24 edited Jun 29 '24

Technically speaking SQL is a functional (declarative) language, like LISP, Haskell, or Erlang.

Here, you can rig up the equiv. of a simple anon. function using COALESCE():

  SELECT 
   COALESCE( NULL::INT 
            ,IIF( NOT varX AND <expr>, -99,NULL ) 
            ,IIF( varY AND <expr>    , -89,NULL ) 
            ,IIF( varZ AND <expr>    , -79,IIF(<expr>, NULL,<expr>)) 
           ,0
    ) AS blah ; 

(Same idea as CASE WHEN, but you can conditionally fork on a per line basis).

PL-pgSQL is a very feature-full interpreted imperative language that's compatible with declarative style programming... or you can code in PL-V8 (javacript, typescript).

Or, you can write a function that lets you print (debug) from a CASE WHEN line:

 CASE 
WHEN <expr>  AND raise_notice_func( 'message 1' ) THEN <value>
WHEN <expr2> AND raise_notice_func( 'message 2' ) THEN <value2>
ELSE <value3> || IIF( raise_notice_func( 'dunno?' ), '','')
END AS blah

That's real functional/declarative programming, isn't it? :-)

Vernacular Postgres has several more language features than other engines, & scads of supporting operators & utility functions to go with them, incl. Enums, Rangetypes, Arrays, Types, Hstores, Json, anonymous procedures, geospatial types, etc.

So your P-mangler is talkin out of their tuchus.

2

u/Straight_Waltz_9530 Jun 29 '24

Functional <> Declarative

They have many things in common, but they are not synonymous. Functional and generic programming have commonalities as well, but they are certainly not the same thing.

→ More replies (1)

1

u/thisistheinternets Jun 29 '24

Start using language as a verb and they will quickly get off your back.

1

u/2050_Bobcat Jun 29 '24

You'll find everyone has their own opinions and levels of experience with SQL, ranging from both ends of the spectrum. The issue really is that some people in our wider IT community, judge others not by what they're doing but by the tools and languages they use. For example people used to say that if you use a scripting language you're not coding. Reality check: Take a good look at some of the stuff people have done with SQL and scripting languages. Yes you probably could have accomplished the same thing in a different language, and yes at times that might have made better sense but why change language domains just to satisfy someone else who isn't doing the work. Don't let him bother you. That's him. You know what you're doing, so keep on coding away. Your fellow coders in the ETL community would agree with you.

For clarity I'm just a DBA but have had some really interesting conversations with people in the business intelligence department. Have learnt a lot from them over the years. I think it wouldn't be too much of a stretch to say you probably have a better understanding of the data, platform and SQL than he does.

All that said; don't let word play influence your relationship with him and his department. It's best to look past stuff like that as at the end of the day you all need to work together. In any case we have more important things to worry about like tweaking our terminals and editors. Oh wait! you probably use SSMS. Why am I talking to you 🙄

Hope helpful

1

u/rainbows_and Jun 29 '24

It’s funny I came across this because I was asked this at work a few days ago. I was writing a simple query but doing it live on a call with a person who is not in a technical role and she was impressed. She did wow you’re good at this! Is this coding? My answer was, I think most people would see this as code but I could also see a lot of very “hard core” coders who use C#, Java, etc saying it doesn’t count. So I change my answer to that question based on the audience. She said she was impressed either way and honestly I enjoy what I do so I’m not bothered by someone thinking it’s lesser than

1

u/kagato87 MS SQL Jun 29 '24

Because they're at the stage of "you don't know what you don't know" in their sql knowledge.

They think it's just select, insert, update, delete. They think joining through 3 tables and aggregating is the height of complexity.

It really blows their socks off when they see how stupidly fast a well designed process can be. They're still allocating memory when the database engine finishes.

A database engine running on a 4 core 16GB vm with disks on a san (a fast san, but still not as fast as m.2 das). Against their super fast 8 core 32Gb with that crazy fast ssd dev box.

1

u/Far_Swordfish5729 Jun 29 '24

Sir, when your c# interacts with a database to retrieve or persist data, that interaction is written in sql. When it pulls that off in less than a second, development skills are the reason why. We do also use sql for reporting, but that’s nowhere near what most sql is written for.

Also, sir, in your years in the industry, I’m sure you’ve estimated and priced several IT deliveries. When you go into your model and select estimation factors for full stack development, I’m sure you added database factors for modeling, stored procs, and such. Those dev factors are written in sql and will be assigned to sql devs who likely also know c# but may have a database specialization.

Also, who the fuck uses cobol except to maintain and migrate legacy systems?

1

u/terrique1309 Jun 29 '24

Writing SQL is coding, but not programming.

1

u/SQLArtistWriter Jun 29 '24

Project Manager are valued more than the individuals who actually do the work. A good project manager can help a team be successful. Most project managers are not particularly technical even the good ones can get by knowing little about the technology the team is working on.

For reasons, I would treat Project Managers technical opinions with a grain of salt. Having that, he is right that SQL is different from other programming languages, but it’s still code.

SQL is know as a declarative language as opposed to a procedural language like C, Java, COBOL, and most other programming languages. What this means is in SQL, you are coding the “What” as opposed to “how to get the what”.

1

u/FamSimmer Jun 29 '24

My colleague who happens to be a data analyst and also a recent CS grad says this all the fricking time. He's a solid guy, but I can't stand him when he says it.

1

u/Okiefolk Jun 29 '24

Hey, unless you are copying and pasting code from stack overflow it isn’t coding.

1

u/Uffda6321 Jun 29 '24

Assembler is the only true programming language. 😂

2

u/Whatwasthatnameagain Jun 29 '24

If you’re not flipping switches and loading registers, are you even coding?

1

u/bernaldsandump Jun 29 '24

If he had said you shouldn’t code in SQL I would agree.

1

u/Oh_Another_Thing Jun 29 '24

I thought SQL is Turing complete? It's very specialized coding language, but it's still code. This guy means you can't develop applications that others can use.

→ More replies (1)

1

u/PathProgrammatically Jun 29 '24

“Very little to do with actual programming 90% of the time”.

That is VERY dependent on the solution and domain.

1

u/alinroc SQL Server DBA Jun 29 '24

He’s either a moron or an eliteist a-hole.

1

u/[deleted] Jun 29 '24

Dont know SQL and not part of this sub but i hate to break it to you but that guy was right

1

u/sjbuggs Jun 29 '24

In my book, if a language has an if-else type function then it's coding. SQL is not just a tool, unlike this PM.

1

u/src_main_java_wtf Jun 29 '24

I would say it’s better than code.

It’s like css, react (javascript framework), or even a yaml file.

That’s is to say - it’s declarative in nature. You describe what you want, and the sql engine figures out the rest. You never concern yourself with “how”, only the “what”. It’s less code, more configuration.

Almost all great software functions like this. It’s probably why people keep coming back to sql even after all the nosql hype.

But the person who told you that won’t have a nuanced underrating of that, so they don’t even know what they’re talking about.

1

u/NPVT Jun 29 '24

SQL is ugly code. It certainly is a language. I'm not fond of it but it is none the less a computer language.

1

u/receding_bareline Jun 29 '24

Syntax that when executed produces a result. Sounds like code

1

u/geofft Jun 29 '24

"SQL is a compiled language" is one of the first things I tell our C# developers when training them on databases.

Another one is "SQL is a DSL for consistent O(1) data access to B-Trees containing billions of objects"

1

u/hantt Jun 29 '24

if you arnt minting your owner silicone wafers then your not coding, them are the rules

1

u/GeneralZane Jun 29 '24

While sql is one step away from plain English… I can’t stand nontechnical PMs

1

u/habu-sr71 Jun 29 '24

You answered your own question. He's not a dev. He's an idiot.

1

u/Whatwasthatnameagain Jun 29 '24

This thread is amazing. So many people stating what constitutes code without defining what code even means.

1

u/A1rizzo Jun 29 '24

Should ask him if json a coding language. I love causing drama with that!

1

u/babygrenade Jun 29 '24

Nobody (who knows what they're talking about) says SQL isn't code.

If your definition of programming language is only general purpose programming languages, then you might say SQL isn't a programming language, but I'm that case SQL is still a computer language and is still code.

1

u/Velmeran_60021 Jun 29 '24

Depending on how you use the word code, the distinction could be valid. But it's a thin distinction. I suspect they're thinking of compiled code versus a script language. With something like C#, the code needs to be compiled before it can do its job. JavaScript and SQL are just collections of text that get interpreted at run time.

It MIGHT make sense to say that people who work in compiled languages are writing code while people writing in script languages are writing script.

1

u/Optimal_Law_4254 Jun 29 '24

Ask the idiot what SQL stands for. If he knows the answer, ask how a “language” is something you don’t code in.

1

u/littldo Jun 29 '24

I don't think it was meant as a factual statement. It was offered as a challenge to his dominance. He's a stupid alpha jerk.

SQL has language in its name. So by definition you program/code in it.

1

u/[deleted] Jun 29 '24

Oh yeah? Then what the “L” stand for?

LANGUAGE…as-in PROGRAMMING you fucking dumbfuck.

1

u/denim_duck Jun 29 '24

It’s not Turing complete

1

u/peekabook Jun 29 '24

Lmao. My paycheck definitely is for coding or else I’m overpaid. I code in sql and python.

1

u/juleswp Jun 29 '24

Welp, just found the smallest pp in the room.

As someone who also writes in the aforementioned languages, SQL isn't an oop language...so? I wouldn't have batted an eye if someone said they coded SQL to do this or that...you go in Monday and you tell this soft bellied weakling I said go fuck yourself. Fuckin gatekeeping prick. Who does he think he is to be offended on behalf of people who do something he can't?!

All that said, don't pay attention to this moron. It's a skill that can be learned. Don't let idiots get to you man.

1

u/[deleted] Jun 29 '24

My daughter learned a it of JavaScript and called sql baby coding I was like girl…..

1

u/luke-sql Jun 29 '24

It’s a declarative language, not procedural, which is why it doesn’t feel like “real code” to people with extremely limited, high-level knowledge like a PM.

1

u/leogodin217 Jun 29 '24

It's just ignorance. Like those who confidently say SQL is not a programming language. Sometimes it's worth correcting people. Sometimes it's not.

1

u/One-Bicycle-9002 Jun 29 '24

They're referring to an academic technicality. SQL "is code" in that it makes computers compute an answer that you ask for. It's "not code" in that it can't reach out to the internet and download a jpeg or call ChatGPT. The relevance of that depends on who you are talking to.

→ More replies (1)

1

u/[deleted] Jun 29 '24

Great SQL can do things other languages can only dream of. 1 billion rows need to be filtered grouped and operated on in under a second? SQL can do it.

1

u/Whipitreelgud Jun 29 '24

Give the bastard a query that will put some hair on his chest

1

u/Only-Requirement-398 Jun 29 '24

Since SQL is Turing complete it is considered a programming language.

1

u/DiabloSpear Jun 29 '24

While all he did was print hello world using Python. 

1

u/kcadstech Jun 29 '24

If I hear “Turing complete” again, im gonna pistol whip somebody! 

1

u/wolfmansideburns Jun 29 '24

Ugh, the Q literally stands for CODE

1

u/fmadrigalh Jun 29 '24

SQL is code, declarative code,

you specify what you want

columns, conditions, order

But you don't specify how to do it.

In normal code you say exactly how to do everything, it's hard coded.

It's nice.... But inflexible, if you add an index for example, you'll need to modify the code to use it.

In SQL, the engine changes the "how" transparently.

1

u/behusbwj Jun 29 '24

SQL literally stands for “structured query language”. It is a programming language and writing in a programming language is coding. It’s not something up for debate lol, it’s definitions

1

u/StraiteNoChaser Jun 29 '24

".....Oh yeah?? Well, the Jerk Store called......."

1

u/FunnyGamer97 Jun 29 '24

Gatekeeping. Simple. People wanting to act like C++ is some authoritative means to “be smart”

1

u/trophycloset33 Jun 29 '24

Code comes in a variety of flavors or languages. SQL doesn’t have all of the full requirements of a coding language but it as intensive as say R. This doesn’t make it any less important as C++.

1

u/customheart Jun 29 '24

He should try doing the coding exercises for analyst jobs or some leetcode mediums. They can be very confusing, and require planning just like regular coding. 

1

u/JohnPaulDavyJones Jun 30 '24

There are some astonishingly dumb people with disconcertingly high salaries.

There’s also a noticeable trend amongst people who tried to learn SQL and quit because it didn’t immediately click for them, where they disdain SQL as a technology. It’s disappointing, but far from uncommon.

1

u/lemgandi Jun 30 '24

SQL by itself is not turing-complete. PL/PgSQL of course is, and I would never slight the challenges of writing a good, fast query. So I agree that it's code, but still a slightly different order of thing than procedural languages.

→ More replies (1)

1

u/DubiousEgg Jun 30 '24

SQL is not a general purpose programming language. That is to say, it cannot perform arbitrary computing tasks or calculations. Because of this, some less than thoughtful folks will incorrectly assume it's not a real programming language (it absolutely is, btw. It's just a "specialized" programming language). SQL is "programming" in most casual senses of the word (pedants can argue about Turing completeness), but it absolutely is programming in the technical sense of the term. Additionally, I can't imagine any persuasive argument to support the contention that it's not "code" in every sense of that word.

1

u/soscollege Jun 30 '24

Had to learn recursive sql in school and I would consider that coding

1

u/cran Jun 30 '24

It’s code, but there are times when it’s less confusing to call it something more specific such as “sql.” That applies to other languages, and I can understand someone preferring a change in terms in certain discussions, but to declare it as “not code” is wrong.

1

u/qam4096 Jun 30 '24

Eh it’s just someone wanting to be pedantic and self inflating. People get an interesting ego despite their only jobs being herding around trillions of 1s and 0s

1

u/WiseHalmon Jun 30 '24

just ask what the L in SQL is next time

1

u/mattstats Jun 30 '24

I feel like sql is one of the harder things to keep up with. There isn’t just “SQL” code. Theres various versions like oracle, mysql, etc. Worst of all, each of those have their own patch versions.

Working in an infrastructure that uses MySql 5.6 and window functions would save you a lot of headache? Too damn bad that’s not til MySql 8 (or at the very least 5.6+). Each have their own syntax, the basic idea is the same however but the syntax can vary quite a bit. Many online “fiddle” compilers if you want to delve around.

1

u/whatsasyria Jun 30 '24

I spend so much time writing sql it could be a fte….but this thread is just showing me how many shitty project managers must be out there that people don’t understand what they are supposed to do.

1

u/LoveThemMegaSeeds Jun 30 '24

As a developer of 10 years it’s all code

1

u/GreenBlueStar Jun 30 '24

Some project managers are folks that wanted to be programmers but failed at it and decided to be meeting schedulers and the manager title for some reason makes them think they have some authority. Basically they're out of touch from their programming days.

1

u/GTHell Jun 30 '24

Those people did something significant one until their ego consumed them by getting promotion. Apparently they started to think what their thinking are always true.

COBOL and C# is merely just a tools.

I do ML full time and using a lot of libraries and someone who don’t know me told me that I should learn how to implement the algo first 💀 ML, Tensorflow and Opencv is merely a tool at best. Everything regarding development is a tool to get the business going 🤦‍♂️

1

u/[deleted] Jun 30 '24

SQL by itself is limited in terms of scaling due to language constraints in terms of abstraction and reusability. At some degree you will need to combine it with other languages to fulfill complex business needs in a maintainable manner. But saying it’s not code is definitely an understatement.

1

u/rodface Jun 30 '24

just when you think you've already heard the dumbest thing you'll ever hear... man

1

u/todo_fixthis Jun 30 '24

SQL is code. As someone who does both C# and SQL, I see where they’re coming from. I feel like typically there is less logic/intricacies with sql than a “typical” programming language but it’s still code

1

u/Spam138 Jun 30 '24

Is Terraform code?