Skip to main content
Filter by
Sorted by
Tagged with
-2 votes
0 answers
64 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 ...
xtc_'s user avatar
  • 11
-3 votes
0 answers
82 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 ...
Vladimir Negovanovic's user avatar
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 ...
Farhaan Shaik's user avatar
0 votes
0 answers
44 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 ...
Prof.Plague's user avatar
-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 ...
Dat Ha's user avatar
  • 1
-1 votes
1 answer
61 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 ...
Observable Stone's user avatar
3 votes
3 answers
90 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 ...
Alan Chen's user avatar
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 ...
user121's user avatar
  • 801
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'...
cjc02's user avatar
  • 1
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,...
showkey's user avatar
  • 336
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 ...
progquester's user avatar
  • 1,816
0 votes
2 answers
147 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 ...
Ron537's user avatar
  • 1,006
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 ...
Nour Salman's user avatar
0 votes
0 answers
32 views

Special many to many relation in SQLAlchemy

I am trying to use sqlalchemy to model a database consisting of two classes A and B. The B class has two fields: B.a (1 to n) and B.alist (n to n). I am trying to follow the Setting Bi-Directional ...
msampaio's user avatar
  • 3,453
1 vote
2 answers
64 views

How should I paginate a SQL query where the rows have no natural ordering?

I've inherited a code base with an associated database schema. The schema has numeric, auto-incrementing primary keys. It does pagination with queries like this: WITH params AS ( SELECT id ...
Tom's user avatar
  • 8,072

15 30 50 per page
1
2 3 4 5
1608