Which is better for data analysis, SQL or Python?
SQL is a query language for databases like MySQL, PostgreSQL, etc.
Python is a programming language (an interpreted one).
So for data analysis, you basically follow a Data Science Process. You can find some of them with some research on Internet. It will be your method.
In this process: you need to gather raw data, clean them and build models/algorithms. You will then be able to visualize, report, make decisions and take advantages of this process to use your models in real situations.
To manage your data, you need a database (first tool): there is SQL (MySQL, …) or NoSQL (MongoDB, …) databases. NoSQL has come to deal with big data (think about the scale of data managed by Google, Facebook, etc.) Whatever the database or the query language, it will provide you some ways to manipulate your data, clean them and visualize them (still in a raw format).
Python, very commun in the data science field, used with frameworks (like Pandas) will allow you to easily and quickly prototype models/algorithms with your data set. It is your tool to manipulate and test your prototypes.
Well, it really depends on your data, and the effort you need to make it structured. If you can get it or make it structured, it will be much accessible to SQL engines like Oracle , DB2, MySQL. You can then unleash SQL power to get value. If you prefer it to be un-structured, then you can use python to do a low-level parsing, lexing, transforming , aggregation, visualization using powerful python libraries like pandas, altair, mathplotlib or also Natural Language Processing NLP if the data is natural language for e.g like social media , email etc.
All in all, each tool has a purpose and is relevant in the need of the context. You will need both in the long run.
Leave a reply