Learning Corner #1 – SQL Server is actually Santa Claus

santa with reindeer (ca poza pt articol)

This post (even though it doesn’t look like it) is about the SQL Server Architecture.

When I first started to learn about SQL Server and got to the architecture of the product, I had a lot of gaps in my knowledge of this subject, which made me feel a little overwhelmed. But I took things slowly and, for the first lesson, decided that it’s time for a little brain trick to make the information stick.

I’ve learnt that, in order to remember something a little bit more difficult than the content you’re usually learning to or something which is not completely clear in the first place, a good approach is to associate it with a story which should be ridiculous or funny or exaggerated. It seems that our brain doesn’t go well with boring 🙂

There are other useful methods as well, like using the “mind palace” or making associations that rhyme, etc., but in this post I’m going to focus on my the first idea: surrounding the topic I want to learn with a cute and easy to remember story.

So, what I needed to learn, was basically that the SQL Server architecture is comprised of the following layers:

  • Protocol layer
  • Query Processor (with the optimizer and executor)
  • Storage Engine
  • SQLOS
  • Utilities

What I actually remembered was this little chain of ideas:

The SQL Server architecture has the following elements as the steps you’re following when you want to receive a gift from Santa Claus at Christmas:

  • First, you write Santa a pretty letter, in which you specify that you’ve been a good kid and then you mention the list with all the presents you would like to receive. You put the letter in an envelope and you deliver it, to make sure it gets to Santa (Protocol layer).
    • If you’re already in Santa’s town, you just go to his door and leave it on the doorway (Shared Memory).
    • If you’re in a town nearby Santa, you send it by mail, but if you write Santa Claus instead of the address, everybody knows where it is and the letter will be delivered correctly (Named Pipes).
    • However, if you live in another country, you need to specify the complete address (TCP/IP)
  • Then, Santa reads (processes) your letter (Query processor or the Relational Engine). Taking into account what he knows about you, he will decide what toys you deserve.
  • He will go in his storage room and check for the toys on your list (Storage Engine)
  • Then, a lot of agitation will happen because of the little elves who will try to put the toys in Santa’s bag, taking into account how many other kids Santa will visit before you, how much space needs to be left in the bag so that it can still close, how many toys can be extracted in the same time, and a lot of other stuff like this (this is the SQLOS)
  • When everything is ready, Santa will leave with his bag and carriage and all his reindeer make a lot of children happy at Christmas time (Utilities).

In order to make things even more clear, check out the image below:

Proof that SQL Server is Santa Claus
Proof that SQL Server is Santa Claus

The stories work best for the person who invented them, so maybe my Santa association will help other as it helped me or maybe it won’t; in any case, this is a good mind exercise and I suggest you try it yourself. It may seem difficult at the beginning, but struggling to create a story that makes sense for you will help to better understand the topic you started with.

And this was the point in the first place, wasn’t it?