Questions tagged [relational-database]

A relational database is a digital database based on the relational model of data. This model organizes data into one or more tables (or "relations") of columns and rows

Filter by
Sorted by
Tagged with
0
votes
1answer
44 views

Design for multiple clients to iterate through entire database table

I need a design for multiple clients to process an entire database table, and processing each row independently and without overlap. If there are 10,000 rows and 5 clients, each client will eventually ...
0
votes
1answer
34 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 ...
1
vote
0answers
22 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
145 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 ...
0
votes
0answers
29 views

Hybrid REST and Graph Databases architecture with microservices

I've come across Graph Databases recently and I am wondering how much sense does it make to use in my scenario and I'd like some more expert advice on it. I am building microservices for an ...
0
votes
1answer
78 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. ...
-2
votes
1answer
37 views

Merge migrations from two different servers

I'm working on a project that has two separate versions of the API, v1, and v2 because they wanted to migrate from Javascript to Typescript. Both versions use the same database. Recently I'm having ...
-1
votes
2answers
65 views

How to have dependency between two different microservices?

I am implementing quora like application in which I have Post(question, answers, comments, likes/dislikes) as one microservice and User details as another microservice. I need user details in the post ...
-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 ...
0
votes
2answers
45 views

Delete filesystem data associated with database record by delete hook, or internally in service logic?

Let's have many rows in the SQL database where every record has an image property that holds the path to file in the filesystem. Many database libraries have the ability to set-up hooks that are ...
-1
votes
1answer
115 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
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 ...
-1
votes
4answers
266 views

How to avoid the accident that an item price is updated right after a user clicks purchase?

This is not a real scenario. This is just my assumption that such an accident may happen if the the following events really occur in this chronological order First, a user clicked "puchase" ...
1
vote
1answer
46 views

Synchronizing Multiple Local SQL databases with Server

I'm trying to understand what general mechanisms and/or concepts are available in SQL database last to synchronize local. Here are my inputs and requirements. Multiple clients have a full copy of the ...
3
votes
1answer
57 views

Reorderable parent/children hierarchy in a relational database

I'm struggling on a design question for my Ruby on Rails website. I'm working on an estimation tool for construction companies for renovation projects. It orders items this way by default: Room (ex: ...
0
votes
0answers
52 views

What is the best practice for hierarchical container - item relationship in a SQL database?

I am in the process of designing a database organizing real world items in different storage locations. One main principle is that items can contain other items. So the relevant table is: An "...
0
votes
0answers
55 views

Should I use Odata with non-relational database?

I'm working on a project where I need to expose Odata endpoints to the clients, and we are using CosmosDB for our database. Most of the documents I found on implementing Odata with Cosmos DB actually ...
1
vote
2answers
136 views

Database Design: Storing price date wise, or date range wise?

I must store prices for various items on multiple dates. The table schema would look like this: CREATE TABLE date_wise_price ( item_code varchar, date date, price numeric(19,4) ) An ...
0
votes
1answer
37 views

eCommerce data modeling - is it common to duplicate product properties in line items?

Suppose I have the following entities in a commerce data model: BaseProduct (PK id, price, name) LineItem (PK id, FK product_id, price, name) Order (PK id, line_items) An Order includes one or many ...
0
votes
1answer
233 views

Is it ok to have 3 foreign keys in a table from one only table?

So... Le's say I have 3 tables named: Member Bus AutorizeMember ID Member is referenced to Bus and ID Bus is referenced to AutorizeMember which is also referenced to Member 3 times. Thats is because ...
0
votes
1answer
125 views

Does it make sense to have redundant DB fields to improve query performance, programming speed and code readability?

I am a bit torn about the database design for a solution. I have the following structure: (only the relevant fields are marked with #) +------------------+ | activities | |------------------| | ...
0
votes
0answers
94 views

Database Design for Form Builder

Hi guys I'm trying to create Form builder in my app for different Events that have happened and publish them, so the users can fill them out. Little About Logic: Forms are created per different Event ...
1
vote
2answers
100 views

How should I design a database where each user can have ten lists with thousands of possible entries?

I am trying to design a database where each user can save up to ten lists of cards. Each list could theoretically have tens of thousands of items, but will likely only have hundreds. Should I create a ...
0
votes
0answers
48 views

DataBase Design for frequent delete operations

We have a use case wherein we want to store incoming data and invalidate all the previously existing data pertaining to one parent entity. ie Parent p1 --> has List< child> old_data ( already ...
5
votes
2answers
250 views

When to consider reference tables?

When thinking of an application. Let us say an applications user details. Let us say the application allows a user to easily edit their profile. For a field like gender, which in most cases will be ...
-2
votes
1answer
129 views

Extensible hierarchical database design

This question is an extension to the question here (and follows the same hierarchy) - Multiple intersection tables vs multiple joins based on this answer - https://softwareengineering.stackexchange....
1
vote
1answer
65 views

Multiple intersection tables vs multiple joins

I have a hierarchical relationship between my tables, with the children having foreign keys referring back to their parent ids (assuming id is the primary key for each table): Department has many ...
-2
votes
2answers
92 views

Select from many-to-many in one query

A common issue I run into when building CRUD applications is how to retrieve many-to-many relationships from the database and put them into an object model. Say, for example, I have the following data ...
-3
votes
1answer
43 views

Tracking Graph edges changes history

i have a graph and transactions which change the relationship between the graph nodes and i need to keep tracking of this changes over time. Kinde of queries i need to execute: I want to see the ...
2
votes
1answer
55 views

Elasticsearch and RDMBS combination

I read both this thread Elasticsearch and PostgreSQL combination and this one Elasticsearch and relational database combination, but I could not come to an answer. Let's say I have to re-create a ...
0
votes
1answer
137 views

How do you name “*_statuses” for multipe tables so that there'll be some pattern in the names of the statuses?

I have the following entities in database that have a corresponding table "entityN_statuses" associated with each of them: * products * refunds * payments * users * etc... The &...
0
votes
1answer
111 views

What kind of Relations should I have in my E/R Diagram

I am trying to create an Entity/Relationship Chen Diagram for a new APP. Scope is simple enough. I will have multiples types of users login through the same Login Form. What I decided to do... Is ...
1
vote
1answer
85 views

When keeping all state in an SQL DB, how to handle one-off variables?

I noticed this pattern in my programs: I'm building a system, like the one I'm building for my local hackerspace right now. It's using database as its "brain" - a scraper as a separate ...
1
vote
2answers
261 views

Differences between NULL and zero-length in database

My project uses Microsoft SQL Server Express 2019 as data-engine and potentially will be migrated to other data-engine. The database used in the vb.net Desktop application. Tables usually contain an ...
2
votes
1answer
102 views

Use one table and a “type” column to represent two types or use separate tables?

I am building a blog system, the blog can have its comment. And like to provide the upvote/downvote feature for both the blog and comment. Since the vote count number of blog/comment should be ...
2
votes
2answers
354 views

How to design a relational data model for music recordings?

In 1970, Edgar Codd published his landmark paper ‘A Relational Model of Data for Large Shared Data Banks’ where he defined relational databases as well as their normalization to first normal form (1NF)...
-3
votes
1answer
110 views

SQL Server: Which License? Any alternatives?

I'm working on a project which at the moment is not being used for any commercial purposes, and I'm managing the data by using a SQL Server Database. I read here that I should pay for it if I ever ...
3
votes
2answers
619 views

Alternatives to distributed transactions in .NET?

Lately, I've been working on a project which basically is a huge rewrite in .NET Core F# + Event Sourcing + PostgreSQL of an old sub-ledger legacy app written in .NET 4.6 C# + SQL Server. Since the ...
-2
votes
1answer
196 views

How to save events in a relational database better support time-based queries on these events

I have a system that subscribes to Kafka topics (i.e. a message bus) that publish life-cycle events. My system needs to digest and save these events and later serve its clients (the users of this ...
-2
votes
1answer
56 views

Design a database with multiple relations and tables

I'm struggling to find how to correctly design a database in order to store and retrieve data for my software. Basically, I'm designing an application for a gym (C++, MySQL with PhpMyAdmin): each ...
-1
votes
1answer
54 views

Equivalent attributes and normal forms

A relation R(A,B,C,D) is given. C and D are equivalent (C is the course ID and D is the course name, one implies the other). C and D are prime attributes. Does that violate the requirement of 1NF ...
-5
votes
1answer
72 views

Novelty of relational model in historical context

The question/title might be ambiguous, so please feel free to improve (or even migrate if necessary) it. My primary concern is what are the innovations of relational model/theory/databases? (In ...
1
vote
1answer
1k views

SQL Database schema for Catering/Menu management

Background I'm building a Private Chef booking service where you can book a Chef to cook you a custom Menu. I'm having trouble creating a SQL db schema that accurately represents the domain while ...
-4
votes
1answer
65 views

Is there a design pattern for transferring “partial” or related data objects?

I am writing a program in Kotlin which parses some input data and writes it to a MySQL database (through JDBC). The database includes tables such as users and each table has a corresponding data ...
1
vote
1answer
51 views

Storing, indexing and searching data using Azure with frequently updated fields. Multiple Sources

We have a multi-vendor marketplace (e-Commerce) system and plan to move our data structures into a polyglot architecture to improve the performance of reads (critical) and writes (not as critical). ...
2
votes
2answers
979 views

Storing unchangable data in database vs in code

Hi I am trying to create a role based dynamic route authorization system on my NodeJS ExpressJS powered API server. Scenario: There will be some roles like Admin, StandardUser etc. and they can't be ...
2
votes
1answer
77 views

Which is the better architecture to follow for API Development in Java using any RDBMS database backend?

This question is regarding the better architecture to follow for API Development in Java using any RDBMS database backend. Currently, we are using the below approach to fetch data from database and ...
0
votes
2answers
77 views

How to use strict schema with seemingly fluid data type

Our company is trying to find a good generic way to have Many-to-One data for an entity. For example, a user might have 1 primary email, but many other emails also attached to their account. So we ...
0
votes
1answer
42 views

Ensure that Room No. of a Course's Section is within the permitted Rooms for that Course with some Constraint

I am facing difficulties establishing constraints in the following situation. This is a hypothetical scenario for practicing DB designing. Imagine, a rule in a School states that the Courses there ...
1
vote
1answer
235 views

Rails model inheritance without STI or polymorphism?

I have a Rails app with HighSchoolTeam and ClubTeam models. I'm currently using Single Table Inheritance (STI) with Team. That means I only have a Teams table in my database, no High_School_Teams or ...

1
2 3 4 5
7