Questions tagged [database-design]
Database design is the process of specifying the structure and thus the logical aspects of a database. The goal of database design is to make a representation of some "universe of discourse" - the types of facts, business rules and other requirements that the database is intended to model.
database-design
24,112
questions
-1
votes
0
answers
7
views
Database design for audio content streaming application
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 ...
0
votes
1
answer
11
views
How to model Student/Teacher/Class with DynamoDb?
I'm modeling a DynamoDb schema, which currently supports three main entities: Teacher, Student and Class. Class entity has these relationships:
A teacher has a class
A student enrolls to a class
My ...
-1
votes
0
answers
25
views
problem in delete function in java and mysql [closed]
error message when i press delete حذف
I have a table connected with mysql when I choose a row to delete it doesn't work
here is the code of delete
private void l2MouseClicked(java.awt.event....
-1
votes
0
answers
19
views
Designing a MongoDB Schema for Efficiently Managing and Querying Ordered Sequential Values
I have a mongoDB collection findings which contains the following documents
{
name: "finding1",
group: "group1"
},
{
name: "finding2",
group: "group1"
},...
-1
votes
1
answer
47
views
The best data-model to store nested tags? [duplicate]
I'm trying to make a breadcrumb for a ecommerce website. Something like this:
Home > Kitchen > Serving and reception > Spoon
Each of those item are a tag. So, the tags table is parent-based/...
0
votes
1
answer
45
views
What is the recommended collation for a PostgreSQL unique e-mail column?
Most places recommend for unique e-mail indexes using either a lower(email) index, or a datatype citext.
But the manual for citext suggests using a collation for all cases instead of citext now:
...
1
vote
0
answers
43
views
Postgresql SELECT optimisation into Django ORM [closed]
Please see below a PostgreSQL SELECT statement. This presently returns around 300k rows, which is the grouped result of several million underlying rows. The dataset is only going to get larger. Using ...
0
votes
0
answers
24
views
Error: The server does not support SSL connections when running drizzle-kit studio
import { migrate } from "drizzle-orm/postgres-js/migrator";
import { drizzle } from "drizzle-orm/postgres-js";
import postgres from "postgres";
import { env } from "....
-1
votes
2
answers
64
views
Count on LEFT JOIN in SQL
I would like to know how can I get Count on LEFT JOIN in SQL.
Currently I have 3 tables :
rooms_messages
id
room_id
discussion_message_id
created_at
1
10
101
2024-07-16 12:30:45
2
20
102
2024-07-16 ...
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 ...
0
votes
0
answers
10
views
In a social media relational database schema, should I use separate tables for posts likes and comments likes?
I have a social media app with users, posts, and comments, in which users can like posts and comments.
Is it best practice to use the same table to store the likes of both, such as:
user_id
post_id
...
1
vote
1
answer
36
views
Why is read repair not sufficient in making dynamo-style database linearizable?
I am reading DDIA. It says "possible to make Dynamo-style quorums linearizable at the cost of reduced performance: a reader must perform read repair (see “Read repair and antientropy” on page 178)...
-3
votes
0
answers
43
views
How to restructure a schema in order to support conditional (one of two tables) relations
I've been stuck on this for a while now so I decided to ask for some help.
My SetTemplate needs to EITHER be connected directly to exerciseTemplate OR connected to exerciseTemplate through a ...
0
votes
0
answers
25
views
Utilizing json if/then to require a parameter if not specified?
So, I've got a json that has a handful of initial values, but as a user story I need to allow adjustments per point/object rather than at the top.
{"properties":{
"p1":{},
&...
0
votes
0
answers
22
views
Database Architecture Advice for a complete newbie
I've used databases at a basic user level for a decade, but have never really thought about structure and i'm looking for some advice.
I have a list of contacts that are currently in an excel file ...