6,808 questions
Best practices
0
votes
11
replies
93
views
What to use when moving from static json files ( Javascript ) to database in FrontEnd
I was hoping to get some help with my little project where I noticed that I would need to be using Database instead of local Json files to deal with frontend dynamic content.
So I have a dropdown ...
Advice
0
votes
9
replies
129
views
Differences between SQL dialects?
I have heard of SQLite, MySQL and other dialects of SQL.
How do they differ?
Where do you use which one?
Which ones are the most used?
What is the purpose of this?
Best practices
1
vote
5
replies
91
views
Does an index on a column used in an ORDER BY clause help / improve performance in a RDBMS?
SELECT o
FROM Order o
WHERE o.customerEmail = :email AND o.status = :status
ORDER BY paymentDate DESC
So does an index on the paymentDate column help here?
Advice
1
vote
11
replies
6k
views
What exactly is a "connection trap"?
In Codd's A Relational Model of Data for Large Shared Data Banks the following paragraph seems to be one of his justifications for the relational model:
A lack of understanding of relational ...
2
votes
2
answers
124
views
Circular Dependency error in NestJS TypeORM Relations with Entity Decorator
Why do I get this circular dependency error in NestJS TypeORM Relations with Entity Decorator when setting up a OneToMany and ManyToOne relation between User and Item?
cannot access User before ...
0
votes
0
answers
158
views
How to define self-referencing relations in Python SQLModel ORM
I'm developing a FastAPI application, a file manager system, and I'm using PostgreSQL as the database. To define database entity models in my code, I previously used SQLAlchemy, but now I switched to ...
0
votes
1
answer
47
views
What HTTP status code for Patch that may create and/or delete entries from nested table [closed]
Let's have a data structured like this:
users: [{
"name": "username1",
"garages": [{
"name": "my one garage even though I may have several",
...
0
votes
2
answers
111
views
Same Table value selection from same clients
I need 1 record per Id and to achieve it I tried with self join, case statement as well tried using COALESCE function but I am still getting multiple records for same client.
Below approach is mostly ...
0
votes
1
answer
206
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,...
1
vote
1
answer
126
views
How can I update a large table slowly?
I am using PostgresSQL 15 hosted by AWS Aurora serverless v2. I have a table includes 200 millions rows and I need to update a value on a column for all those rows. This table has primary key id which ...
-1
votes
2
answers
148
views
Difference between nested transactions and savepoints
Some relational databases only support savepoints and not nested transactions directly. So, what is the difference between both? Is one superset of other?
I understand savepoints are not new ...
-2
votes
1
answer
94
views
Meaning of hashtag in a relational schema
What does the # mean when placed before an attribute in a relational database schema?
Umbrella(ID,Lido, Cost, Type)
Lido(ID, Name, #Spots, Manager)
Manager(FiscalCode, Name, Surname)
Client(#Card, ...
2
votes
1
answer
54
views
How do I format plain query to hierarchy json object?
I want to format plain query to hierarchy json to display on front-end but I don't know how
I may have relational database that has Table called "Todo" which has following column
ID
Name
...
1
vote
2
answers
139
views
In SQL, how to search for rows by binary data prefix?
For example, I want to search for all rows that starts with \x00\xff\xaa in a binary data column. I am writing this pseudo-code in C# Entity Framework:
IEnumerable<KeyValue> ...
2
votes
1
answer
88
views
Android Room: How to extract data from relational tables?
I have 2 tables as below and I have a relational table.
I want to access the details of an order. Which products were selected in the order and what is the quantity of the products. What should I ...