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.

94 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
1answer
253 views

How to set up a sql database to cater for user records, group records and default records?

Outline I have an application that loads data from a database. I'm not talking about client data here though, I'm talking about application configuration. The database will therefore come with some ...
4
votes
0answers
495 views

Expiring counters in Cassandra

So I know that TTL is not available for counters because of design reasons and I've read https://issues.apache.org/jira/browse/CASSANDRA-2103 as well as some other SO questions regarding this but ...
4
votes
2answers
648 views

Best way to structure many-to-one allocation of users to projects in NoSQL

I apologise if this is a bit of a stupid or broad question, but I'd like some general feedback please! Say I have this DB structure for users (in Mongo/JS, but really it's all pseudocode- and the IDs ...
4
votes
0answers
521 views

What's the canonical way to store translations of user data?

I've developed some software that allows my users to attach a blurb to some non-language specific information: Pseudocode model: item(): ID creationdate byline //Only one byline for the object ...
4
votes
1answer
1k views

How should I store usernames and passwords for user login using php/cassandra?

I am new to NOSQL and Cassandra. I am not sure if I should store usernames and password in Cassandra. If I should, what is the best way to do that? I am getting lots of conflicting ideas from research....
3
votes
1answer
138 views

Integration database on micro-services

I need some wisdom on this. Currently I'm learning about micro-services architecture, and so I decided to make a simple project in a micro-services architecture. The project I'm building is just a ...
3
votes
1answer
143 views

Design question on synchronization of two asynchronous data streams

I have two async streams suppose- Trip : {tripId, date, city} Bill : {billId, tripId, date, amount}. I need to design a system to get real time aggregated view of following nature: City, TripCount, ...
3
votes
0answers
33 views

How Best To Store Data Structures Around Flow

I'm working on building a simulator for HVAC units. The conceptual model I am working with is basically that an HVAC unit has inputs and outputs, and I need to be able to calculate the outputs for a ...
3
votes
0answers
42 views

Designing provisioning strategies

I'm trying to redesign a provisioning application that administrates other application through their REST API. The application is quite simple, we have groups, we have users and roles and we have a ...
3
votes
0answers
1k views

NoSQL data modelling for multi level nested documents

What kind of NoSql data modelling is best suitable for the following requirement? This can be visualised (NoSQL-Document) as a Collection of Records where each Record contains nested Documents.The ...
3
votes
1answer
211 views

Designing database job monitoring

I have several Oracle database where my in-house applications are running. Those applications use both dba_jobs and dba_scheduler_jobs. I want to write monitoring function: check_my_jobs which will ...
3
votes
0answers
318 views

Graph Database, Storing Transactions

I'm working on getting a handle on Graph Databases (using Neo4j) and am trying to wrap my head around where "the line" is between what makes a good fit for GraphDBs and what should be strictly RDBMSs. ...
3
votes
0answers
759 views

Designing a database for storing external API results

I have hard time wrapping my head around and finding a solution on how to design a working database structure for this situation: We have a system that should collect data from Google Analytics & ...
3
votes
0answers
224 views

Saving tabular, spreadsheet-like data in a relational database?

I'm hoping this question isn't too broad or too prone to opinionated answers, since I could really use some pointers. I'm trying to come up with a way to persist tabular, spreadsheet-like1, data in a ...
3
votes
0answers
503 views

PHP Vertical Columns from 3 SQL Tables

I work at a high needs school in which there are several classes that plan their work through Excel spread sheets grading and tracking student progress. We have come to the conclusion that this ...
3
votes
0answers
332 views

Best approach for displaying a price from a product according the “setup”? [Designing the DB table and relations]

I'm basically building a reseller website, in which people can buy (users) from a predefined product list and sell them at a higher price (clients). I will show you some images to explain better ...
3
votes
0answers
694 views

Redmine - Database Structure/Normalization

I am using redmine for project management and issue tracking. I was looking at the database tables and the underlying structure and was wondering if anyone who is experienced with database ...
2
votes
0answers
35 views

DataBase design generated by hibernate Many to Many for MariaDB

Hi I am in middle of designing DB and Got a little bit confused about DB Design. I am Using Hibernate as ORM Tool ahd mapping between Page and Step entity in hibernate. @ManyToMany(fetch = FetchType....
2
votes
0answers
346 views

Logging Database Changes

What is the proper way of storing a changelog, similar to git, for data in a database. Currently, I have it set up so that every line in a table is given a unique string id that is used to determine ...
2
votes
0answers
541 views

Is this a good implementation of mongodb for a money management tool?

I have a money management tool which has users. Each user may have several accounts/funds (e.g. bank account). For each account/fund there may be thousands of transactions. Users may only view their ...
1
vote
0answers
24 views

Partial database synchronisation across multiple databases

Currently we are looking for a solution to sync databases across multiple locations. We a location hierarchy such as Country -> State -> District -> Center. To increase speed and reliability of the ...
1
vote
2answers
95 views

Separate database in microservice architecture

I'm trying to create project siteWeb and mobile app with clean Architecture and Microservices. create identity service with separate database A and make another api service with other database B. for ...
1
vote
0answers
78 views

How to minimize errors between teams working on a shared code base

Imagine there are two solutions that each have their model, and data layer separately, and are developed separately on different git repositories, but they both are using the same database. Now, team ...
1
vote
1answer
103 views

Optimizing inserting/storing Large amount of data in database

We have a POST API that takes data from the Client and send it to different applications (Payment, Email, SMS). We also store all the data sent by the Client in a database for future analytics ...
1
vote
0answers
62 views

Practice for modeling class - multiple container relationship

I have a class that could: Have multiple types of containers Have multiple types of implementations and what I did to model so far is: public interface ChildClass { Container getContainer(); ...
1
vote
0answers
121 views

How to store relational data belonging to different client customers?

My users will be businesses with a small number of accounts each: e.g. Business #1 with 3 users, Business #2 with 5 users, etc. I am trying to determine the best way to organise the relation (on ...
1
vote
0answers
94 views

Strategies for dealing with Stale data and Fetching

I'm working with firestore and have encountered several situations where a document will contain stale data which is a duplicate of the source of truth located elsewhere in the database. For ...
1
vote
0answers
38 views

Test Results Database Design

I am trying to write a database to store test results for components, against a serial number, with different components potentially having different tests. I want to prioritise ease of adding new ...
1
vote
1answer
219 views

Regarding data modelling in a NoSQL use case

I am reading the following link to learn about system designs of various systems. https://www.educative.io/collection/page/5668639101419520/5649050225344512/5673385510043648 (This is a paid link, I am ...
1
vote
1answer
176 views

How to organize users data in NoSQL database for a user invite feature (even before a user sign up)?

I am doing a collaborative note editing app which uses a NoSQL database (Firebase) in server side. Each user can sign up using their phone number or email. Currently, the user object has only four ...
1
vote
0answers
230 views

Polling Postgres DB architecture

We are using Spring Integration DB polling which polls a table every second and executes some logic based on result. My questions are: What are some good practices we can implement to account for DB ...
1
vote
0answers
1k views

Database design for a subscription service transactions

I need to create a table or a set of tables that needs to house transactional data of a subscription-based service, so that certain metrics can be queried efficiently paired with necessary post-...
1
vote
0answers
37 views

Which is suitable fragmentation style for Distributed DBMS architecture with Micro-service oriented application?

I am new to Distributed DB design. In my current application ,I am having multiple functionalities which shares the some common tables from DB. All these functionalities will be build in spring, ...
1
vote
0answers
68 views

Design a “family relationship” in MongoDB

I have a members collection in MongoDB database where each document looks like this: { "_id" : "8801", "name" : "John Doe" } I need to store family relationships between members. That ...
1
vote
0answers
235 views

SVOT and SSOT to Single Source of Version of the Truth (SSOVOT)

Having a Liquibase changelist (containing create table/column, alter table/column) I create a inmemory-database to create Hibernate entity-classes out of this inmemory-database. But the main task of ...
1
vote
0answers
47 views

Using fixtures to maintain static database assets

I have a pattern that's something like this: Create a database model UsagePlan which stores how many usage tokens a paid customer receives in exchange for its respective monthly fee. Through my ORM (...
1
vote
0answers
683 views

DB design for a scheduling system

I am currently designing a system to support our employee staffing process. I collect weekly preferences from employees, and feed that into a system for staffing. Availabilities can be defined as ...
1
vote
0answers
86 views

Is a topological sort required here?

Say you are writing an ORM like entity framework. You write basic POCO, and then let entity framework do the job of creating equivalent structures in the database according to those objects. This ...
1
vote
0answers
37 views

Database Constraint from another table column

Let's consider the following objects : Article which can be of different types Equipment which point to an Article, some fields on equipment are only used for some types. I want to add constraint ...
1
vote
0answers
60 views

Hierarchical data structure: pull requests + pull request reviews + pull request review comments

GitHub has: pull requests pull request reviews pull request review comments BitBucket has only: pull requests pull request comments So there are three kinds of objects. I write code ...
1
vote
0answers
42 views

Creating a new table referencing older one vs just creating a column

I'me developing an iOS chat application and working on the db design for the contacts feature. There are 2 kinds of contacts- Unsaved Contacts - Contacts with who you've conversed with, but not saved ...
1
vote
0answers
32 views

Offsetting high usage in a multi-tenant database environment?

I'm writing a research essay over distributed cloud-based systems, and one of the topics that I'm trying to touch on is potential solutions to high database utilization in a single-database multi-...
1
vote
0answers
209 views

Data Store Design for NxN Data Aggregation

I am trying to come up with a theoretical solution to an NxN problem for data aggregation and storage. As an example I have a huge amount of data that comes in via a stream. The stream sends the data ...
1
vote
0answers
877 views

the right way to generate my Django model/db_table

I went through the Django tutorial with in mind to go through it again using it to set up my small app. So now I am making a simple app where users can search a large set of strings and get a subset ...
1
vote
0answers
63 views

Database data Bucketing Report Design

Here's the scenario: I have item x (item_id, customer_number, cost) which can be submitted to another system multiple times over months which may or may not reject item x before finally accepting it ...
1
vote
0answers
86 views

Extending database model of ORM in subproject

I have a maven project which contains some entities which are stored in a database. The purpose of this project is to manage personal information, users, locations, etc. This project can work on its ...
1
vote
0answers
40 views

how to reduce or stop duplication of relation's entry in treeview

I want to create tree-view for display or show family member's relation. For this I created 3 tables i.e following. familyDetails->[f_id,fname,lname] relations -> [r_id,relation] .....//e.g ...
1
vote
0answers
399 views

Large invoice database structure and rendering

Our client has a MS SQL database that has 1 million customer invoice records in it. Using the database, our client wants its customers to be able to log into a frontend web site and then be able to ...
1
vote
1answer
277 views

Best way to model pricelist per customer for products in webshop

I am making a b2b-webshop system that will have multiple customers. Each customer will have a separate active pricelist which contains the products that they can buy and the prices that applies for ...
0
votes
0answers
31 views

How to seperate user data in database models?

I am writing a webservice for research and learning purposes and try to find an approach to seperate user data from other users to ensure a request can never deliver or reveal data from another user. ...