Excel vs SQL: A Conceptual Comparison

Excel vs SQL: A Conceptual Comparison

An experienced Excel-user’s perspective of SQL and why it’s worth learning.

Introduction

I have been involved in the data analytics realm for about 3 years. I’ve worked in the field for over 2 years as a healthcare analyst, and I recently finished my MBA with a focus in data science.

During my masters I was particularly interested in predictive modeling techniques using python (and I still am). However, from a basic organization /analysis / reporting perspective, I am hands-down most comfortable using Excel. Spending 60–80% of the day staring into an Excel spreadsheet is something not foreign to me. The tabs, ribbons, groupings, and tools nested within Excel’s GUI are the instruments to my orchestra. They make the sounds, but I conduct and transpose the melody and harmony into reports, deliverables, and analyses. Throughout consulting projects, personal budgeting, and side hustles, Excel has always been my go-to tool of choice.

I have known about SQL and its basic concepts for a long time. However, it wasn’t until relatively recently that I decided to buckle down and learn it for professional reasons. From an Excel user’s perspective, SQL has its ups and downs. In this article, I hope to convey the nature and use of SQL by comparing it to Excel.

What are they?

Excel is a program. SQL is a language. That is a very important piece of information to digest. Excel can only be used after clicking the green icon and running the program. SQL, on the other hand, can be used to interact and communicate with database programs. A few of the most popular:

The way I learned SQL is through Google’s Big Query. It’s an entertaining way to learn / use SQL by analyzing huge databases on Google cloud available for free.

Where is the data?

Excel

Excel is the quintessential spreadsheet tool. You have your data saved in a file on your computer and its typically organized in tabs, columns and rows. The excel file is local to your computer. You are directly interacting with it. No middleman. No administrator. Sure, it’s possible to use API’s to bring data from another location; however, the data is ultimately yours to do with what you want. This makes tracking changes difficult if several people are collaborating with Excel workbooks… It’s indeed possible to track changes, but it’s not very convenient.

SQL

SQL is a language that interacts with databases. It stands for Structured Query Language. Your data is one step further away in this case. You write and send queries in SQL to the database which receives these queries and then gives you what you request or makes changes. The data is stored in a database and organized by tables.The beauty of querying is it’s more collaborative and traceable. These queries can be traced back to see who made what changes to which table. Users can also save and share useful queries with other for future or collaborative purposes.

Example of a query that filters the “austin_bikeshare” table on Big Query based on “bikeid” and then orders the selection by “duration_minutes”.

SELECT 

   duration_minutes

FROM

  bigquery-public-data.austin_bikeshare.bikeshare_trips

Where

   bikeid = "446"

ORDER BY

   duration_minutes desc

Once you know how the syntax works, manipulating data can be much faster using SQL than with Excel. Another great aspect is that the syntax is similar to English which makes it arguably the easiest computer language to learn.

What they are best used for?

Excel

  • Smaller data sets: under 1 million rows, even north of 100,000 it will likely slow down your computer.
  • Manually entering data
  • More flexible structure: any cell can be of any data type, regardless of what column it’s in.
  • Outputting graphs and visualizations
  • Built-in spell check and other useful functions
  • Working independently on a project

SQL

  • Larger datasets: depending on the software and database, this can be very very large. Doesn’t slow down like Excel does.
  • Organization /Structure: SQL tables are more strict about consistent data types and restricts users if they try to enter the wrong type.
  • Collaborative work
  • Prepping data for further analysis in another software
  • Consistent reports or calculations: as mentioned earlier, you can save and share queries.
  • More secure, as changes are always traceable and auditable.

Conclusion

When I first learned about JOIN clauses in SQL, my initial visceral reaction was to label it as insignificant because I already knew how to use Vlookups in Excel. I kept this attitude for a little while afterwards, but as I kept going throughout the lessons the reality of the situation started to emerge. As I learned how easy and useful JOIN clauses were, I remembered all the times Vlookups took forever to execute over large quantities of rows. I remembered how they make the file size exponentially bigger if you don’t paste values after you run the calculation. I also remembered how limiting it is by bringing only 1 value at a time… Similar lessons were experienced as I compared SQL to Excel throughout my learning.

In conclusion, both tools have their place when it comes to data analytics. Both serve their unique purpose, and knowing both is beneficial for anyone who uses data regularly. From my experience and research on the topic, however, SQL is a more in demand and useful skill to have as a data analyst. Excel is great for small business owners, consultants and students. SQL is better for analysts and data scientists.

Thanks for reading

If you liked this post, share it with all of your programming buddies!

Follow us on Facebook | Twitter

Further reading

The Complete SQL Bootcamp

The Ultimate MySQL Bootcamp: Go from SQL Beginner to Expert

The Complete Oracle SQL Certification Course

An Introduction to Queries in MySQL

How To Troubleshoot MySQL Queries?

SQL with MySQL - Complete Tutorial for Beginners

How to import CSV file using MySQL?

Export or Import of CSV or Excel file in Laravel 5.8 with MySQL


excel sql database

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Introduction to Structured Query Language SQL pdf

SQL stands for Structured Query Language. SQL is a scripting language expected to store, control, and inquiry information put away in social databases. The main manifestation of SQL showed up in 1974, when a gathering in IBM built up the principal model of a social database. The primary business social database was discharged by Relational Software later turning out to be Oracle.

Introduction to Structured Query Language SQL pdf

SQL stands for Structured Query Language. SQL is a scripting language expected to store, control, and inquiry information put away in social databases. The main manifestation of SQL showed up in 1974, when a gathering in IBM built up the principal model of a social database. The primary business social database was discharged by Relational Software later turning out to be Oracle.

AlaSQL in Action: The JavaScript SQL Database

Overview on AlaSQL, the popular lightweight client-side in memory SQL database, including a real life example of AlaSQL in action. I was surprised to see that there aren’t more posts about this popular lightweight client-side in-memory SQL database online apart from this awesome article I found.

Backup Database using T-SQL Statements

Introduction In this article, We will discuss how to backup our database in MS-SQL Server using T-SQL Statements. We need to use BACKUP DATABASE statement to create full database backup, along with…

Welcome Back the T-SQL Debugger with SQL Complete – SQL Debugger

Debug SQL stored procedures and develop your SQL database project with dbForge SQL Complete, a new add-in for Visual Studio and SSMS. When you develop large chunks of T-SQL code with the help of the SQL Server Management Studio tool, it is essential to test the “Live” behavior of your code by making sure that each small piece of code works fine and being able to allocate any error message that may cause a failure within that code.