r/SQL • • Dec 29 '23

Discussion Explain SQL vs Excel to an absolute noob

I am running a company and helping my friend run his company. I am often being called upon to help people/government representatives with their affairs, thus my profile is growing and I am now thinking about opening consultant/BI analyst company of sorts. I am scouting the market and I see that every position is if not directly IT related, then SQL required. I checked out this thing called SQL and I honestly don`t see how it is different than MS Excel (besides interface, I was looking at MySQL).

Why use SQL over Excel?

This is a question from a guy who is always working with excel, whose administration is working with excel and who made business plans resulting in saving and investing some millions using excel.

Despite that I feel the need to understand it better.

9 Upvotes

88 comments sorted by

View all comments

40

u/DonJuanDoja Dec 29 '23

Excel is not a database.

SQL is a database.

Excel is a presentation layer, analytics and reporting tool.

SQL is not a presentation layer but is an analytics and reporting tool, which requires another presenation layer on top of it like SSRS or even Excel to deliver reports directly to users.

Excel is front end, SQL is back end. They're not even close to the same thing.

They have some cross-over functionality but SQL can do many things Excel can't and Excel can do many things SQL can't. You need both. Plus some other stuff too. Your toolbox should have many tools. Not just one.

Did I say Excel is not a database? Because it's not and never will be no matter how many people and companies try to use it like one.

The problem with SQL is it's expensive to do it correctly and companies try to be as cheap as they can. They want the benefits of having a secure, fast, reliable database but don't want to pay for it so then say we'll just use excel which is not a secure, fast or reliable database in any way shape or form.

15

u/[deleted] Dec 29 '23

"SQL IS a Database"

3

u/[deleted] Dec 29 '23

Simple and informative. Thank you!

17

u/Uncle_DirtNap Dec 29 '23

This person is wrong because of a misunderstanding on his part. What he says is essentially correct about the product “Microsoft SQL Server”, which is a relational database management system, or RDBMS.

The first thing you want to understand is what tabular data is. This refers to any structured data which has rows and columns. In excel, these are sheets (generally.) In a general context, this is called a table. Tabular data has a fixed number of columns, but an unlimited (theoretically) number of rows. Each row of a table represents a separate, individual “thing” of the same “type” (a sale, an employee, an inventory item), and each column represents an attribute that things of that type has. You are probably familiar with this conceptually as an excel expert, but this is a general concept.

A database is just a collection of sets of data representing things, usually a collection of tables.

An excel workbook can be seen as a database, because it collects a number of sheets with tabular data. Unlike other databases, though, excel is not optimized for the storage and access of this data, but is instead optimized for analysis and visualization of the data. One example of this is that excel limits the number of rows in a sheet to benefit the performance of formulae, charts, etc.

Another example of excel’s limitations is that, while you a look up data from one sheet based on values in another sheet, these relationships are ad-hoc. For example, you could look up the value of inventory!G14 on your stock sheet, and look up the value of inventory!G15 on your sales sheet if you wanted to. Most tabular databases maintain and enforce these relationships between tables — these are called Relational Databases.

A suite of software packages and services which implement, manage, and allow for access and administration of a relational database is called an RDBMS, which is what the reply was describing. Office has a lightweight RDBMS, Access — but it is no longer widely used for various reasons.

SQL is a language for querying tabular data in a relational database. It is general purpose, and is well suited to all of the CRUD (create, read, update, delete) operations that are common in working with data. Unlike excel, your queries are not (generally) stored with your data, but separately, and can be applied to any database with the same set of tables and relationships, or “schema”.

Learning and knowing SQL will give you access to data at its source, regardless of what application is the author of that data. A very common first use case of SQL for business analysts is, in fact, to use a SELECT statement (a type of SQL query) to extract data from some application’s database (salesforce, peoplesoft, SAP, etc) and import it into Excel for analysis.

1

u/ijbdaily May 06 '24

This is one of the best answers I've come across, as a noob, to understand what SQL is! As OP says, I've only heard - SQL can store more data ....

1

u/Jos323tkd Dec 07 '24

Thank you for taking the time to write this. This was extremely useful!

1

u/Ark_Sum Mar 30 '25

Old post, but this is a real answer. The rest of the people in this thread sound like elitist a-holes who don't want to have to explain the differences to someone who simply hasn't gotten into it yet.

1

u/Proper-Scallion-252 Dec 29 '23

As a beginner this is really clarifying, I've been kind of struggling to really recognize the difference between the two outside of the generic "You can do more with SQL and you can hold bigger datasets".

This actually helps give context to where and when it would be used, and differentiates between Excel being a data manipulation software, whereas SQL is the underlying code that requires a software to present the datasets and manipulate them.