6,817 questions
-1 votes
0 answers
39 views
Why 'Error in vec_assign(): Can't convert to match type' calling toRelational()? How do I fix it? [closed]
An XML file of the ORPHA codes, the coding system of rare diseases, is publicly available at the ORPHANET website as Orphanet_Nomencature_Pack_EN. I downloaded the English version and imported into R ...
Advice
1 vote
11 replies
125 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
0 answers
49 views
Best way to model optional foreign keys when only one should be set [duplicate]
I’m designing an Entity-Relationship diagram as the basis for a relational database. A timetable planner for a comprehensive school needs to decide, when creating a new lesson, whether the lesson is a ...
2 votes
2 answers
74 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
111 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
44 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
108 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
200 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
0 answers
80 views
How to use pivotData with enum column in a Filament 3 many-to-many relationship?
I have a many-to-many relationship between roles and permissions in my application. I already have the pivot table with columns role_id, permission_id, and a new column access_type with an enum that ...
1 vote
1 answer
102 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
104 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
76 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
51 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
78 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
62 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 ...