Excel vs SQL

Raam Levy
3 min readAug 11, 2020

Most of us have used a spreadsheet to neatly store and analyze data either through the medium of Microsoft Excel or Google Sheets, but what is SQL? Why would we use it? What benefits does it have over a typical spreadsheet software?

GA ‘What’s in a database?’ Video

Before we talk about SQL, let’s talk a little bit about databases. A database, simply put is a structured set of data held in a computer. Picture it as a filing cabinet with an incomprehensible amount of space to store a ton of different spreadsheets or tables, like the image below.

General Assembly ‘What’s in a database?’ Video

Back to SQL, pronounced ‘sequel’ by most, is a language used to interact with a database to retrieve data. A typical SQL command or query looks something like the code below.

SELECT twitter_id FROM Users Table WHERE num_follower > 1200;

What the SQL code above would do is create a list for you of all the twitter users that have more than 1200 followers. Now, I bet you’re thinking to yourself, “Can’t I just use the filter method in Excel to achieve the same result?”. Yes, you would be right, using the filter method would achieve the same result, which leads us to the second and third question. Why should we use SQL over Excel and what benefits does it have over a typical spreadsheet software?.

Although, you would be able to achieve the same command above using the filter method in Excel, an Excel spreadsheet is limited to a million rows. Hence, companies that have massive amounts of stored data, such as twitter store their information in a database, and the only way to communicate with the database is via a version of SQL programming language.

One major benefit of using the SQL — database ecosystem is that it is able to query and store dynamic or live data, while Excel sheets data is static. This is really important when lets say you're trying to do a real time data analysis, like understanding sentiment on twitter after a certain news breakout, or if your Netflix try to get a grip on consumers reaction to new show you released.

Another major benefit of using SQL over Excel is that SQL has a much easier time to combine data from different spreadsheets or tables using a schema and a simple JOIN command. On the other hand, gathering data from several Excel spreadsheets to run analysis is complicated and messy.

I hope, I demonstrated the importance of SQL in being able to interact with large sets of data, interact with live data and being able to gather information from different tables easily.

If you want to get cracking to learn SQL, check out this course I took. https://learncodethehardway.org/sql/

As always, feel free to leave me a message below.

--

--