functional.cafe is one of the many independent Mastodon servers you can use to participate in the fediverse.
functional.cafe is an instance for people interested in functional programming and languages.

Server stats:

207
active users

#databases

24 posts18 participants1 post today
Public
Julik Tarkhanov · A Can of Shardines: SQLite Multitenancy With RailsThere is a pattern I am very fond of - “one database per tenant” in web applications with multiple, isolated users. Recently, I needed to fix an application I had for a long time where this database-per-tenant multitenancy utterly broke down, because I was doing connection management wrong. Which begat the question: how do you even approach doing it right? And it turns out I was not alone in this. The most popular gem for multitenancy - Apartment - which I have even used in my failed startup back in the day - has the issue too. The culprit of does not handle multithreading very well is actually deeper. Way deeper. Doing runtime-defined multiple databases with Rails has only recently become less haphazard, and there are no tools either via gems or built-in that facilitate these flows. It has also accrued a ton of complexity, and also changes with every major Rails revision. TL;DR If you need to do database-per-tenant multitenancy with Rails or ActiveRecord right now - grab the middleware from this gist and move on. If you are curious about the genesis of this solution, strap in - we are going on a tour of a sizeable problem, and of an API of stature - the ActiveRecord connection management. Read on and join me on the ride! Many thanks to Kir Shatrov and Stephen Margheim for their help in this.
Public

Other govt #databases contain secret #whistleblower data. At the Dept of #Veterans Affairs, you’ll find granular #MentalHealth info on fmr service members, including notes from #therapy sessions, details about #medication, & accounts of substance abuse. Govt agencies including the #IRS, #FBI, #DHS, & Dept of #Defense have all purchased #cellphone-#location data, & possibly collected them, via secretive groups such as the National Geospatial-Intelligence Agency.

#Trump#law#privacy
Public

The federal govt is a veritable cosmos of #information, made up of constellations of #databases: The #IRS gathers comprehensive #financial & #employment info from every taxpayer; the Dept of Labor maintains the National Farmworker Jobs Program (NFJP) system, which collects the #personal info of many workers; #DHS amasses #data about the movements of every person who travels by air commercially or crosses the nation’s borders; the #DEA tracks license plates scanned on American roads.

Public

Guess who took a few weeks (on and off) off frustrated research, as to why his #SQL migrations were failing, only to discover, that they were missing a comment (of all things)? Not this guy! (Well maybe - definitely - this guy, though 😅)
So, anyways: at least I got to write a nice little article about it: geekbetrieb.de/ramblings/drizz

geekbetrieb.deDrizzle ORM and statement-breakpoint - geek:betrieb
Public

🎉🎉🎉 Congrats, you've discovered that #SQL #engines do things! In a shocking and totally unforeseen twist, #databases apparently parse, bind, plan, and even execute queries—who knew? 🤯 But fear not, #DoltHub is here to make the groundbreaking revelation that rows and vectors exist. 🚀💾
dolthub.com/blog/2025-04-25-sq #DataDiscovery #TechNews #HackerNews #ngated

www.dolthub.com · Anatomy Of A SQL EngineBlog for DoltHub, a website hosting databases made with Dolt, an open-source version-controlled SQL database with Git-like semantics.
Public

Hackaday: Abusing DuckDB-WASM To Create Doom In SQL. “In a twist, [Patrick Trainer] had the idea to use SQL instead of JS to do the heavy lifting of the Doom game loop. Backed by the Web ASM version of the analytical DuckDB database software, a Doom-lite clone was coded that demonstrates the principle that anything in life can be captured in a spreadsheet or database application.”

https://rbfirehose.com/2025/04/25/hackaday-abusing-duckdb-wasm-to-create-doom-in-sql/

#databases#doom#sql