<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/ufxolgsz4" -->

---
title: You Don't Need an ORM | daily.dev
description: Explores an alternative approach to database access that embraces raw SQL instead of abstracting it away with ORMs. Introduces Squirrel, a library for Gleam...
canonical: https://daily.dev/posts/ufxolgsz4
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: You Don't Need an ORM | daily.dev
og:description: Explores an alternative approach to database access that embraces raw SQL instead of abstracting it away with ORMs. Introduces Squirrel, a library for Gleam...
og:url: https://daily.dev/posts/ufxolgsz4
og:image: https://api.daily.dev/og/posts/uFxOlgsZ4.png
og:image:alt: Post cover image
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# You Don't Need an ORM

**[scopespace](https://daily.dev/sources/scope_space)** · [@fab978](https://daily.dev/fab978) · 37 upvotes · 7 comments

## Summary

Explores an alternative approach to database access that embraces raw SQL instead of abstracting it away with ORMs. Introduces Squirrel, a library for Gleam that uses code generation from SQL queries to provide type-safety and good developer experience without sacrificing performance. Demonstrates how developers can write plain SQL while maintaining the benefits of static typing in functional languages, avoiding common ORM pitfalls like N+1 query problems.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://codebeameurope.com/talks/you-don-t-need-an-orm/>

## Community discussion

Top comments from developers on daily.dev.

**@oussamafadlaoui** · 3 upvotes

> Disagreed. ORM's are fine to use for simple, repetitive queries. Raw queries know their place as well. Like anything in programming tools and languages, the answer is not black or white.

**@andradei** · 3 upvotes

> Generating type-safe code from raw SQL is so much better than ORMs. It's better for performance and resources, easier to debug, and it "forces" the dev to actually learn the language the database uses.

**@catalincodes** · 3 upvotes

> Here's a counterpoint. Use store procedures. Then use something like ADO.NET or its equivalent for your language and make your own simple DAL where all you do is make the queries. It's my favourite approach.
>
> It does not work always. I could write plenty of cases where it does not work, because you require flexibility, but it's great when it does though.
>
> What I'm saying.. you don't need an ORM, sometimes. You can build your own ORM in the DAL.

**@ghost** · 2 upvotes

> Great Article. Not everything has to be an Object.

**@panindrakumar** · 0 upvotes

> Is that the complete article?

## Similar posts on daily.dev

- [Why use ORMs if LLMs write code?](https://daily.dev/posts/why-use-orms-if-llms-write-code--swri5tplk) · ploeh blog · 111 upvotes · 44 comments
- [How ORMs Still Let SQL Injection Through \(and How to Close the Gaps\)](https://daily.dev/posts/how-orms-still-let-sql-injection-through-and-how-to-close-the-gaps--uwxttxmz8) · freeCodeCamp · 67 upvotes · 2 comments
- [Drizzle ORM: an introduction](https://daily.dev/posts/drizzle-orm-an-introduction-ddzeiduom) · Flavio Copes · 7 upvotes · 2 comments
- [The revenge of SQL: How a 50-year-old language reinvents itself](https://daily.dev/posts/the-revenge-of-sql-how-a-50-year-old-language-reinvents-itself-ptgmonz65) · InfoWorld · 1 upvotes · 0 comments

---

Tags: [#database](https://daily.dev/tags/database), [#sql](https://daily.dev/tags/sql), [#gleam](https://daily.dev/tags/gleam)

[View this post on daily.dev](https://daily.dev/posts/ufxolgsz4)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"DiscussionForumPosting","mainEntityOfPage":"https://daily.dev/posts/ufxolgsz4","headline":"You Don't Need an ORM","text":"Shared: You Don't Need an ORM","url":"https://daily.dev/posts/ufxolgsz4","datePublished":"2025-11-04T17:25:46.276Z","dateModified":"2025-11-04T17:25:46.278Z","author":{"@type":"Person","name":"Furqan ahmad","url":"https://daily.dev/fab978","image":"https://media.daily.dev/image/upload/s--GY0VPIs1--/f_auto/v1788339486/avatars/avatar_01YKXdhx6XxiWycQaD2rh?_a=BAMAMicg0","description":"\nFull Stack & Backend Developer | Open to Remote Opportunities","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":4080}},"image":"https://media.daily.dev/image/upload/s--2-1xRawN--/f_auto/v1722860399/public/Placeholder%2011","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":37},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":7}],"sharedContent":{"@type":"WebPage","url":"https://api.daily.dev/r/ogSA8BhDq"},"comment":[{"@type":"Comment","text":"Disagreed. ORM’s are fine to use for simple, repetitive queries. Raw queries know their place as well. Like anything in programming tools and languages, the answer is not black or white.","datePublished":"2025-11-11T13:50:52.613Z","dateModified":"2025-11-11T13:51:08.706Z","url":"https://daily.dev/posts/uFxOlgsZ4#c-OtJVGrDbx","author":{"@type":"Person","name":"Oussama Fadlaoui","url":"https://daily.dev/oussamafadlaoui"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3}},{"@type":"Comment","text":"Generating type-safe code from raw SQL is so much better than ORMs. It’s better for performance and resources, easier to debug, and it “forces” the dev to actually learn the language the database uses.","datePublished":"2025-11-05T16:00:48.885Z","url":"https://daily.dev/posts/uFxOlgsZ4#c-f4Yr1YxQM","author":{"@type":"Person","name":"Isaac de Andrade","url":"https://daily.dev/andradei","image":"https://avatars.githubusercontent.com/u/2653546?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3}},{"@type":"Comment","text":"Here’s a counterpoint. Use store procedures. Then use something like ADO.NET or its equivalent for your language and make your own simple DAL where all you do is make the queries. It’s my favourite approach.\nIt does not work always. I could write plenty of cases where it does not work, because you require flexibility, but it’s great when it does though.\nWhat I’m saying… you don’t need an ORM, sometimes. You can build your own ORM in the DAL.","datePublished":"2025-11-05T13:52:03.721Z","dateModified":"2025-11-05T13:55:35.785Z","url":"https://daily.dev/posts/uFxOlgsZ4#c-R3hHiwX5q","author":{"@type":"Person","name":"Catalin","url":"https://daily.dev/catalincodes","image":"https://media.daily.dev/image/upload/s--dPI_Qfxp--/f_auto/v1717856576/avatars/avatar_N60Y1zup0kLFNR5dsq5H7"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3}},{"@type":"Comment","text":"Great Article. Not everything has to be an Object.","datePublished":"2025-11-05T15:43:22.986Z","url":"https://daily.dev/posts/uFxOlgsZ4#c-UukH2Wi3p","author":{"@type":"Person","name":"Deleted user","url":"https://daily.dev/ghost","image":"https://media.daily.dev/image/upload/s--hNIUzLiO--/f_auto/v1705327420/public/ghost_vlftth"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2}},{"@type":"Comment","text":"Is that the complete article?","datePublished":"2025-11-12T04:24:48.769Z","url":"https://daily.dev/posts/uFxOlgsZ4#c-7LJ0IAdZu","author":{"@type":"Person","name":"Panindra Kumar","url":"https://daily.dev/panindrakumar","image":"https://lh3.googleusercontent.com/a/ACg8ocJCeHgI7KXxoQ45ZLjrt5NBTCLltzuGWe3sYqmrMbKYvwbUMgo=s96-c"}}],"isPartOf":{"@type":"WebPage","url":"https://daily.dev/squads/scope_space","name":"scopespace"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"scopespace","item":"https://daily.dev/squads/scope_space"},{"@type":"ListItem","position":3,"name":"You Don't Need an ORM"}]}
```

