24,210 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
Advice
0
votes
6
replies
77
views
Where should a beginner start with System Design and Pattern Recognition?
I am a software developer and I’m starting to learn System Design and Pattern Recognition concepts.
I want to understand:
how to approach system design problems step by step.
what fundamentals I ...
-1
votes
0
answers
20
views
GUID v4 vs GUID v7 as SQL Server PK [migrated]
I've heard a lot that UUID v7 is performing much better in databases, when using it as primary key, due to the nature of how B-tree works. We have a huge problem with current implementation of PK as ...
Advice
0
votes
2
replies
52
views
What are problems with my reasoning that a WAL (write-ahead log) is redundant for my TSDB (time-series DB)?
I am building a time series database in C++. Changes to record sets are restricted to appends. This is not a production system, rather for learning.
The motivation and purpose for a WAL (write-ahead ...
1
vote
1
answer
80
views
How do I version translations while keeping relationships?
Some part of a post has translations:
CREATE TABLE "posts" (
"id" int4 NOT NULL,
"title" varchar,
PRIMARY KEY ("id")
);
CREATE TABLE "...
Best practices
0
votes
4
replies
49
views
Dynamic field search in Spanner DB
We're building a SaaS platform for which we need to design a data model which could accompany domain specific data. We don't know the structure of domain specific data. So these are the evaluated ...
Best practices
0
votes
5
replies
164
views
How to condense multiple boolean columns into one column in laravel?
How do I design a scalable user badges system without creating many boolean columns?
I'm building a badge system where users earn specific badges by completing certain tasks.
Schema::create('...
Advice
0
votes
3
replies
43
views
Review FMCG business inventory system DB design normalization and ERD
My case study project inventory system tracks stock and updates stock after every sale of a FMCG (Fast-moving consumer goods) business. Since it is FMCG, they get stock by consignment and the database ...
Best practices
0
votes
2
replies
129
views
How to model and persist entities whose state changes over time
I’m designing a domain model where some entities evolve over time, and I need to keep a historical record of their state that can be retrieved later.
A simplified example:
A Credit Line represents a ...
Best practices
0
votes
5
replies
105
views
How to handle a "ghost" product in a SellDetails table without breaking normalization?
I'm developing a desktop application for gym management. One feature is a store for selling memberships and products.
My client sometimes wants to sell something that is not in the inventory or ...
Best practices
1
vote
1
replies
105
views
Should I separate a 10+ TB SQL Server data warehouse into multiple databases or keep it in one with multiple schemas?
Our team manages a SQL Server 2019 data warehouse that’s grown to over 10 TB.
It currently uses a single database with multiple schemas (clinical, financial, hr, operations, staging, etc.).
Our DBA is ...
Best practices
3
votes
1
replies
120
views
Architecture design for multilingual descriptions for several classes
I am creating an E-Commerce app. It has Category and Product classes. Both have multilingual descriptions, so, tables with title, description, meta-*, etc. and unique key (id, language_id).
To add ...
0
votes
1
answer
67
views
Referencing by SHA256 unique documentID vs. referencing by the field that generated the unique SHA256 unique documentID [closed]
I’ve been working on a React/Firebase app for the past 10 months, and things have been smooth so far. Recently, I decided to do some refactoring.
I switched from using user-generated fields as unique ...
3
votes
1
answer
146
views
How do I enforce uniqueness across parent and child tables without denormalizing my data?
I have two tables in Postgres with a parent/child relationship:
CREATE TABLE table_a (
id SERIAL PRIMARY KEY,
type TEXT NOT NULL,
rundate DATE NOT NULL
);
CREATE TABLE table_b (
id ...
1
vote
2
answers
70
views
Can a 1:N and an M:N relationship coexist between two entities?
We have entities Teacher and Student; there are two relationships between them, supervision and teaching:
Supervision is one-to-many, but teaching is many-to-many, which is a problem. To fix it, I ...
0
votes
1
answer
84
views
How do I preserve data integrity with a linking table in PostgreSQL?
I have these tables in my PostgreSQL database:
CREATE TABLE companies (
id INT PRIMARY KEY,
name VARCHAR(255) NOT NULL UNIQUE
);
-- Employees belong to one company
CREATE TABLE employees (
...