24,109 questions
-1
votes
0
answers
49
views
Complex query with column transformation [closed]
I want to get data from my database with as few queries as possible to not waste time with network latency, which is affecting overall performance significantly.
This is a simpler version of my ...
-2
votes
0
answers
63
views
What is the most efficient way to keep an SQL Table updated according to a CSV? [closed]
I want to keep a table in my database to be updated with a public online csv file. The file constantly has new rows added and removed.
I have a VM to run Python notebooks, and an SQL Server.
What is ...
-3
votes
0
answers
80
views
How to create new table from parts of original table and create bridge table to remove many to many options? [closed]
Table_A_ID
Column_B
Science
History
Mathematics
1
5
1
1
2
6
1
1
3
7
1
1
I want to take the names of columns Science, History and Mathematics and create a second table:
Table_B_ID
Col 1
1
Science
2
...
0
votes
0
answers
33
views
optimized multi-tenant data model to support tenants without increasing the storage, using Kafka as a message queue
I'm working on a SAAS product where we have a multi-tenant data model with multiple fields that are specific to tenants. I am using Kafka as a message queue and PostgreSQL as datastore.
The way I ...
0
votes
0
answers
42
views
Inserting data into a Postgres database with Trino causes an error io.trino.spi.type.IntegerType
I have a Trino that reads Parquet (which was converted from JSON) and wants to insert that data into a PostgreSQL database.
When defining the Trino schema and creating a table, it is ok. But after ...
-4
votes
0
answers
41
views
ERD system developer CourseWord
I am designing a database. For the address part, I want to use a hierarchy like the picture. Am I doing it right? Or should I connect "accommodation" to nation first and then step back to ...
-1
votes
1
answer
58
views
When should double validation be implemented with both the database and the backend? [closed]
I'm trying to figure out how to balance security, performance, and best practices in the validation process of the data of a REST API and its interaction with the database.
Say you have a book table ...
3
votes
3
answers
87
views
Which column to index in multicolumn indexing?
UserID
First
Middle
Last
Type
CreatedAt
123
John
Henry
Doe
Mage
03-28-2025
Let's say I have the following table above. I would like to create index to help speed up my queries.
All queries would like ...
0
votes
1
answer
55
views
real-world performance & trade-offs for Regatta DBMS [closed]
We are considering using Regatta as a high-performance transactional database. So far it promises higher throughput, stronger consistency and lower-latency reads and writes while being SQL compatible. ...
1
vote
0
answers
100
views
dimensional modeling from two different source systems for the same business process?
I have two transactional systems that is used for the same operational business activity: purchase order transactions. One system is legacy and the other is a new modern one. They have different ...
0
votes
0
answers
52
views
FIFO inventory accounting for blockchain data in SQL
I'm trying to implement real-time analytics on aggregated blockchain data. My database stores swap events (SwapEvent table) with information about tokens traded, amounts, and USD values. Currently, I'...
0
votes
1
answer
169
views
Does "tuples are not necessarily distinct" imply they are equal? How do I show whether this multivalued dependency holds in the example table?
From the book Fundamentals of Database Systems (7th edition) by Elmasri et al., pages 475-476:
A multivalued dependency [MVD] X ↠ Y specified on relation schema R, where X and Y are both subsets of R,...
0
votes
1
answer
35
views
Is there a mechanism to set different priorities to ensure that access to postgresql database in golang? [closed]
The server I developed with golang is divided into two categories when accessing the database. One category is data with redis cache, which is generated very frequently, but inserted into the database ...
0
votes
2
answers
146
views
SQL Server table scan when using SELECT *
I am working with SQL Server 2019 and have a TVF that retrieves products based on a list of categories. However, I noticed that when I use SELECT *, the query results in a table scan, whereas ...
0
votes
2
answers
68
views
Integer PK but a GUID as FK
In our current PostgreSQL DB, primary keys are Ints. However, in almost all of the communications between services another candidate key is used, a GUID. While I am not the original author of the ...