SQL in short
SQL is a language to operate databases; it includes database creation, deletion, fetching rows, modifying rows etc.
SQL is the standard language for Relational Database System. All the RDBMS like MySQL, Oracle etc use SQL as their standard database language.
- What is RDBMS(Relational Database Management System)
RDMS is a database management system. Data in it is stored in database objects called as tables. Every table is broken into entities called fields. A record is a row of data which corresponds to an individual entry. A column is a vertical entity in a table that contains all information associated with a specific field in a table. All these together forms RDBMS.
Pandas or SQL
SQL is used with huge databases(terabyte-sized data). Data movement itself will eat up majority of the productive time. So using SQL, it’s possible to run the analysis within the DB itself.
Another approach is to fetch the required data using SQL, bring small set data to the Python machine and do the data manipulation using Pandas. ie, craft a query for the data needed, create an SSIS package to export that data out to a CSV, then do the rest all manipulations in Pandas.