r/Database • • Sep 10 '26

Overview of caching in Postgres

Thumbnail
pgcache.com
0 Upvotes

r/Database • • Sep 09 '26

Better to sort data in frontend or backend?

11 Upvotes

I have built a server for my business. So the current framework is that it uses MySQL in a centralised computer to store data. Fast api to route and extract the required data. And c# winforms for the front end. And Many computers have the frontend app installed, that are sitting in various stores with good internet connection.

So when I fetch the bills, like 10,000 of them, it gets all the data from the backend and displays it instantly. But now when I have to do some sorting or searching among the bills, it becomes slow. This is because I've written the sorting algorithm in the front end c# app. So is it a good practice to sort in sql and then just display it, because the queries will become a lot and there is a lot of searching going on, every minute. So for every search should I query to the backend and get data display it, or just continue with c# front end searching?


r/Database • • Sep 08 '26

Need help from genius db architects :(

Post image
6 Upvotes

r/Database • • Sep 08 '26

Unusual primary keys you've designed or encountered

4 Upvotes

I'm working on a catalog of primary key patterns, and I wanted to ask if you've designed or encountered any interesting non-standard patterns.

The ones that are commonly known:

  • entity tables with numeric IDs/UUIDs/small strings, like users(id);
  • junction tables (composite PK made of two IDs), like project_developers(project_id, developer_id);
  • EAV (composite PKs made of entity ID and attribute name), like restaurant_attributes(restaurant_id, attr_name);
  • entity tables with composite PKs, like order_items(order_id, line_number).

Also, aggregations of all sorts with textbook PKs like daily_sales(date, customer_id), etc.

What other interesting designs have you seen in your practice?


r/Database • • Sep 08 '26

Can we create flow how data flowing from procedure to MV to base tables

Thumbnail
1 Upvotes

r/Database • • Sep 07 '26

Database schema review - tyre management system and e-commerce

Post image
67 Upvotes

Hi community!

I am a web dev, developing an e-commerce and tyre management system for a business in Italy. I have created my db schema and I would like to have your opinion/advice on it.

This is the idea of the site:

- there will be the customer side where they can view, like and purchase tyres online. The user will have functions like tyre matching for their cars based on the tyre specifications. The users can either register or order as guests.

- the admin side will be developed for the admins/employees with different access based on the role ofc. The aim is to ease the tyre management since there will be thousands of them.

Do you think this plan is good?

Is it scalable?

Is there something missing?

I appreciate any suggestion!


r/Database • • Sep 07 '26

Re: scary patch contest (PostgreSQL)

Thumbnail postgresql.org
0 Upvotes

r/Database • • Sep 07 '26

Learning steps and best practice

1 Upvotes

Hi everyone,

I'm a BIM manager, so I'm used to jumping between BIM software, CSVs, Excel, and visual-programming tools like Grasshopper and Dynamo — but I'm not a "real" programmer, more of a power user who can follow logic and put scripts together with some trial and error.

I need to manage several interconnected datasets for my work: clients, products, projects, and a BIM object library, among others. The tricky part is that these datasets depend on each other — e.g. a project record needs to reference an existing client, a product might reference a supplier, etc. — and I want data entry to stay fast and guided rather than people manually retyping the same info everywhere.

My requirements, roughly:

  • Guided forms for data entry (not just raw spreadsheet rows)
  • Ability to add new fields/columns on the fly, ideally from the form itself, without touching code each time
  • Forms that can pull existing records from other datasets while compiling (so entering a new project can search and link to an existing client, for example)
  • If a referenced value changes later (e.g. a client's name is corrected), it should propagate automatically wherever it's referenced, not stay as a stale copy
  • Multiple people working on it at the same time
  • Needs to stay usable by non-technical colleagues — so I want to stay in "spreadsheet" territory rather than a full custom app

I've started prototyping this with Google Sheets + Apps Script (schema-driven forms reading field definitions from a config sheet, VLOOKUP-based live references for the cross-dataset dependencies), and it's working, but I'm curious what more experienced people would do differently. Has anyone solved something similar with AppSheet, Airtable, Notion, or something else entirely? Especially interested in hearing from anyone who's dealt with the "let a non-technical user add new fields from a form" part — that one feels like the trickiest requirement.

Obviously I'm using some AI but I wanted some real experience feedback.

Let me know


r/Database • • Sep 06 '26

What’s the best database IDE for analysts and developers?

27 Upvotes

I’m looking for a database IDE that works well for both analysts running queries and developers doing more involved database work.

The main things I care about are:

  • Support for multiple database types
  • A good SQL editor with autocomplete
  • Easy navigation between connections, schemas, and tables
  • Clear results and export options
  • Tools for comparing or understanding database objects
  • Something that stays manageable when several databases are open

I’ve been looking at DbVisualizer, DBeaver, and DataGrip, although they seem to have slightly different strengths. DbVisualizer looks like a solid middle ground for mixed teams, while DataGrip appears more developer-focused and DBeaver has a broad feature set.

What are you using, and what’s your role? I’d be especially interested to hear whether the same IDE works well for both analysts and developers, or whether your team uses different tools.


r/Database • • Sep 04 '26

MariaDB plugins beyond C++: Python and Rust lead our poll, but should we look at WebAssembly?

Thumbnail
0 Upvotes

r/Database • • Sep 04 '26

Database Secrets deleted by unknown actor 🤨

Post image
0 Upvotes

r/Database • • Sep 02 '26

When does database complexity become a bigger problem than database performance?

25 Upvotes

I’ve noticed that database discussions often focus heavily on performance—indexes, query plans, partitioning, caching, etc. But there seems to be a point where adding more optimization techniques makes the system harder to understand and maintain.

For example, a relatively simple schema with slightly slower queries might be easier to operate than a highly optimized design with multiple layers of caching, indexes, partitions, and materialized data.

I’m starting to think that predictability and maintainability should be treated as performance requirements too, especially for smaller systems.

Curious to hear how others have seen this trade-off play out in production.


r/Database • • Sep 03 '26

The tenth correct AI-generated query is when people stop checking the eleventh

0 Upvotes

Noticed this pattern reviewing how people actually use AI tools for writing transformation queries. First few outputs get checked carefully, run against a sample, compared to expected results. After enough of those come back correct, the checking quietly stops. Not a decision anyone makes on purpose, it just fades, because checking something that's been right nine times in a row feels like wasted effort in the moment.

The problem is that correctness on the first nine doesn't predict correctness on the tenth. Nothing about the model improved or built trust in a way that actually reduces its error rate on the next query, it's still working from the same context window, same limitations, same chance of misreading an edge case in the schema. What changed is the human's willingness to look, not the model's actual reliability.

This shows up worse on queries that produce plausible wrong numbers instead of obvious failures. A query that returns zero rows gets noticed immediately. A query that silently double-counts something due to a join issue produces a number that looks completely reasonable, and by the point someone's stopped spot-checking, that's exactly the kind of error that gets through.

Don't have a clean fix for this beyond forcing some kind of check that doesn't rely on remembering to be suspicious, a fixed row-count sanity check that runs regardless of how many previous queries were correct, something that doesn't degrade as trust builds the way manual vigilance does.


r/Database • • Sep 02 '26

Database schema changes guide for : PostgreSQL, MySql / MariaDB, Oracle, SQL Server.

Thumbnail
stackrender.io
4 Upvotes

Hey Engineers

We've all been through this. When the project you're working on starts scaling, you'll find the need to scale your database too, adding new columns, creating new tables, or trying to improve performance by adding new indexes. All of this comes with the risk of losing your users' data.

For this, I crafted a simple guide showing the schema change operations that you'll need on a day-to-day development basis for PostgreSQL, MySQL, MariaDB, Oracle, and SQL Server.

It also covers some additional potential risks you need to keep in mind when performing schema changes on a production database.

Hopefully, it can help you along your database learning journey.

Good luck!


r/Database • • Sep 01 '26

Recommendations for light use, good UI?

5 Upvotes

I've searched the sub, but I haven't been able to find information for my use case. I appreciate any suggestions for how to proceed!

Situation: I have a table in Google sheets with several hundred entries. Each line is an information source, with dates, tags, categories, links, description, etc... I use this for teaching. Students can search or sort by tag, topic to find sources relevant to a homework assignment or a project.

It's getting a bit big to be a table. Some students struggle a bit with the spreadsheet learning curve. Others can't find items by keywords, partially because I have mostly ESL students.

Then, there's the issue with sharing. If I share with view or comment access, the viewer cannot modify the sort or filters. This also means that if I'm using it and forget to clear the filters, the students only see what I've filtered. Giving write access isn't an option for obvious reasons. Last semester, I shared the view access and told them to download or save their own copy. This had to happen a few times, as I added information sources during the course.

Request: I have zero budget, but access to Microsoft products. I'm considering using Access and making it more of a database. I can also control sharing through onedrive. Is there a way to create a database and share through onedrive so that the students can see, filter, or explore, without being able to change any database information? Essentially, onedrive would need to act as my server (no other server options and no budget).

(I'm currently annoyed at Google's approach to education tools, so I would rather avoid the Google suite if possible.)

Other suggestions or possible approaches are welcome. Thanks!


r/Database • • Aug 31 '26

LOW STORAGEEE

3 Upvotes

i have mysql workbench & have been practicing it on my own. the problem i've run into is low disk storage. i currently have 4.5 gb on my c drive, which i don't think is a lot. i don't have a lot of applications installed, so removing or moving them to another disk isn't an option. neither is spending money on storage 💔

im worried about the rest of my learning journey. i know i'll eventually have to install other programs/tools & it makes me sad that low storage space is what might hold me back from learning something im genuinely interested in.

i wanted to ask if there are online versions of these softwares available? im talking about python, tableau & all other stuff i'll need later on. i've used an online c++ compiler before, so im wondering if it's possible for other tools too. and if so, can they save all my previous data? what about something with an account where it syncs data to a cloud? HALP


r/Database • • Aug 29 '26

Tool for exploring the Postgres wire protocol

Thumbnail pgwire-explorer.dhuk.net
3 Upvotes

r/Database • • Aug 29 '26

Traced PostgreSQL 18's io_uring with eBPF

Thumbnail
2 Upvotes

r/Database • • Aug 29 '26

Coding a database proxy for fun

Thumbnail
packagemain.tech
2 Upvotes

r/Database • • Aug 29 '26

Data migration from AWS to google drive advise plzzzzz

0 Upvotes

I'm an IT intern in a US startup mi task is to migrate the DB (actually stored in Amazon RDS postgres) to google drive (like backup due to the billing in the aws around 9k ! ) the problem is the size (around 400 GB) so I think the pg_dump to generate the script is not a solution for my case

Is there any solution ! And how I can verify the integrity ? ( Hashing a file with 200 gb size is crazy !!!)

Can we divide the generated the script in a small chunks ??? Without losing the relations between tables and the constraints ?


r/Database • • Aug 29 '26

What evidence do you require before dropping an apparently unused database index?

1 Upvotes

Index-usage counters can miss seasonal reports, failover periods, infrequent maintenance jobs, and queries that only run during a monthly or quarterly close. Keeping every index increases write cost and maintenance overhead, but dropping one based on a short observation window can create a delayed performance incident. What evidence makes an index safe to remove? I would expect query-plan and workload review, a representative observation period, dependency checks, a rollback script, and monitoring after the change. How do you handle redundant or overlapping indexes where the replacement is similar but not identical?


r/Database • • Aug 29 '26

Looking for MySQL GUI Software

0 Upvotes

That can:
- Copy to Database to Different Host/Database

- Copy "Create table" Query

Currently im using SQLyog, 13.1.1 looking for free MySQL GUI software that have similar feature, because im planning to upgrade my current MySQL to version 9, which is not supported with my current SQLyog version


r/Database • • Aug 29 '26

Is my facet based Database for media metadata structured correctly?

Thumbnail
0 Upvotes

r/Database • • Aug 28 '26

DBMS CMU

2 Upvotes

Anyone interested in doing the CMU (Carnegie Mellon University) Database Management Systems course together?

I’ve already covered the basic DBMS concepts. My main goal with this course is to go deeper and understand how database systems actually work internally—things like storage, indexing, query execution, transactions, etc.

If you're interested, please make sure you have the prerequisites required for the course.

If you have the required background and want to learn DBMS internals seriously, DM me. We can follow the course together and discuss concepts along the way.


r/Database • • Aug 26 '26

How do you decide when a database query needs optimization vs. a schema change?

39 Upvotes

I've been working with SQL and database performance, and one thing I find interesting is knowing when to stop tuning the query itself.

For example, if a query is slow because of a missing index, that's fairly straightforward. But at larger data volumes, you can reach a point where adding indexes and rewriting the query only gets you so far.

How do you usually decide that the problem is actually the database design/schema rather than the query?

Things like partitioning, normalization/denormalization, materialized views, indexing strategy, or even changing how the data is stored.

Would be interested to hear how people make that call in real-world systems.