Skip to main content
Filter by
Sorted by
Tagged with
-1 votes
0 answers
39 views

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 ...
GY S's user avatar
  • 1
Advice
1 vote
11 replies
126 views

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 ...
red_trumpet's user avatar
-2 votes
0 answers
49 views

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 ...
Z.J's user avatar
  • 387
2 votes
2 answers
74 views

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 ...
Code's user avatar
  • 23
0 votes
0 answers
111 views

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 ...
stam's user avatar
  • 106
0 votes
1 answer
44 views

Let's have a data structured like this: users: [{ "name": "username1", "garages": [{ "name": "my one garage even though I may have several", ...
Accordeon's user avatar
0 votes
2 answers
108 views

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 ...
Abhi's user avatar
  • 13
0 votes
1 answer
201 views

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
  • 375
0 votes
0 answers
82 views

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 ...
Fazry Javier's user avatar
1 vote
1 answer
103 views

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 ...
Joey Yi Zhao's user avatar
  • 43.3k
-1 votes
2 answers
104 views

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 ...
maran's user avatar
  • 1
-2 votes
1 answer
76 views

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, ...
Rbn's user avatar
  • 21
2 votes
1 answer
51 views

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 ...
paipai's user avatar
  • 29
1 vote
2 answers
79 views

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> ...
2474101468's user avatar
2 votes
1 answer
62 views

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 ...
ihsan arslan's user avatar
0 votes
1 answer
181 views

I am having issues when trying to rename a column and modify the datatype. I can do it separately, but when I try to put them together it can't find either 'Year' or 'ReleaseYear'. It doesn't matter ...
Jeff's user avatar
  • 103
-1 votes
1 answer
83 views

I am attempting to create a relational database to model fight sports information--contests between two opponents, each with three judges and a referee. I have tables that store information on each ...
lucasCage's user avatar
-1 votes
1 answer
80 views

How do I get unprocessed rows that have no association in Processed_Table with the least number of queries (SQLite 3)? Nested queries will work fine. Main_Table columns: Id Processed_Table columns: ...
Pankaj's user avatar
  • 81
0 votes
1 answer
69 views

I have a database for animal rescues which has a medication section. I'd like to have the stock automatically deduct when it is used. The challenge is the opened bottles. For something like an ...
Dan Lindley's user avatar
0 votes
1 answer
57 views

I want to create model Serializers and all the necessary code. I want to solve a Coursera project assesment of API course. Error: django.db.utils.IntegrityError: NOT NULL constraint failed: ...
Rony Ahmmod's user avatar
0 votes
0 answers
119 views

Given a relation schema, R = {A, B, C, D, E, F, G, H, I, J, K, L, M, N, O} with functional dependencies: FD1: {A,B} -> {C,D} FD2: {E} -> {F,G,J,K} FD3: {F, G, I, K, M} -> {H} FD4: {K} -> {...
Hmmmmm's user avatar
  • 109
1 vote
0 answers
87 views

Context: I work for a company that stores and analyzes data from inertial measuring units (IMU). My teammates and I are considering creating and maintaining a DB for all the data we gather for ...
PileOfBirds's user avatar
0 votes
1 answer
55 views

Let there be 3 tables: A, B, C. A row in A may be associated to a row in B, or it may be associated to a row in C, but it must not be associated to both B and C. In other words, the association is an ...
Ivan Rubinson's user avatar
1 vote
0 answers
48 views

I'm new to the Kotlin world and I've been trying to figure out what would be the best way to represent the data fetched from 3 different tables in the database (2 out of 3 at a time), ideally as an ...
ConfusedUser's user avatar
1 vote
2 answers
94 views

Assuming the schema R(A,B,C,D,E) with the functional depencies AB -> ABCDE (AB is the superkey) and C -> B (B is a part of the key AB, so the schema is in 3NF for all dependencies). What does it ...
Marvin Mar's user avatar
1 vote
0 answers
51 views

Develop a utility that takes any JSON input and converts it into a flattened tabular format with rows and columns. The utility should handle nested arrays and objects, transforming them into a ...
 Shanu's user avatar
  • 21
-1 votes
1 answer
63 views

I often add in a falsey predicate for convenience in debugging, like this: SELECT ... WHERE 1=1 AND/OR predicate1 AND/OR predicate2 ...etc This way I can comment out one or more lines and ...
David542's user avatar
  • 112k
0 votes
1 answer
49 views

I have a posts table and users table. And posts table has a column for author_id (foreign key). This is clearly an example of a One-To-Many relationship. I want to get all posts written by a specific ...
Omar Ahmed's user avatar
0 votes
1 answer
44 views

I was wondering whether the following would be either one-to-many or many-to-many relationship The Users and Services tables are defined as follows: USERS SERVICES +---+------------+...
Rekwass's user avatar
  • 19
0 votes
1 answer
71 views

I'm trying to optimize the following query for a school assignment: SELECT DATE(b.book_date), SUM(b.total_amount) revenue, COUNT(DISTINCT(t.passenger_id)) count_passengers FROM bookings b ...
Finamore00's user avatar
0 votes
1 answer
91 views

I'm having a Request table (EF generated): public class Request { public int Id { get; set; } public string Name {get; set; } public virtual ICollection<AttendeeRequest> ...
dezox's user avatar
  • 309
-1 votes
1 answer
63 views

I want to represent plants in a database along with their genus/species. This was the schema that came to mind: CREATE TABLE genuses ( id INTEGER PRIMARY KEY, name TEXT UNIQUE NOT NULL); ...
axblount's user avatar
  • 2,659
2 votes
3 answers
350 views

I have a huge table (kind of audit log) with these columns: ID, TS, DATA ID is the primary key, and it is a number from a sequence. TS is a timestamp and it is the current timestamp of the insert. ...
riskop's user avatar
  • 1,839
0 votes
0 answers
38 views

I am developing a multi-tenant application that manages information about suppliers and clients, using Entity Framework for user logins and roles. Suppliers provide products to clients, and clients ...
Shmiel's user avatar
  • 1,277
1 vote
2 answers
81 views

I am working on a Java application using Spring Boot, and I have a UserEntity class where users can follow each other. However, when two users follow each other, I encounter a java.lang....
ssvt's user avatar
  • 31
0 votes
1 answer
50 views

Using Hibernate, I have bi-directional association between person/address. Person entity can have too many addresses and I want to add and remove to address collection without loading entire ...
Apoorva Manjunath's user avatar
-4 votes
2 answers
140 views

In SQL, given tables T and S that have the same schema, say, CREATE TABLE "T" ("ID" INTEGER, "Salary" REAL); CREATE TABLE "S" ("ID" INTEGER, "...
Ardy's user avatar
  • 15
0 votes
1 answer
107 views

I work at a small company that buys inventory and resells either the raw inventory or packages it up into bundles for resale. We have an in-house software and are redoing our data model for an ...
Kelsey Butler's user avatar
0 votes
0 answers
31 views

Some employees at my company want an internal tool with a way to approve new purchases before we expense them to the proposed departments. So someone will submit a purchase order for approval, and ...
bradenjoshua's user avatar
0 votes
0 answers
65 views

I have to design a table in a data warehouse to store event like 'box access'. The source system works as follows: An access event is registered by an employee, creating a new record with a unique ...
sebastian's user avatar
0 votes
0 answers
42 views

Assume I have the following tables: Article (id[PK], home, category, userId[FK], locationId[FK]) User (id[PK], name) Location (id[PK], address, name) Now I want to create a new ArticleArchive, that ...
Dorki's user avatar
  • 1,199
1 vote
0 answers
62 views

I'm working on my college project from Relational Databases subject. I'm using Linux. At college we are using Oracle databases. I'm facing problem: "the network adapter could not establish the ...
Łukasz's user avatar
  • 11
0 votes
0 answers
31 views

Given 2 tables: transactions and categories. Transactions contains a FK category_id with the ID of assigned category. I want to not allow delete categories referenced by transactions. I mean: if there ...
UrbanoJVR's user avatar
  • 1,347
1 vote
1 answer
157 views

My application handles many-to-one relationships between packages and documents. A package contains multiple documents. They are currently stored in PostgreSQL database using tables package and ...
Mike Kantor's user avatar
  • 1,474
0 votes
1 answer
65 views

I'm struggling with a dependency cycle in my SQL database schema for a system with update approvals. Here's the situation: I have tables for documents , transactions, payment_methods, and ...
user24349290's user avatar
0 votes
0 answers
33 views

In a project of mine, I want to create a calendar where a teacher can create appointments for his/her free time and then students can book an appointment with the teacher to teach him/her. This is how ...
Bryar Laiq's user avatar
0 votes
1 answer
50 views

An employee can work in multiple offices. Please evaluate this expression as applied to this ER diagram. It seems wrong to me. The relationship between Office and Company is one-to-many. This implies ...
Sergei Gorgun's user avatar
0 votes
0 answers
138 views

I am looking to create a MySQL database which stores information which is coming from a google form. I was thinking of having the google form results stored in google sheets and then using JDBC to ...
Max Gadebusch's user avatar
0 votes
1 answer
40 views

I have an Order model in my Laravel application, the Order model can have many Order items. public function items() { return $this->hasMany(OrderItem::class); } My Order Item model relates to ...
Udders's user avatar
  • 7,048
0 votes
1 answer
299 views

Are there any pre-existing libraries that help with handling relational data with react query? For example, say I have a backend model called 'Person' type Person = { id: string; age: number; ...
Isonlaxman's user avatar

1
2 3 4 5
137