news
Databases: SQLAlchemy, SQL, and More
-
Miguel Grinberg ☛ SQLAlchemy 2 In Practice - Chapter 8: SQLAlchemy and the Web
Whether you are building a traditional web application, or a web API that works alongside a web front end or smartphone app, SQLAlchemy is one of the best choices to add database support to a Python web server. In this chapter two example integrations with Flask and FastAPI will be demonstrated. These are two of the most popular Python web frameworks and should serve as examples even if you use another web framework.
For your reference, here is a summary of the book contents: [...]
-
Chreke ☛ SQL: Incorrect by Construction
The design of SQL and relational database systems makes it easy to accidentally introduce serious concurrency bugs. Below is a textbook money-transfer procedure in TSQL; Alice wants to send ten dollars to Bob, and to keep Alice from overdrafting her account, we first check that she has enough money. The code looks completely reasonable, but it has several critical bugs. Can you spot them?
-
BoringSQL ☛ Welcome to ORDER BY jungle
SQL is fun and not at all boring. The latest article by Markus Winand on Order by Has Come a Long Way sent me on quite a journey.
First, set up a table called nums with one integer column and four rows: [...]