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
0 answers
30 views

Database design for a reccomendation system

I am working on a project which will have a recommendation system and I am in the database design phase, I have a good foundation in programming but databases is a new topic for me, I have designed a ...
user avatar
  • 1
-1 votes
0 answers
46 views

Storing history of a hierarchy changes in database

I have a class that uses a hierarchy structure: Class { string Id; string ParentId; //... other properties around 30 Date ModifiedDate; Date CreationDate; ...
user avatar
  • 99
-2 votes
0 answers
15 views

RDF model for an RDB link table with attribute

How is an attribute of an RDB link table modeled in RDF? For example, consider RDB tables for Student and Course and a link table (many-to-many) 'Enrollment' that has two foreign keys StudentID and ...
user avatar
  • 1
1 vote
0 answers
29 views

Backend Design: System requires both ElasticSearch and MySQL. In which scenario we fetch data from MySQL or ElasticSearch?

So, one of the backend system, having 5 resource types (tables) and some foreign keys as well, requires full text support for two of the tables. Also, for some use-cases, we require inner-joins for ...
user avatar
0 votes
0 answers
30 views

Using NoSQL (vs SQL) Database for Metadata in a highly scalable System like Facebook

If you are required to build a highly scalable system like Facebook would you prefer to use NoSQL database or a SQL database for the metadata. I would use a SQL database for metadata i.e User Info, ...
user avatar
-3 votes
1 answer
75 views

Where should linking tables be stored? [closed]

I have a system where properties can be stored, and linked with multiple other entities (each with their own schema). Let's say that Documents can be linked with Users and Assets. What is the best ...
user avatar
  • 151
-1 votes
2 answers
83 views

Difficulty understanding how denormalization results in more storage necessary

I am having difficulty understanding how denormalization results in more storage necessary. For example, let's say that in a normalized relation, there's Table 1 and Table 2. In order to join Table 1 ...
user avatar
  • 153
0 votes
3 answers
93 views

Storing count of child rows in parent table

I have two tables, parent and child. Parents can "have" multiple children—in our case they are related through a third table, parent_child_mapping rather than the child storing its parent id ...
user avatar
0 votes
1 answer
91 views

Designing a model for a small business which provides multiple services which generate documents [closed]

I am designing a system for a company which provides multiple services to users, all of which generate a document. The documents all have a validity period. Some of the services can be grouped, and ...
user avatar
1 vote
1 answer
88 views

Database Design, Associative Entities

I'm learning databases and I'm designing an ERD based on simple banking processes. I'm not sure if my design of the entity relationship diagram is correct. Thought Process A customer can open 1 : N ...
user avatar
  • 27
0 votes
0 answers
127 views

Design MySQL database to store user workout data for Workout App

I am building a fitness app and I'm trying to figure out the optimal way to store the data is a MySQL database. I would like to have specific programs (for example, 'get jacked'), I would like a users ...
user avatar
  • 11
1 vote
0 answers
33 views

How to handle storing of arbitrary data in an application enablement platform

I'm working on an AEP in the IoT space, where we've created a few domain-specific entities to allow users to model their data. Each entity has both a type and instances of that entity. These are: ...
user avatar
  • 259
-1 votes
2 answers
92 views

Database responsibility segregation

I have the following architecture: Database (Postgres), Batch(java app - long running operations that delete, update, insert lots of data in the database), Rest API(java app - provides rest services ...
user avatar
2 votes
3 answers
167 views

Enforce correspondence between enum and lookup table

I have seen a common design pattern where there will be a "lookup table" in the database like this: Color ColorId ColorName 1 Blue 2 Red 3 Green with a foreign key constraint on other ...
user avatar
  • 6,917
0 votes
1 answer
55 views

Approach for store multiple relationships POO objects in relational database

I'm developing a system in which a ClassA object can have multiple ClassB and ClassC objects. And for store these objects in a relational DB model I create the following tables: This is a simplified ...
user avatar
  • 177
-1 votes
1 answer
30 views

CRDTs and merge conflicts in DB design

I face this problem with software development quite often, but I don't really know the name of this issue. It sounds quite common, though. Two nodes (a computer and a mobile phone, for example) share ...
user avatar
  • 155
0 votes
1 answer
107 views

How to do "initial sync" of data for new microservice that depends on data from another microservice?

Hypothetical scenario: Let's say I have a Customer service. It has 1 million customers in its database. I then create a new service that depends on a specific projection of the customer entity. I want ...
user avatar
  • 15
-1 votes
2 answers
156 views

Is it normal and good practice to enlarge the amount of columns when adding new features

There is a table named is A with 40+ columns, among which around 10 are columns of hierarchical levels, in a data analysis platform maintenance and development ( legacy ) project. Due to development ...
user avatar
  • 1,467
2 votes
3 answers
425 views

Do NoSQL and non-relational refer to the exact same concept?

Question as the title says. Of course, I already tried searching online, but did not find a definite answer yet. (The sources I checked imply that the terms are interchangeable, but do not state this ...
user avatar
  • 477
-2 votes
2 answers
135 views

Avoid redundant field using JSON type in MySQL [closed]

I have experienc with designing relational dbs but first time attempting to store JSON in a mysql table. I am using mysql 5.7.8 which has the ability to store json data type as a column. When I create ...
user avatar
  • 139
1 vote
3 answers
153 views

What makes a data pipeline scalable? Best practices for scalable design?

I have been searching about this topic for a few days and have not yet found anything on books, courses or tutorials. What is a way to make data pipelines more scalable, that doesn't involve NoSql or ...
user avatar
0 votes
3 answers
79 views

Fetch the most recently updated records in a database across multiple tables in a performant manner

I have an Angular + Django web application in which Django functions as my backend. In this web application, I have 12 different tables about articles, each table representing a different kind of ...
user avatar
0 votes
0 answers
23 views

Database architecture for Email Marketing which can be used as a micro service

I am working on a very challenging email marketing database design and i am not able to figure out the best way to build the database, where functionality can be split so it can be used as a ...
user avatar
3 votes
3 answers
264 views

Is there a normal form for avoiding exactly identical tables?

Consider this schema in a relational database: There are two tables A, B, both having two columns X, Y. The constraints are: X in both tables are the primary keys. (The values are unique in each ...
user avatar
  • 149
51 votes
6 answers
10k views

Is denormalising a database for speed an anti-pattern?

I have a database with a 1:m relationship. I have to display a list of parents to the user rapidly on a home screen at startup. The parent shows a single piece of information that is a sum of a ...
user avatar
1 vote
1 answer
94 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 ...
user avatar
0 votes
1 answer
65 views

How to prevent mutual dependencies when implementing database relationships

To explain the problem imagine you have two entities User and Group. The OO implementation has two classes UserModel and GroupModel. UserModel should have a method getGroups() (returning instances of ...
user avatar
  • 101
3 votes
3 answers
370 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 ...
user avatar
  • 251
0 votes
1 answer
44 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 ...
user avatar
1 vote
0 answers
24 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 ...
user avatar
2 votes
2 answers
210 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 ...
user avatar
0 votes
1 answer
199 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. ...
user avatar
-2 votes
1 answer
80 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 ...
user avatar
  • 5
-1 votes
2 answers
401 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 ...
user avatar
-1 votes
1 answer
49 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 ...
user avatar
  • 227
0 votes
2 answers
54 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 ...
user avatar
  • 135
-1 votes
1 answer
121 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 ...
user avatar
  • 27
-1 votes
4 answers
273 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" ...
user avatar
1 vote
1 answer
111 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 ...
user avatar
  • 369
3 votes
1 answer
62 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: ...
user avatar
  • 149
0 votes
0 answers
70 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 "...
user avatar
1 vote
2 answers
431 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 ...
user avatar
0 votes
1 answer
47 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 ...
user avatar
  • 101
0 votes
1 answer
265 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 ...
user avatar
0 votes
1 answer
140 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 | |------------------| | ...
user avatar
  • 19
0 votes
0 answers
226 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 ...
user avatar
  • 109
1 vote
2 answers
104 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 ...
user avatar
0 votes
0 answers
52 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 ...
user avatar
5 votes
2 answers
473 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 ...
user avatar
  • 403
-2 votes
1 answer
194 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....
user avatar
  • 183

1
2 3 4 5
8