VOOZH about

URL: https://thenewstack.io/sql-vs-python-frenemies-of-the-data-world/

⇱ SQL vs. Python: Frenemies of the Data World - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2025-10-14 07:00:39
SQL vs. Python: Frenemies of the Data World
sponsor-vmware,sponsored-post-contributed,
C++ / Programming Languages / Python

SQL vs. Python: Frenemies of the Data World

Trends point toward broader integration of SQL with vector and AI workloads and embedded procedural languages such as Python for in-database functions.
Oct 14th, 2025 7:00am by Ivan Novick
👁 Featued image for: SQL vs. Python: Frenemies of the Data World
VMware Tanzu sponsored this post.

Every year, the IEEE Spectrum Top Programming Languages ranking provides a snapshot of what truly matters in the global software ecosystem. In the 2025 list, SQL jumped from No. 9 in 2024 to hold the No. 4 spot, just behind Python, Java and C++. That placement is remarkable, given SQL’s age and its specialized scope.

In this context, the data tells a deeper story: Across decades of innovation, SQL endures as the backbone of enterprise analytics, unmatched in efficiency for representing and querying data at scale. I’ve written about why SQL is an ideal match for AI and believe the spectacular jump in SQL’s popularity further confirms the complementary nature of SQL and Python, which is often misunderstood when in fact they are both necessary for today’s data-intensive AI workloads.

The Origins of SQL

SQL was created in the 1970s from Edgar Codd’s vision of relational databases and his formalization of relational algebra and set theory. Unlike procedural and functional languages that dictate how to perform a task, SQL is declarative; it specifies what you want, leaving the engine to determine the path. That set-based abstraction has been applied consistently for decades, supporting workloads from small data sets to systems managing billions of rows, because it is grounded in relational algebra and set theory.

SQL has outlived every hardware cycle and programming trend. It began on mainframes, adapted to UNIX servers, distributed systems and now powers cloud SaaS database engines. SQL engines have been implemented in C, C++, Java and other languages, and optimized for multicore CPUs, GPUs and NVMe storage. The SQL interface remains standardized, shielding users from complexity while implementations continue to evolve under the hood.

SQL vs. Procedural and Functional Mindsets

The difference between SQL and procedural languages such as Java, C++ and Python is more than syntax. Procedural and functional languages rely on explicit control flow, loops, conditional branches, and function calls to process data one element at a time. In contrast, SQL expresses operations over entire sets of rows at once. Instead of writing a loop to scan a list and sum values, SQL uses an aggregate function (SUM) across a column. Instead of nested `if` statements, SQL applies `WHERE` clauses to filter subsets. Joins replace manual pointer chasing or map lookups by describing how relations connect. This shift means that while procedural code specifies how to compute, SQL specifies what result is required, leaving the database optimizer to decide whether to use an index, perform a hash join or parallelize across multiple CPUs.

Python: The Complement, Not the Competitor

Python, at No. 1 on the list, owes much of its success to data science and machine learning. It is approachable, flexible and supported by a rich ecosystem of numerical and machine learning (ML) libraries. But Python and SQL are not rivals; they complement each other. SQL handles structured storage, filtering, joins and large-scale aggregation; Python provides orchestration, statistical modeling and custom logic.

An analyst might write SQL queries to extract millions of sales records, then switch to Python with pandas or NumPy for visualization or statistical tests. Data engineers embed SQL steps in Python-based workflows using Airflow or Prefect, ensuring efficient database processing before downstream transformation. Some database engines even support Python functions embedded directly within SQL, allowing data wrangling and custom logic to execute close to the data without moving it out of the engine.

AI to Python to SQL for the Win

Python can also be used to write many SQL queries in a template fashion. For example, you might want to create 50 SQL statements that vary to do a similar job on 50 different tables or data sets. A single Python query can generate and run 50 SQL statements easily.

Now, in today’s world, AI can write Python scripts. So through a conversational interface, AI generates Python, and the Python generates SQL.

Example: “Generate me a Python script that generates and runs a SQL query to the population table and average the demographics data. The data is stored in 50 tables, one table per U.S. state, so generate 50 such queries and summarize the data at the end of the Python script.”

And so AI begets Python, which begets SQL in a harmonious chain.

What Is the Future for SQL?

The continued relevance of SQL in 2025 reflects its role as the standard interface for working with structured data. Despite shifts in hardware, programming paradigms and data platforms, SQL has remained stable because it is grounded in relational algebra and set theory. Future trends point toward broader integration of SQL with vector and AI workloads, and embedded procedural languages such as Python for in-database functions.

Rather than being replaced, SQL is likely to remain the common layer across heterogeneous systems such as traditional relational databases, distributed warehouses and hybrid data platforms. Its future is defined by utility: SQL remains the standardized, widely adopted method for querying and managing data, and it continues to be implemented across new engines and infrastructures as they emerge.

Trusted by enterprises and loved by developers, VMware Tanzu is built for platform and data teams who want to accelerate agentic software delivery and AI-ready data. Tanzu provides a pre-engineered, agentic app platform and an AI-ready data intelligence platform that helps enterprises build, run, manage and safeguard agents, their integrations and data so you can capitalize on AI at scale. 
Learn More
The latest from VMware Tanzu
Hear more from our sponsor
TRENDING STORIES
Ivan Novick leads data platform product management at Broadcom's Tanzu division, overseeing real-time data, streaming, OLTP databases, and data warehouses/lakes. He previously spearheaded Tanzu Greenplum innovation for more than a decade, where he drove its evolution from version 4 to...
Read more from Ivan Novick
VMware Tanzu sponsored this post.
SHARE THIS STORY
TRENDING STORIES
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.