---
title: "Is “SQL from the frontend” viable?"
description: "Letting the frontend query the database directly, via tools like PostgREST or Firebase, can sharply speed up development by removing backend abstraction layers and frontend/backend team dependencies, which makes it attractive for prototypes and many apps."
url: "https://swe.quest/articles/is-sql-from-the-frontend-viable-7fa2effc8f7be530"
canonical: "https://neon.com/blog/sql-frontend"
source: "Neon"
published: "2024-11-07"
difficulty: "easy"
kind: "Opinion"
reading_minutes: 3
tags: ["postgres","identity-auth","system-design","security"]
---

# Is “SQL from the frontend” viable?

A post on [Neon](https://swe.quest/sources/neon.md), published 2024-11-07, 3 min read, Opinion. Original: [https://neon.com/blog/sql-frontend](https://neon.com/blog/sql-frontend)

## Summary

Letting the frontend query the database directly, via tools like PostgREST or Firebase, can sharply speed up development by removing backend abstraction layers and frontend/backend team dependencies, which makes it attractive for prototypes and many apps. It does not have to replace the backend, which still holds secrets and sensitive logic. Exposing a database safely would require query-shape and parameter allow-listing with tooling to maintain the lists, per-IP rate limiting, and database-level authorization such as Postgres Row-Level Security. The verdict is that the approach is not production-ready yet, and Neon is exploring it through its RLS work, now part of the Neon Data API.

Written by swe.quest, not by the author.

**Difficulty:** Easy: no special background needed; explains what something is and why it matters

## Topics

- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)
- [Identity & auth](https://swe.quest/tags/identity-auth.md) (Security)
- [System design](https://swe.quest/tags/system-design.md) (Architecture & design)
- [Security](https://swe.quest/tags/security.md) (Security)

## Prerequisites

- client-server architecture ([easy posts on System design](https://swe.quest/tags/system-design.md?difficulty=easy))
- SQL basics ([easy posts on SQL](https://swe.quest/tags/sql.md?difficulty=easy))

## Keywords

Neon, PostgREST, Row-Level Security, Firebase, SurrealDB, Neon Data API

## Related posts

- [Introducing Neon RLS: Simplifying Row-Level Security For Postgres](https://swe.quest/articles/introducing-neon-rls-simplifying-row-level-security-for-postgres-4b66d76670bb402f.md): Neon · 2024-10-30 · Medium · 6 min read · PostgreSQL, Identity & auth, Multi-tenancy, TypeScript
  Neon RLS lets Postgres row-level security policies authenticate requests with JWTs from any auth provider that exposes a JWKS URL.
- [Oops-Proof Your Vibe Code With Neon: Because Mistakes Happen](https://swe.quest/articles/oops-proof-your-vibe-code-with-neon-because-mistakes-happen-d2619ae449e03a42.md): Neon · 2025-04-29 · Medium · 6 min read · PostgreSQL, Application security, AI for coding
  Neon's built-in safety features act as guardrails for databases behind AI-generated ("vibe coded") apps: point-in-time restore, snapshots, protected branches, IP allowlisting, mandatory SSL/TLS (sslmode=require) and password resets, each with brief console steps.
- [The Dangers of Testing in SQLite as a Postgres User](https://swe.quest/articles/the-dangers-of-testing-in-sqlite-as-a-postgres-user-e7593810c6b7484d.md): Neon · 2025-02-17 · Medium · 9 min read · Testing, PostgreSQL, SQLite, SQL
  Testing against SQLite when production runs Postgres gives false confidence.
- [Building with Stripe Data Pipeline and the Neon backend](https://swe.quest/articles/building-with-stripe-data-pipeline-and-the-neon-backend-d3614e7e4b927058.md): Neon · 2026-10-26 · Medium · 11 min read · Payments & fintech, PostgreSQL, System design, Debugging, Serverless
  Stripe Data Pipeline's real-time sync streams Stripe objects into Postgres tables within seconds, which lets apps drop webhooks entirely: they write to Stripe's API and read charges, prices and promotion codes from synced stripe.\* tables.
- [Recreating S3 in Postgres using PostgREST](https://swe.quest/articles/recreating-s3-in-postgres-using-postgrest-d07b4a06448dac82.md): Neon · 2025-05-27 · Medium · 7 min read · PostgreSQL, API design, Identity & auth, SQL
  A simple S3-like file server can be built inside Postgres by storing binary data in a BYTEA table and exposing it through PostgREST's functions-as-RPC via the Neon Data API.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
