Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

-2 votes
0 answers
25 views

Database design for audio content streaming application [closed]

I have this task to design a database schema for a simple audio content streaming application, and I have questions about what would be the best way to store relations between tracks and playlists. I ...
invaders7vn's user avatar
0 votes
1 answer
36 views

Why is PostgreSQL sorting a seemingly already sorted result set?

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
1 vote
2 answers
60 views

Getting java.lang.StackOverflowError when two users follow each other

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
  • 21
0 votes
1 answer
32 views

Remove a entry from hibernate collection without fetching entire collection

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
0 votes
0 answers
23 views

Create a snapshot table of other tables that have nested FK

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,171
1 vote
0 answers
34 views

DataGrip problem with connection on Linux

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
20 views

Optimizing Location-Based Data Analysis System Schema in PostgreSQL

Preface: I am developing an analytics application designed for businesses operating across different geographical locations. This application allows users to analyze data based on their associated ...
vikrant verma's user avatar
0 votes
0 answers
23 views

Proper database design when 1 entity can belong to 2 possible others

I am making a database design for a questionnaire type application that allows admins to build a form up and create questions of different types. As basic form can consist of many sections, sections ...
MCF's user avatar
  • 21
0 votes
1 answer
35 views

Dependency Cycle in Database with Update Approvals

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
1 answer
38 views

Is the statement correct with respect to the circuit depicted in the ER diagram?

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
1 answer
32 views

Django - Create a model that holds aggregated Foreign Key values

I have a Django Model defined as a ServiceEvent, and another defined as Part. class ServiceEvent(Model): date = DateTimeField(null=False, blank=False, db_column='date', ...
JaredRathbun's user avatar
0 votes
1 answer
50 views

How to write query for a condition on join table

I am trying to write a query using Rails ORM. Suppose there are two models. class College has_many :students class Student belongs_to :college The Student table has a column named result which can ...
Ravi's user avatar
  • 31
0 votes
2 answers
74 views

Constrain Data Based on Implicit Relationships in Entity Framework Core

I have generalized the problem as outlined by the Data Model and Data. My generalization only keeps the relationships in tact. The Problem We have a base model Owner, which captures the Pet for the ...
Mark Davich's user avatar
0 votes
1 answer
88 views

How to formulate "at most" in domain relational calculus

How do I formulate "at most" in domain relational calculus? Example queries: Dish: dish_id, name Have: dish_id, ing_id Ingredient: ing_id, name What are the names of ingredients included in ...
user5653890's user avatar
0 votes
0 answers
33 views

flask-sqlalchemy multiple relationship between two tables

I have 3 user type in my flask application Admin Agent Customer The idea is to store all necessary information of a user in User table and build relationship in another table with extra fields like ...
mr-teslaa's user avatar

15 30 50 per page
1
2 3 4 5
164