People who code: we want your input. Take the Survey

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.

Filter by
Sorted by
Tagged with
-4
votes
0answers
21 views

Which Database is better for application like Gmail? [closed]

I have couple of questions: Which Database is better for Gmail Like Applications SQL or NoSQL? For Drive like Storage I m thinking of using mega.nz in the backend! For Authentication which one is ...
-1
votes
2answers
56 views

Database Structure for The Best Efficiency

I want a database table that can hold all of the group chat messages from all of the group chats. The max amount of users per group chat would be 20. The max amount of group chats per user would 25-...
-1
votes
1answer
39 views

Design pattern to sync local databases with the cloud [closed]

I would like to find the best way to solve the following problem: I need a database for a software. The software needs to use the data to populate the UI and allow the user to interact with them (edit,...
0
votes
0answers
13 views

Abstracting resource permissions in noSQL

I'm building a booking system and my team is currently constructing a web application for the system where a staff member should be able to manage all the bookings related to a user with permission to ...
0
votes
0answers
13 views

Storing common data across tenants in NoSQL databases like mongoDB

We are designing a multi-tenant architecture. In our multi-tenant architecture, there are different email templates that are shared across all the tenants. Email template looks like subject: {...
0
votes
2answers
53 views

Extend the ApplicationUser class or use a Person class?

I am making a web system using Asp.Net Core with individual user accounts (Identity), and I was thinking about how I should store the users' personal information in the database. The system will have ...
1
vote
3answers
89 views

How do I make sure a task run only once in a dockerized environment?

I have a task that I need to make sure it only runs once in my dockerized environment (managed by k8s), running the post-upgrade script is one example. Because each dockerized app can run the task and ...
1
vote
1answer
54 views

Feature Store Design for input data like JSON, CSV and Excel

I need a design approach for a feature store which accepts input data in the forms of CSV, EXCEL, JSON etc. The backend stack we support is Java, Spring boot and oracle DB. Note : Each file ...
0
votes
1answer
26 views

Database schema for two different types of elements on map

I wrote a software for a customer that shows clients on a map (Google Maps). I store the clients on a table on the MySQL database (table clients) and show them on the map using markers. Each clients ...
1
vote
0answers
24 views

Looking for the right design (pattern?) for my webapp and external APIs intgerations

I'm working on a simple CRM (Customer Relationship Management) webapp (Flask and Peewee ORM) and I found myself in a situation where I believe that I should have used a design pattern that I may not ...
2
votes
0answers
22 views

Populating form options in dynamic web form

I am looking for advice on database design for a web app I am building. In the web app (Angular, REST API, Oracle SQL database), I am constructing a web form dynamically. I chose dynamic form ...
0
votes
1answer
38 views

Displaying various subsets of content stored in a database

I am looking for advice on database design for a web app I am building. Part of the website needs to display content from a SQL database dynamically depending on the component's context. To be more ...
3
votes
3answers
181 views

What benefit does a junction table provide over adding an additional field with a foreign key?

Consider this simple example: We have the apartments table below: ID Address 0 555 Maple St 1 123 Oak St 2 999 Pine St We also have the tenants table below: ID Name 0 Bob Foo 1 Jane Bar If I ...
0
votes
2answers
71 views

Saving & Referencing different Schema Types in MongoDB (e.g. for a CMS with Building Blocks)

Say I wanted to build my own CMS system and store data in MongoDB. I would like to have a Collection called BlogArticle. Each article can have a different structure, but will be put together by the ...
0
votes
1answer
28 views

How do I store reported comments/photos in firestore?

I want to learn firestore and to this end I created small project which replicates instagram. Not all functionalities of course, just the very basics - photo sharing, comments and the possibility to ...
-1
votes
1answer
57 views

How to represent EITHER in UML Diagram [closed]

I am working on a small project and I tried to represent the following two requirements in my diagram: An album may be performed by either a singer or a band (not both). My plan to implement this ...
-2
votes
2answers
67 views

How to best manage multilingual information in documents in JSON/MongoDB/Mongoose?

I have to manage multilingual information in JSON documents in a MongoDB/Mongoose context. But I'm in a dilemma regarding best the format to use with a view to performance metrics: I'm currently ...
1
vote
1answer
65 views

When to partition a database

I am reading up on system design concepts, specifically DataBase replication and partitioning. I understand that partitioning is used to improve throughput, and/or when the amount of data is high i.e. ...
1
vote
1answer
55 views

How to draw an aggregation relationship in the Crow's Foot Notation?

I was stuck on a relation description and unable to model it in the Crow's Foot Notation: Each individual vehicle is a particular model of a particular brand offered by the company (e.g., the XF is a ...
1
vote
2answers
109 views

How to manage primary keys in CQRS

I'm building a backend following the CQRS pattern and I don't know how to manage properly the primary keys (surrogate keys) between the command and query databases. For example: I have a model with ...
0
votes
0answers
21 views

Maintain different versions of the same entity for different locations. Find a standard approach for this

I'm designing an enterprise application (SQL + REST API + Web UI) and I'm trying to find some standard approach for the following problem: Definition: I have a company with multiple locations. I also ...
0
votes
1answer
55 views

Database normalization for grade management system

I am working on a grade management system web app for a university and I came up with this database schema How the app work: In the user table I am going to keep all the users data and the ...
0
votes
1answer
46 views

What would the database schema look like for a Entity Component System architecture of web app?

I found previous SE questions like this. I'm familiar with the typical RDBMS backed MVC web app framework. To illustrate what I am thinking of, let's use the examples of Bunny and Carrot from this [...
0
votes
0answers
25 views

How to create a news feed (or news email) from a database with questions, answers and comments?

I have a web app where users can ask questions and get answers, ideas and comments from other users. Backend is Django Rest Framework with a Postgres Database, Frontend is React. Now I want to add ...
3
votes
2answers
223 views

Storing global variables in a database

I have several global variables that I need to store in a database. These variables rarely change, but when they do, all installed instances of the application must updated to those changes, which is ...
1
vote
1answer
123 views

What design pattern to implement notifications for a .NET application?

I have an ASP .NET web application dashboard that is used to send notifications to several .NET desktop clients. The current implementation is that the web app writes the new notification to a ...
0
votes
2answers
62 views

Best practices when designing SQL DB with “redundant” tables

I have a design dilemma for a DB I'm creating for an e-commerce platform I want to develop. I have 3 different actors interacting with the website: Customer Manager Supplier Those 3 actors have the ...
0
votes
1answer
27 views

Getting sums of multiple leveled relations efficiently

I'm currently building an API and a web app for an internal warehouse system using NET Core. I have the core entity structure, that goes like this: "Material" has many "MaterialSubtypes&...
0
votes
0answers
53 views

Redis or MongoDB in Memory

I am working on processing of documents and storing their hash in Redis to identify duplicate records and some system files. Recently we migrated to MongoDB from SQL Server as our primary database. So ...
1
vote
3answers
135 views

Better than ongoing integer and uuid as primary key

I read a lot about using ongoing numbers vs UUIDs as the primary key and had an idea how it might be possible to combine both and profit from their advantages, without their disadvantages. The table ...
-2
votes
1answer
42 views

Use 1 to many relationship on same model or split it into two different models?

I'm building a forum application using the Django web framework but I'm not sure how to design the entity relationship diagram when it comes to the Post model. Since one Post can have many replies, ...
0
votes
1answer
36 views

Safe deployment for database content

My application is deployed on several servers that all read data from a single database. Following safe deployment practices, code deployments happen first on a subset of servers and only continue to ...
0
votes
1answer
36 views

Database design: use a single “Author” associative entity related to different entities

My application deals with multiple entities (Articles, Files, Images, Documents, ...) and multiple Users (another entity). Every entity must have one or more "Author" User(s) associated to ...
-4
votes
1answer
84 views

Design a login system

I have a task of designing login system with the requirement below: If the user login over three times, lock account for the first 5 minutes. The next failed 3 times login-in will lock the user ...
1
vote
0answers
55 views

Near Real-Time Data Aggregation using Complex Queries

We are working on a multi-tenant SaaS product that has a ledger of all tenant customer transactions, which we use to track invoice states on a line-item level. This particular application will result ...
1
vote
0answers
23 views

Best way to store webshop item data as a snapshot when an order is created

I'm designing the architecture of my application and I'm running into an issue. For the webshop every Order entity has a relationship with a Store and many StoreItem's. This allows for quick fetching ...
2
votes
2answers
146 views

How should I structure my database entities with invites and recipients for e-signing web app?

I am interested in implementing the following requirements for my e-signature web application. A user can create a new signing contract. That contract can include multiple users to sign. The contract ...
2
votes
1answer
106 views

Best notation to store/read/compute complex relationships

I have created an application in which users and tasks can be entered. A task should be be assigned to one or more users. If more users can do a task, the task should be assigned in such a way that it ...
15
votes
4answers
3k views

Should entities contain information about their amount?

Can I get some thoughts on the entity design? Let's say I have an entity called Book. Let's say I create a specific instance of that book. It has a title A and an author B. Since there can be multiple ...
0
votes
1answer
90 views

Database design to model companies and many roles

I am building an application for employee management. To start discussion, I have 3 roles: admin, manager and employee admin does everything manager owns a company and manages its employees. ...
0
votes
1answer
53 views

Pipeline's outputted data mirroring pipeline's architecture

I'm building a pipeline that scrapes data on entities, to keep things generic, let's call them Widgets. Data on Widgets is currently unorganized and spread across various sources, including source ...
-1
votes
1answer
45 views

Solution design leveraging Graph and Relational database types

Is it viable to leverage both a graph db and a relational db at the same time for the same data sets? Does it even make sense to approach the solution this way? Thinking is i use nodes and ...
-1
votes
1answer
117 views

As a client; how to present database needs to perspective designers?

[I am preparing to solicit proposals for database/project management software design. I know that the quality of the final product will depend on how clearly and completely I can organize and explain ...
0
votes
0answers
33 views

Design the database of tasks that are heavily dependent on each of them

I have no idea how to structure this use case... Basically the requirement is that we want to handle tasks. Let's say we have a class Task with the following fields and functions: PlannedStartDate of ...
0
votes
0answers
27 views

MongoDB schema to support concurrent update on a document

We were working on a project with a 300 documents with currentValue field in a main collection, in order to track the history of each document of first collection. we created another collection named ...
0
votes
1answer
60 views

Database of big text documents many-to-many: one big relationship table, a lot of small ones, or a better way to link abstract text data?

so I am struggling a bit with a database setup. I found post with similar problems, but the reason behind the answers was not what I was looking for, hence I ask again with my specifics. I am building ...
25
votes
7answers
5k views

Why would patient management systems not assert limits for certain biometric data?

I think many people with even a small experience in designing UI/UX to handle user data will be familiar with the perils of putting in input field/database limits for personal data, such as names. ...
0
votes
0answers
24 views

One table per subtype or single table with lots of nullable fields

I'm designing a database for an application that should deal with notifications. Each notification has a sender, an arrival date and a processing status. There are three different types of ...
0
votes
0answers
23 views

Appointment Reminder System Queuing Dates? (Logic Flow Question)

I'm tasked with modifying an appointment reminder system (.NET / EF6) that currently searches a database for valid appointments tomorrow (now + 1 day) and sends a simple reminder. The system needs to ...
6
votes
3answers
273 views

Rebuilding a legacy application : What about the data model?

I am currently rebuiling from scratch a product catalogue (to feed a shopping website). The existing legacy system is heterogenous, Long story short : The some products are stored in a FileMaker ...

1
2 3 4 5
25