24,207 questions
Advice
0
votes
6
replies
112
views
Database design: to normalise or not?
I’m wondering when designing a database, is really strict normalization better or do you denormalize for performance from the beginning? It’s better because it runs faster right?
Advice
2
votes
3
replies
101
views
How to efficiently query high-volume custom post types without hitting wp_postmeta join bottlenecks?
I am managing a WordPress site with 100k+ entries in a custom post type. Standard WP_Query with multiple meta_query arguments is causing significant performance bottlenecks due to complex wp_postmeta ...
Advice
0
votes
2
replies
145
views
How to improve search time for attribute based database design
I am currently working on my mini project to practice(16 yo). I have this simple database structure consisting of products, categories and their attributes. I want to add search function. Structure ...
Best practices
0
votes
10
replies
260
views
How should I interpret SELECT vs INSERT/UPDATE/DELETE ratios when designing indexes for an OLTP workload?
I'm analyzing a SQL Server 2022 OLTP database and trying to refine my indexing strategy based on actual workload patterns.
The exact schema and queries cannot be shared, but the observed ratios and ...
Advice
0
votes
2
replies
57
views
Derived attribute storing
I understand that derived attributes should generally be calculated. When should a derived attribute be physically stored in a database table?
0
votes
1
answer
88
views
Concurrent update error: race condition error in FastAPI
I have a function, that updated database
@router.put("/{task_id}/status")
def update_status(task_id: str, task_data: UpdateStatus, db: Session = Depends(get_db)):
task = ...
Advice
0
votes
6
replies
100
views
Multi Vendor Insurance system best db design
I am building a module in which I have to integrate multi-vendor insurance using the nestjs and mysql. Mainly our purpose is to do insurance for new E-rickshaws. So, what is the best tables schemas I ...
Advice
0
votes
7
replies
108
views
By what database design do I store the many-a-day reminder timestamps in the database?
I'm creating a medication reminder app.
A user creates a reminder by selecting a medication, how long they will be consuming it, and timestamps for when they would to be reminded (receive a ...
Best practices
0
votes
2
replies
65
views
When using internal ids and exposed secondary ids, which should be used for foreign keys?
I have tables user and user_role and a m:n table that connects those, user_has_user_role.
To keep to a standard I want to not expose database table ids. So there is a secondary id id_be used in the ...
Best practices
0
votes
0
replies
61
views
PostgreSQL creating a bookstore or library database with reference tables
I'm creating a bookstore / library style database, and I wanted to get some feedback on my tables. I've made a previous version without reference tables, and now I'm trying to separate out the authors ...
Best practices
0
votes
2
replies
121
views
Rebalancing Traffic In Leaderless Distributed Architecture
Using Go I am creating an in-memory distributed store similar to Cassandra.
I have concept of storage_node with get_by_key and put_key_value. When a new node starts it starts to gossip with a seed ...
Best practices
0
votes
1
replies
76
views
How do I scale a notification + activity log system without hardcoding action types and categories everywhere?
I am building an apparel store platform composed of three primary domains: a shopper-facing application, an ERP-style business management system, and an external many-to-many supplier integration ...
Best practices
0
votes
4
replies
66
views
Does an alias table need a primary key? Is the key just a composite of all the columns?
I'm wondering if there's any point in a primary key if it encompasses ALL the fields in the table.
I have a table with "board game id" (primary key, int, non null), "board game name&...
Best practices
0
votes
2
replies
72
views
How to pass very large ID sets (500K–5M) to ClickHouse queries using clickhouse-cs (.NET)? any industry guidlines?
I am using the official **clickhouse-cs .NET driver(**https://github.com/ClickHouse/clickhouse-cs) with a ClickHouse cluster that has two nodes behind a network load balancer.
My use case requires ...
Best practices
0
votes
2
replies
57
views
What should the data structure of a help system for a dashboard web app look like?
I'm going to be working on developing a help/support system for a web app, and I'm thinking about the data structure beforehand. Authorized users should be able to create help texts/tooltips anywhere ...