Skip to main content

Questions tagged [database-design]

For questions about structuring the data within a database. How to lay out tables, whether to use a relational DB or not, etc.

1 vote
1 answer
624 views

Exchanging data between two Microservices

I am facing this problem and would like to review my approach to it here. A Client sends an HTTP request to Service A and is expecting an answer. Service A is connected to DB A. When it receives a ...
Solidak's user avatar
  • 167
0 votes
0 answers
142 views

How to design entities to keep up with the depth of JSON objects?

To better context see Rich Authorization Requests for OAuth2 As u can read here there are some common data field types like actions, locations etc. So I have created C# entity for EF as below: public ...
Szyszka947's user avatar
3 votes
2 answers
253 views

Preventing POST requests from being lost when database connection is lost

I am working on a project to stand up a central database to replace a current massive file-sharing/syncing system of physical log files and text configurations for the primary application I work on. ...
Benjamin McKay's user avatar
0 votes
1 answer
92 views

How to design a database wherein multiple tags(string) are to be associated with an id per user?

I have a similar situation to the user here How to design a database wherein multiple tags(string) are to be associated with an id? However I'm designing a system where each association (between ...
AncientSwordRage's user avatar
2 votes
2 answers
324 views

How to store queryable 10-100MB BLOBs?

I have read several discussions about storing BLOBs in the database vs in an object storage. What I need in addition though is a functionality for querying these BLOBs. The BLOBs will be immutable ...
Ivaylo Toskov's user avatar
-2 votes
1 answer
384 views

Ho do I implement Database per Service pattern in Kubernetes?

Assuming I wanted to implement the Database per Service pattern or one of its related patterns like Private-Tables-, Schema- or Database-server-per-service (https://microservices.io/patterns/data/...
user avatar
1 vote
0 answers
31 views

Optimised MongoDB design for access control at project/organisation level

I'm looking for the optimised approach of designing MongoDB database collections where there are three stakeholders- A User (who accesses a portal). An Organization (which can have multiple Projects)....
Shashank Agrawal's user avatar
1 vote
3 answers
246 views

Triggers and network performance

There are many questions and responses on database triggers, however I have not found any that touch on network performance specifically, in the matter of benefits (or otherwise) of triggers. I have ...
Sunil Gupta's user avatar
1 vote
2 answers
558 views

Is it a good idea to design a database based on the API response data types?

I am trying to design my database, where i have to save some response data given from an external api as a webhook. This api will return me as well “referenceId” as an identifier, which i will use ...
user avatar
1 vote
1 answer
171 views

SQL - store "like" counts as separate column or infer from a query?

Say I have a feature in a web app where users can create a post and like it. In the frontend the user should see the number of likes a post has. I could store the data two ways: 1. Option 1: A small ...
Leftover Salad's user avatar
1 vote
1 answer
89 views

Modeling properties of related entities

I have the following entity relationship. A {state: ON | OFF} => B {state: ON | OFF} => C {state: ON | OFF} So, in this case, B is a child of A, and C is a child of B. Moreover, they all share ...
salparadise's user avatar
1 vote
3 answers
499 views

How is double-spending technically prevented in traditional banking? [closed]

In contrast to bitcoin: How is double-spending technically prevented in traditional banking? Do database transactions have to conform to the ACID property in order to prevent double-spending?
Dawid's user avatar
  • 129
9 votes
4 answers
4k views

How to store a fixed length array in a database

I have a mysql database in which I have drafts, each of which contains exactly 24 players the order of which matters. I am conflicted between having a drafts table with 24 extra columns for each ...
RobbyG's user avatar
  • 101
1 vote
1 answer
256 views

Database schema advice : multiple tables with the shared columns in postgresql

Let's pretend I'm making a basic twitter clone. We could imagine our database is set up as the following: 1. Table 1 - contains user info {username, password} 2. Table 2 - contains session info {...
Leftover Salad's user avatar
1 vote
1 answer
329 views

Representing database tables as objects

I'm building an address book API, where a user can input multiple contact names, phone numbers, and addresses. My database structure would be as follows: create table user ( id int not null primary ...
tntenigma's user avatar

15 30 50 per page
1 2 3
4
5
89