flâneur — a map of the web's best reading

SQL as API

valentin.willscher.de · 2,784 words · saved by 1 readers

I know what you are thinking: Exposing an API that accepts SQL is crazy. It's a terrible idea. Especially if the API is exposed on the internet. Doing that is insecure and will lead to SQL injection attacks, it is a nightmare to maintain and it will lock the backend implementation into a specific technology (some ANSI SQL database). But is that really true? Time to re-evaluate! Engineering is about making trade-offs. There is no one fits it all solution. Therefore, here I'll present the kind of scenario in which SQL is in fact the best choice to make a backend API work out. But let's take a step back first. Many APIs can be simple. Often, a CRUD API that allows for fetching, creating, updating and deleting entities by some ID is all that is needed to get the job done. No arguing with that. And there is no reason to over-engineer things if this is really the case. On the other hand, there is a considerable number of applications where the business will want to expand its features in a w

SQL as API SQL as API 25 Dec 2023 software-development sql SQL in the API??? # I know what you are thinking: Exposing an API that accepts SQL is crazy. It's a terrible idea. Especially if the API is exposed on the internet. Doing that is insecure and will lead to SQL injection attacks, it is a nightmare to maintain and it will lock the backend implementation into a specific technology (some ANSI SQL database). But is that really true? Time to re-evaluate! There is always an exception # Engineering is about making trade-offs. There is no one fits it all solution. Therefore, here I'll present th

Explore this link on the map →

related reading