Skip to main content

All Questions

0 votes
0 answers
29 views

Need to determine whether different question types for a questionnaire are many-to-many or one-to-many

We need to survey our contacts by asking them various questions and recording their responses. Some questions are standard and must be included in every survey (default questions), while others are ...
Moochcar's user avatar
-3 votes
2 answers
54 views

one-to-one mandatory attendance relationship

As shown in the diagram, there are 2 tables with a one-to-one relationship and mandatory participation. Can you help me implement this as ddl code? I could do it easily when there was no mandatory ...
Davut Boztaş's user avatar
-1 votes
0 answers
26 views

Real estate database design to save listings of different types [duplicate]

I am creating a website similar to this website. My website needs to allow users to save different kinds of listing like home, plots. offices, shops, agricultural land etc. My question is how to ...
Muhtashim Malik's user avatar
1 vote
1 answer
69 views

Merge many large tables in PostgreSQL

I have 150 tables with the same columns representing areas in a country. The size of each table is millions of rows and tens of GB in size. I want to combine all the tables into one with the aim of ...
Hermawan Wiwid's user avatar
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
36 views

Designing SQL Postgres Relations Table for Editing Entered Documents and Undo Functionality

I'm currently working on a system where users can edit entered documents in a PostgreSQL database. The functionality entails allowing users to click on a document to edit it, effectively creating a ...
skelaw's user avatar
  • 254
1 vote
1 answer
98 views

How to implement a wide multi-level self-join PostgreSQL query?

I have several rows that represent a person. Each person has a column for bio_mother _uuid and a bio_father_uuid. I used this page (I mention that because it's referenced in this similar question) to ...
Sai's user avatar
  • 198
1 vote
1 answer
75 views

Use conditional constraint or normalize table?

I have two entities: A and B. The latter has two types B1 and B2. Their relationship is: (A,B1) is (1:1) (A,B2) is (1,N) When creating database tables, I wonder how is the best way to guarantee ...
André Perez's user avatar
0 votes
1 answer
54 views

Design SQL Schema for User Interests

I'm trying to find the best approach for designing sql schema for the following scenario: -A User can have multiple interests -The platform provides predefined interests from which the user can ...
JoeK's user avatar
  • 1
0 votes
0 answers
59 views

How to assign multiple Foreign keys to one box in an sql table

I have created a database that has one table that keeps track of employee skills and another which displays projects that these employees can be assigned to. I need to have multiple employees asigned ...
user avatar
-2 votes
2 answers
56 views

How to delete only orphan child rows with ON DELETE?

I have a parent table and a child table. A parent row stores the foreign key to the child row. If I set the constraint on the foreign key to ON DELETE CASCADE then that will throw an error when I want ...
Gergely Tóth's user avatar
-1 votes
1 answer
83 views

Separate tables based on business goals

Is it worth to split tables bases solely on the business goal? NOTE: The tables all have identical columns. 1. One table One orders table, with a orderType column to differentiate them. 2. Two tables ...
Sir Rubberduck's user avatar
0 votes
0 answers
70 views

Were the entity sets and their associated relationships accurately and properly constructed?

To be considered: The bolded terms that appear across the requirement I laid out bellow are the ones included in the entity set (Vehicle) I created. I also specified the attributes nature/kind/type. ...
Paradoxac's user avatar
0 votes
1 answer
47 views

"Using index condition; Using where" explaining my query, with proper indexes?

From the manual Using index condition; Using where: By accessing index tuples and testing them initially, tables can be read while deferring the reading of full rows until it is essential. I've the ...
gremo's user avatar
  • 48.3k
0 votes
1 answer
46 views

Relational Database - How do you design SQL many to many relationship

What's the correct way to do (what I think is) a many to many association in a relational database? Consider something such as (I'm using sqllite to play around): # Store details about each teacher... ...
Matt Conway's user avatar

15 30 50 per page
1
2 3 4 5
157