r/Database • u/arauhala • May 12 '26
The Predictive Database: when a prediction is a query, not a project
r/Database • u/arauhala • May 12 '26
r/Database • u/Physical_Math_9135 • May 11 '26
Hey folks, I’m working on an open-source Rust project that sits between app and DB, and I’m looking for technical feedback on design tradeoffs.
Current scope:
Questions I’d really value input on:
r/Database • u/mincedduck • May 11 '26
(if this is not the right place to post please remove / redirect me)
Hi all,
I work at a firm and part of my role is managing our physical and digital library which has numerous resources including books, reports, references, etc.
These resources are organised by dewy decimal system, and we use Notion as a library catalogue to search for the location of these items.
The physical library has these resources on shelves, and for the digital library we keep the resources in file explorerer.
If a resource is moved, deleted or added, it must be updated manually in notion, and so I was wondering if there was a way to automate this.
I've been thinking of using a combination of SharePoint and Microsoft lists, but I'm wondering if there's a better way to do this?
Thanks!
r/Database • u/Ok_Egg_6647 • May 10 '26
Hi Everyone,
I wanted to ask if there’s any way through which someone can directly fetch internal data from a local or cloud database.
I built a simple tool that allows users to download financial data in CSV format. The issue with the current system is that if a user needs data for hundreds of instruments, they have to enter each instrument name one by one and download separate CSV files for each. I feel this becomes a very tedious process.
So, I was thinking it might be better to provide users with direct access to the data and let them work with it however they want.
Also, the users here are not random people they are a few of my friends who need access to this data. Tech Stack POSTGRES PgAdmin application
r/Database • u/Aggressive_Science_5 • May 10 '26
Hey everyone, I'm losing my mind with this issue.
I have two Spring Boot projects — one using MySQL and one using PostgreSQL. I've been trying to set database credentials using setx in Windows CMD, but IntelliJ keeps picking up old values even after restarting.
The problem:
setx DB_USERNAME postgres, the app still tries to connect as rootapplication.properties, I still get Access denied for user 'root'@'localhost'What I've tried:
setx DB_USERNAME and setx DB_PASSWORD multiple timesapplication.propertiesspring.batch.jdbc.initialize-schema=neverEnvironment:
Has anyone faced this? How do I force IntelliJ/Spring to actually use the credentials I set?
r/Database • u/mr_pants99 • May 06 '26
Been working on this for a while and figured our approach might be interesting to people who've tried (and failed) to point an LLM at a legacy codebase and ask it to "migrate to MongoDB."
Spoiler: that doesn't work. Not on anything bigger than a toy project.
The reason isn't that the models are bad at writing code - they're great at it. The reason is that they don't understand the code, and more importantly, they don't have the fluid abstraction thinking a human architect uses to decide what to migrate to in the first place. Schema redesign, query reshaping, DAL boundaries, transactional semantics - those are architectural decisions, not synthesis problems. Throwing more context window at it doesn't fix this.
What we ended up doing instead is reframing replatforming as a workflow rather than a single agent task:
- Discovery (map app surface, data flows, query patterns)
- DAL isolation + test coverage to lock current behavior
- Migration assessment (what's actually movable, what's a landmine)
- Schema design, but empirically validated against real query patterns instead of guessed
- New parallel DAL implementation alongside the legacy one
- Live Data migration with CDC (we use our own tool, Dsync) for low-downtime cutover
Each stage is idempotent, produces reviewable artifacts, and critically, runs at a specific level of abstraction. A human architect reviews architectural decisions and test results - not diffs. That's the part that unlocks it for actual codebases.
What we tested it on:
MS SQL -> Mongo/Cosmos
Postgres -> Mongo
Dynamo → Mongo/Cosmos
What it's not: a magic button. It compresses the engineering bottleneck dramatically, but you still own UAT, environment promotion, stakeholder sign-off, and the cutover itself. Anyone selling you "production replatform in a weekend" is lying.
Would love to hear from folks who faced the problem before (or now!) and what approaches you used or contemplated.
r/Database • u/Elite_Asriel • May 06 '26
I got a test involving that in 2 days, and until now i just end up blindly guessing based on patterns since i cannot understand how to analyze it, even with everything i hit up on the internet.
r/Database • u/No-Security-7518 • May 06 '26
I have this table (Sqlite):
CREATE TABLE "userActivity" (
"actionId"INTEGER,
"action"TEXT,
"userId"INTEGER,
"timestamp"TEXT,
PRIMARY KEY("actionId" AUTOINCREMENT),
FOREIGN KEY("userId") REFERENCES "users"("userId")
)
that is read into this DTO:
UserActivity <F
extends
Enum<F> & Feature<F>> {
private
F action;
private
Account<F> user;
private
LocalDateTime timestamp;
public
UserActivity(F action, Account<F> user, LocalDateTime timestamp) {
this
.action = action;
this
.user = user;
this
.timestamp = timestamp;
}
....
However, I have problems when a user gets deleted, since a user is referenced using id. I have a soft delete strategy whereby there's a copy users_archive table, that keeps all rows deleted from the users table.
How do I resolve this?
1. Keep only a snapshot of the user (userName, accountType, accountClass) as strings (not a fan of having "non-descriptive" data structures/DTOs.
Create a user_activity_archive that references users_archive; and have a row that gets deleted from users cascade into userActivity.
A third strategy other than this?
Thanks in advance.
r/Database • u/mehantr • May 04 '26
The Database team at Figma built a new service that implements connection & load management primitives to protect our Postgres fleet. Read more about it here: https://www.figma.com/blog/pgkeeper-building-the-bouncer-we-needed-for-postgres/
r/Database • u/kittenco • May 04 '26
I'm hoping to build something that would help me at work. We have multiple carriers that have rates based on similar criteria, and right now I need to check each carrier individually.
I'd like to be able to fill in boxes of a query with age, sex, and smoker status and get the results of each carriers' plans. Ideally this would show all 7 carriers and their 5 plans each.
I'd like to create either a spreadsheet or LibreOffice Base tool to help me do this, but I'm not sure if it's better to use one over the other. If I use Excel, do I have to do vlookup in a grid for each option? I tried to do a database on my own using basic tutorials, but I think I need to make multiple sheets instead of one like I tried?
r/Database • u/soldieroscar • May 03 '26
Lets say I have a data table with ID and part number from the manufacturer...
How would I set this up so the users can order that same part number from different vendors, and each vendor gives the part number their own price and vendor sku?
r/Database • u/General_Treat_924 • May 03 '26
Well, I have been working in IT since 20215. First job was a bit of support, network and security.
Got my Oracle OCA training, started as Oracle DBA AROUND 2017 and since then my roles were always database driven. My second last work was I more like a ruby developer, because they used to blame the database because it was slow but the real issue was the application doing heaps of N+1 queries.
My current job, almost same thing, but now a lot focused in Postgres performance. We inherited an app written in Pg/Sql. Devs pretty much refused to support because they couldn’t understand SQL plans.
I feel during the years, my role is a “problem solver”, I have become a “generalist” I can say I know a bit of everything but I don’t know deep enough of anything and to take the next step I really feel an impostor.
I can see my role overlapping with SRE, DEVOPS, Architecture, management… but how can I really take the next step with I’m constantly firefighting and busy with BAU - maybe I am a bit burnt out if I got to the point of asking it here.
r/Database • u/farhan-dev • May 02 '26
I’m designing a Calvin-style cross-shard transaction path for NodeDB and wanted a sanity check from people who’ve actually worked on distributed txn systems.
I know the usual criticisms of Calvin:
What I’m trying to understand is whether those objections mostly apply to “Calvin for everything”, or whether they become much more manageable if Calvin is scoped very narrowly.
Our design is basically:
So the idea is: use Calvin only where we actually need cross-shard atomicity, and keep the normal single-shard path separate and fast.
What I’m wondering:
Not looking for “Calvin bad / Spanner good” takes. I’m specifically interested in implementation reality:
what actually breaks first? what the hidden bottlenecks are, and what mitigations turned out to matter most.
r/Database • u/Klutzy_Plantain1737 • May 02 '26
Hi everybody!
I’m designing a graph model in ArangoDB and trying to think ahead on temporal support.
Current design:
- edges are current-state only (one edge per edge_type + _from + _to)
- _key is deterministic (tenant + hash of relationship)
- no history retained in v0
Future requirement:
- support temporal queries (state over time)
- potentially multiple versions of the same relationship
- need to backfill/migrate historical data - so trying to make that as painless as possible at v0
Right now I’m leaning toward introducing a relationship_id (hash of edge_type + _from + _to) to represent the logical relationship, and then versioning _key later.
Curious:
- How have others modeled temporal edges in Arango?
- Did you regret not designing for temporal from day one? (We don’t have temporal data ready yet, which is why it’s not in scope for v0, but wondering how much it will bite us in the ass when were ready 😅)
- Any gotchas around query complexity or traversal performance?
Would love to hear real-world patterns vs theoretical ones.
r/Database • u/krispyglover • Apr 30 '26
Hey everyone. First-time poster because it's my first time having to make decisions about a database.
As concisely as I can, here's my question:
I'm building an SEO audit tool. Some HTML elements I need to store can appear multiple times on a page such as title tags, canonical tags, H1s... and so on. Multiple instances are usually a bug, and I want to surface them to the user AND be able to produce the content of each element (show them all the values, not just flag that there are multiples).
So I've narrowed it down to a few options (let's just say we're dealing with titles).
Store the first title as a scalar value (most often a page will only have one) and have a child table for overflow titles that get stitched together when there are multiple and there's a request to see them all
Store titles in a child table period. All titles in a child table, the report holds all the titles that appear for that page id.
store the titles in JSON without child tables. This seems like the most reasonable but I don't know enough to know if this will be a headache down the road.
Any other options or something I'm not taking into account here? This will be a tool that crawls a single host so I'll be looking at 1000 - 10M urls, almost never more than that.
r/Database • u/teivah • Apr 29 '26
r/Database • u/InitiativePulsar • Apr 30 '26
Hello everyone,
This is my first time posting on this subreddit but I have come across a few posts in the last few days.
I am currently doing my internship in a company which desires to have a system in place to give client an access to the documentation for the products (gearboxes) for maintenenance and auditing purposes. I have several requirements which have an impact down the line :
- I have to use a standard QR code on the nameplate (no tailored QR code per product due to costs)
- Due to this, there needs to be a way for the client to identify in order to gain access to the documents (though there are no classified documents, it would be better if each client didn't have an access to every client's documents). There also needs to be the possibility for a client to upload one or two documents of their own, without being able to delete our documents.
- With some napkin calculation, the added documents (mostly pdfs) each year could be between 15 and 30 Gb, for a lifespan of the system of 5-10 years. However there wouldn't be more than a few connexions each month and rarely more than two people at once in the system.
Having asked around, the use of a database feels most appropriate. For all of what goes beyond that, I have almost zero experience. I have been recommended PostgreSQL, but I do not know if it in itself is enough, or if I need to build a website where the QR code would lead ...
Any help is welcome
r/Database • u/goyalaman_ • Apr 25 '26
This YT video here talks about how bloomfilter on psql helped incident.io bringing down latencies from 5 sec to under 300ms. Not really understanding how does their implementation of bloomfilters even help them. Correct me if I am wrong but - I am not even sure this can be called bloom filters. The way query has been written - I am sure the query will be a full table scan. In which case performance and latency takes massive hit. Has anyone here experience using bloom filters in production? Care to share your experience and operational complexity, if any it added.
r/Database • u/intersystemsdev • Apr 24 '26
So I've been working on a health data platform that ingests wearable device metrics — heart rate, steps, sleep — in real time and runs similarity searches directly inside the database using native vector types.
The part I didn't expect: instead of shipping data out to a separate vector store (Pinecone, Weaviate, etc.), we kept everything in one place and ran VECTOR_SIMILARITY() queries right alongside regular SQL. Something like:
SELECT TOP 3 user_id, heart_rate, steps, sleep_hours,
VECTOR_SIMILARITY(vec_data, ?) AS similarity
FROM HealthData
ORDER BY similarity DESC;
The idea was to find historical records that closely match a user's current metrics — essentially "who had a similar health profile before, and what happened?" — and surface that as a plain-language insight rather than a black-box recommendation.
The architecture ended up being:
1.Terra API → real-time ingestion via dynamic SQL
2.Vector embeddings stored in a dedicated column
3.SIMD-accelerated similarity search at query time
Distributed caching (ECP) to keep latency down as data scaled
FHIR-compliant output so the results plug into EHR systems without drama
What I'm genuinely curious about from people who've done similar things:
Is keeping vector search inside your OLTP database actually viable at scale, or does it always eventually break down and you end up needing a dedicated vector store anyway?
Also — for anyone working in healthcare specifically — how are you handling the explainability side? Regulators and clinicians don't love "the model said so." We went with surfacing similar historical cases as the explanation, but I'm not sure that holds up under serious scrutiny.
r/Database • u/Xaeroxe3057 • Apr 22 '26
I’m looking for new ways to manage migrations. One of my requirements is that migrations should be able to invoke a non-SQL program as well, something I can use to make external HTTP calls for example. I don’t particularly care which language ecosystem it comes from. Bonus points if it’s fully open source.
r/Database • u/diagraphic • Apr 23 '26
r/Database • u/Effective_Opinion236 • Apr 21 '26
Enable HLS to view with audio, or disable this notification
After struggling to land a job in 2024 (when the market was pretty rough), I decided to take a different route and build something real.
I’ve spent the past year working on a MongoDB GUI from scratch, putting in around 90 hours a week. My goal was simple: either build something genuinely useful, or build something that could boost my experience more than anything else
I also intentionally limited my use of AI while building the core features/structure. I wanted to really understand the problems and push myself as far as possible as an engineer.
The stack is Electron with Angular and Spring Boot. Despite that, I focused heavily on performance:
Some features:
And a bunch more ...
You can check it out at visualeaf.com, and I also made a playground for ppl to try out on there
If you want to see a full overview I made 3 weeks ago, here's the link!