24,202 questions
-3
votes
1
answer
96
views
SQL Server Error 1785: Introducing FOREIGN KEY constraint may cause multiple cascade paths [duplicate]
Using SQL Server I am trying to create a foreign key constraint:
Msg 1785, Level 16, State 0 Introducing FOREIGN KEY constraint 'FK_Staff_Subject_XRef_Batch' on table 'Staff_Subject_XRef' may cause ...
Best practices
0
votes
1
replies
59
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
62
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
59
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
2
votes
3
replies
67
views
Best practices for designing a GridDB schema for IoT time-series sensor data
I am evaluating GridDB for an IoT application that stores continuous sensor readings from multiple devices.
Each device sends temperature and humidity data every few seconds, and the dataset can grow ...
Best practices
0
votes
2
replies
54
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 ...
Best practices
1
vote
0
replies
64
views
Single-node NoSQL DB on Azure that can later migrate to ScyllaDB?
I’m building a system that will eventually store billions of rows of mostly append-only, time-series–style data.
For now, I want something that:
runs cheaply on a single Azure VM
handles very high ...
Best practices
0
votes
1
replies
79
views
Refining a Product Catalog: EAV vs. PostgreSQL JSONB for a pharmacy e-commerce platform
I'm architecting an e-commerce platform for a pharmacy with highly diverse categories (Medicine, Cosmetics, Supplements), each requiring unique sets of attributes.
I'm evaluating the trade-offs ...
Best practices
0
votes
5
replies
84
views
Feedback on data model normalisation for school project on service to match users based their preferences, and how to model verification status?
I am looking for feedback on the normalisation of my physical data model which I designed for my school project for a service to match users based on their preferences.
The data model is supposed to ...
Best practices
0
votes
2
replies
45
views
Updates with temporal foreign keys
I'm playing around with Postgres 18 temporal keys. At the moment, I have this schema:
CREATE EXTENSION btree_gist;
CREATE TABLE customer
(
id integer NOT NULL,
valid_at daterange ...
Best practices
0
votes
4
replies
104
views
Postgres: Best design pattern for "Exclusive Arc" (Polymorphic) relationships? (Nullable FKs vs. alternatives)
I am designing a database schema in PostgreSQL for a notification system. I have several distinct "parent" entities that can trigger a notification log:
order
invoice
shipment
...
Advice
2
votes
3
replies
73
views
Ensuring adjacent ranges in PostgreSQL
I am creating a database with temporal validity using date ranges in PostgreSQL 18.1. I want to place constraints which force the date ranges to be non-overlapping and adjacent (= there are no gaps).
...
Best practices
2
votes
4
replies
71
views
How do I differentiate each device so that each one has its own unique refresh token linked to the same account?
I am designing a mobile application with a user login system.
I am going to implement refresh tokens in order to allow for users to only have to log in once every 30 days.
How do I differentiate each ...
Best practices
0
votes
6
replies
88
views
How do I enforce that a sequence column does not have random integer values inserted?
Table event records an instance of an event.
Some events are repeating and should be referenced as a batch. I do not want to create a separate table as event_batch or something like this, as I just ...
Best practices
1
vote
4
replies
59
views
Should resume skills be stored as JSON, BLOB, or normalized tables for analytics and search performance?
Should resume skills be stored as JSON, BLOB, or normalized tables for analytics and search performance?
I'm building a resume analyzer that extracts skills and stores them for analytics. Currently ...