T-SQL Tuesday #131: Data Analogies, or: Explain Databases Like I’m Five!

The current invitation is from Rob Volk.

Welcome to T-SQL Tuesday! This month we’ll explore analogies, or how would you explain database concepts to someone who’s not technologically savvy.

If you’re a data professional, you’ve probably been asked “So what exactly do you DO?”, and probably not found a great way to answer. Database theory and practice can be hard, and every professional struggled with their first computerized data concepts.

While attending and presenting sessions on SQL Server and other data topics, I’ve found analogies often explain a concept better than any computer science or mathematical description does. We’ve probably heard that “a clustered index is like a phone book”, and those old enough to remember phone books will agree, but it doesn’t really explain why that structure is useful. (hint: it requires sorting)

I recently found a Youtube video that describes how binary search works, and why sorting makes it work. As this is a foundational concept for most database indexing schemes, I think it does a great job explaining why it’s more efficient. What I like most about it is that it doesn’t demonstrate this on a computer, but uses cards with different values (even if they’re not physical cards).

Brent Ozar recently posted a video on statistics that DOES use actual playing cards. I’ve also seen Aaron Cutshall use cards in presentations on Set Theory.

For this month’s T-SQL Tuesday, I’d like you to write about your favorite analogies that help explain database concepts to people who aren’t database experts. I like the spirit of Reddit’s Explain Like I’m Five (ELI5) subreddit, where the explanations are meant for someone who has no previous assumptions about the topic.

ELI5 doesn’t preclude deeper examples. For example, I posted a long time ago one version of my “cursors are tweezers” analogy to explain why you shouldn’t use them. You can not only explain why something works, but also why something else DOESN’T work, and I welcome such examples if you have the space and time.

T-SQL Tuesday #113 – What Do You Use Databases For?

Invitation and follow-up from Todd Kleinhans.

This month’s T-SQL Tuesday is about what do YOU use databases for in your personal life that you are willing to share?

We work with data all day and sometimes all night long. When we turn off work, some of us continue to use data and databases to enhance our professional growth and learning. I know on some days the last thing I want to look at after work is- another screen full of data. Kinda of like how some auto mechanics have poorly running cars. How can that be? Because they work on cars all day long and they are tired of working on cars- including their own.

But I’m curious- outside of work and learning, what do you personally use databases for? Tracking books you have, recipes, collections, etc? While it can be said using databases for personal use could be either overkill or a hammer in search of nails on the other hand, it is exactly what they are for- storing data.

Years ago I challenged my daughter- I would give her $100 to go through a book about databases, sit her in front of SQL Server Developer Edition, and we would build a database to track our VHS collection. (VHS, heh, yes I’m old. Now get off my lawn).

We used a book called The Manga Guide to Databases.


It was great except they used the non-ANSI syntax for joins…


We whiteboarded and created a simple database.

The experiment was a ton of typing. And linking to the movies in Wikipedia. And then capturing some information about personal family events based on date. BTW, she is now a film student in college.

More than twenty years ago I was into FileMaker Pro working for a defense contractor. We needed a way to store many pictures about launch site equipment. It was my first time trying to figure out: a) how to store pictures in a database b) how to store metadata about the pictures and c) how to search and retrieve the pictures. There was no auto-tagging, object recognition or any sophisticated technology to help me out. So I used what tools I knew about. The project was a success but took way more time than I would have liked.

I am into pictures and have been looking at ways to store and retrieve them for quite some time. Some things work and some things don’t work so well. On 06Apr19, I will be presenting in Colorado Springs, Colorado for SQL Saturday on Storing Images in a Database – Tips and Techniques.

As I learn more about Python I’ll be able to do more sophisticated things. Like the kind of things I couldn’t do twenty years ago. One of them I want to tackle is how to extract text out of images. Ever see people taking pictures during a presentation with their smartphones? Or see code in a YouTube video? How do you get the text of the code out? Most people I think would say they just re-type it. But what if you could use software to do that for you? So I’m fiddling with Python-tesseract.

So what do you use databases for in your personal life that you are willing to share? Blog about it. I’m curious to see the range of uses and even if you don’t use databases for personal stuff, what do you see as the future of organizing personal data?