Why You SHOULDN'T Be Writing Raw SQL In 2023

preview_player
Показать описание
SQL is great, but it's been around FOREVER, and just as database technology has come a long way, so have a lot of our options for interacting with it.

In this video, we explore the pros and cons of writing raw SQL, using a SQL query builder, or using an ORM.

Check out the code:

Resources:

__________________________________________

Check out my other socials!
__________________________________________

Timestamps:
00:00 - Introduction and explanation
00:28 - Raw SQL
02:24 - Query builders
03:45 - ORMs
06:32 - Wrapping up

#python #softwareengineer #sql #database
Рекомендации по теме
Комментарии
Автор

You mentioned you use fastapi. Do you use async endpoints when doing so? If so, what db engine do you use? I tried sqlalchemy with one of the async db drivers (forgot the name), but migration was a bit nightmarish. My ORM queries were out the window, and had to rewrite all my crud

mitchbet
Автор

can you even debug an SQL query? i wonder if there is a name for troubleshooting declarative languages

xybersurfer
Автор

Very informative and concise presentation. Thank you sir!

JM-wmhe
Автор

Sqlalchemy is absurdly complex and the documentation is completely impenetrable, its truly awful to work with. Pretty much everyday, I regret choosing sqlalchemy / fastapi for my prod stack. Should have used django + rest api instead (nicer orm for a start, wont even talk about how bad alembic is).

stercorarius
Автор

As a DBA, I request that this video be removed.

youtubeenjoyer
Автор

It is obvious you haven't been involved in any serious enterprise kind application. You will eventually come back to SQL as your application grows.

zyoqiwl