CS Trivia#7: Why is SQL shouting at me? (2024)

Sylwia Vargas

Posted on • Updated on

CS Trivia#7: Why is SQL shouting at me? (3) CS Trivia#7: Why is SQL shouting at me? (4) CS Trivia#7: Why is SQL shouting at me? (5) CS Trivia#7: Why is SQL shouting at me? (6) CS Trivia#7: Why is SQL shouting at me? (7)

#sql #watercooler #computerscience #todayilearned

Welcome to my little CS trivia series. Every week I post a new trivia piece.

Today's question is...

Why is SQL shouting at me?

In the times of online communicators, emails and texts, many people find SQL syntax a bit too aggressive.
CS Trivia#7: Why is SQL shouting at me? (8)

Why is SQL not obeying the rules of netiquette? There are a few reasons.

Historical context

SQL was created in 1974 when apparently majority of the keyboards did not have lowercase letters. Moreover, there were only six bits available to play with in character encoding, which is why languages like COBOL or FORTRAN also user uppercase. This was also the case with HTML (created in 1991), which initially had tags written in all caps until 2014 when the standards and syntax were changed.

Syntax Highlighting

This a bit aggressive syntax was kept for the purpose of syntax highlighting. Back in the days, there were no fancy linters and so keywords weren't highlighted in any way when you wrote code. The SQL capitalization provides a quick and easy way to visually break up the different parts of the query, helping people differentiate between the SQL parts and the database objects parts of the queries. Joe Celko writes about it in SQL Programming Style:

Rule: Uppercase the Reserved Words.

Rationale:

Uppercase words are seen as a unit, rather than being read as a series of syllables or letters. The eye is drawn to them, and they act to announce a statement or clause. That is why headlines and warning signs work.

Typographers use the term bouma for the shape of a word. The term appears in paul Saenger's book (1975). Imagine each letter on a rectangular card that just fits it, so that you see the ascenders, descenders, and baseline letters as various "Lego blocks" that are snapped together to make a word.

The bouma of an uppercase word is always a simple, dense rectangle, and it is easy to pick out of a field of lowercase words.

Keywords avalanche

Important to add, SQL has a large number of keywords and relies on the reader's ability to distinguish keywords versus identifiers in order to mentally parse the syntax. How does this relate to the capitalization?

Research has proven ALL CAPS is harder to read, so much so that the USA Federal Highway Administration has mandated the use of mixed-case signs in their Manual on Uniform Traffic Control Devices(2003), which states:

The lettering for names of places, streets, and highways on conventional road guide signs shall be a combination of lowercase letters with initial uppercase letters.

The New York Post also adds:

Studies have shown that it is harder to read all-caps signs, and those extra milliseconds spent staring away from the road have been shown to increase the likelihood of accidents, particularly among older drivers.

I personally like angry-typing SQL when I'm frustrated with e.g. prolonged quarantine. While at it, check out this amazing SQL exercise series by zchtodd!

Top comments (8)

Subscribe

Zohar Peled

Zohar Peled

By day, try to work.By night, try to sleep.

  • Location

    Israel

  • Work

    .Net Developer

  • Joined

Mar 24 '20

IMHO, even with syntax highlighting, the separation of upper case for keywords and lowercase for anything else still helps readability.

It was an interesting read (Though I did suspect that was the reason, just not with all the details).

Sylwia Vargas

Sylwia Vargas

I'm a tech writer and educator advocating for code newbies ✨ I'm also a Developer Relations Lead + front-end dev at @inngest

  • Location

    New York

  • Pronouns

    she/her

  • Joined

Mar 26 '20

  • Copy link

Thank you! I do agree about the readability of SQL. Though, if I come back to it after some break, I again have an impression that it's a language for angry folks :D

Yechiel Kalmenson

Yechiel Kalmenson

He/Him/HisI'm a Software Engineer and a teacher.There's no feeling quite like the one you get when you watch someone's eyes light up learning something they didn't know.

  • Email

  • Location

    NYC

  • Education

    Flatiron School

  • Work

    Software Engineer at VMware

  • Joined

Mar 23 '20

  • Copy link

LOL never thought of that! :D

Sylwia Vargas

Sylwia Vargas

I'm a tech writer and educator advocating for code newbies ✨ I'm also a Developer Relations Lead + front-end dev at @inngest

  • Location

    New York

  • Pronouns

    she/her

  • Joined

Mar 23 '20

  • Copy link

I know, you always assume the best intentions ❤️ I'm sure you thought that SQL is just being REALLY EXCITED!

Yechiel Kalmenson

Yechiel Kalmenson

He/Him/HisI'm a Software Engineer and a teacher.There's no feeling quite like the one you get when you watch someone's eyes light up learning something they didn't know.

  • Email

  • Location

    NYC

  • Education

    Flatiron School

  • Work

    Software Engineer at VMware

  • Joined

Mar 23 '20

  • Copy link

SELECT * FROM table!!! SELECT IT ALREADY!!!!!!!!

leob

leob

  • Joined

Mar 24 '20 • Edited on Mar 24 • Edited

  • Copy link

I definitely prefer coding my SQL (or should I say "sql") in LOWERCASE :-)

Abhishek

Abhishek

Working on "AI on Steroids"

  • Location

    New York

  • Work

    Relevant at Meself

  • Joined

Mar 24 '20

  • Copy link

Maybe it's just really excited!

Sylwia Vargas

Sylwia Vargas

I'm a tech writer and educator advocating for code newbies ✨ I'm also a Developer Relations Lead + front-end dev at @inngest

  • Location

    New York

  • Pronouns

    she/her

  • Joined

Mar 26 '20

  • Copy link

It must be that joy that SQL cannot just contain :D

For further actions, you may consider blocking this person and/or reporting abuse

CS Trivia#7: Why is SQL shouting at me? (2024)
Top Articles
Doggy Psychology: 3 Reasons Why Your Dog Loves To Play Fetch
Why January 6th is a day to celebrate women of Ireland – Ireland Chauffeur Travel
Evil Dead Movies In Order & Timeline
Parke County Chatter
How Many Cc's Is A 96 Cubic Inch Engine
Jonathon Kinchen Net Worth
Body Rubs Austin Texas
St Petersburg Craigslist Pets
Pbr Wisconsin Baseball
Autozone Locations Near Me
Seth Juszkiewicz Obituary
Turning the System On or Off
Highland Park, Los Angeles, Neighborhood Guide
Las 12 mejores subastas de carros en Los Ángeles, California - Gossip Vehiculos
Zoe Mintz Adam Duritz
Scout Shop Massapequa
Lisas Stamp Studio
St Clair County Mi Mugshots
Little Rock Skipthegames
Hdmovie2 Sbs
Masterbuilt Gravity Fan Not Working
Craigslist Fort Smith Ar Personals
Santa Barbara Craigs List
Healthy Kaiserpermanente Org Sign On
Tim Steele Taylorsville Nc
Southtown 101 Menu
Swgoh Boba Fett Counter
Ripsi Terzian Instagram
Indiana Wesleyan Transcripts
Free Robux Without Downloading Apps
Magicseaweed Capitola
The Transformation Of Vanessa Ray From Childhood To Blue Bloods - Looper
Blackwolf Run Pro Shop
Miracle Shoes Ff6
Busted Newspaper Campbell County KY Arrests
About My Father Showtimes Near Amc Rockford 16
The Realreal Temporary Closure
Torrid Rn Number Lookup
Umd Men's Basketball Duluth
Tinfoil Unable To Start Software 2022
Craigslist Com St Cloud Mn
What Is The Optavia Diet—And How Does It Work?
Rescare Training Online
N33.Ultipro
Terrell Buckley Net Worth
Page 5747 – Christianity Today
Bradshaw And Range Obituaries
Cvs Minute Clinic Women's Services
Craigslist Psl
Who We Are at Curt Landry Ministries
Emmi-Sellers
Latest Posts
Article information

Author: Manual Maggio

Last Updated:

Views: 6474

Rating: 4.9 / 5 (49 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Manual Maggio

Birthday: 1998-01-20

Address: 359 Kelvin Stream, Lake Eldonview, MT 33517-1242

Phone: +577037762465

Job: Product Hospitality Supervisor

Hobby: Gardening, Web surfing, Video gaming, Amateur radio, Flag Football, Reading, Table tennis

Introduction: My name is Manual Maggio, I am a thankful, tender, adventurous, delightful, fantastic, proud, graceful person who loves writing and wants to share my knowledge and understanding with you.