Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more

Questions tagged [database-design]

The development of the conceptual schema and/or the logical model and/or the physical settings of a database.

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

How to migrate 2 different Cassandra databases into one cluster

We have two separate Cassandra clusters, each with six nodes: Cluster A and Cluster B. Our requirement is to merge these two clusters to save costs. Because this is a critical application, we need to ...
Sai's user avatar
  • 35
0 votes
2 answers
93 views

Need help on database design for 5 entities complex relations

What it is Have many stories (with many lines in each). Each translated in many languages. Each language have many accents. I'd want to offer user to choose the languages (can choose many of only ...
Md. A. Apu's user avatar
0 votes
2 answers
66 views

Parallel Structures in database: One table with type field or multiple nearly identical tables

I'm designing a database where I'll have some data that has basically the same structure in multiple places, and I'm wondering if I should make it in 1 table or multiple. For example: I have an Apple, ...
user286116's user avatar
0 votes
0 answers
31 views

How to create a tag system on my Access database?

I work with Access in a very rudimentary way. I use it to store data about events that involves guests and our staff. The amount of people in total is enormous, so it is imposible to add the people in ...
Teusdu's user avatar
  • 101
-1 votes
1 answer
53 views

Should we repeat multilevel dependency reference columns to avoid multiple joins breaking the normal forms for better performance

In general I know repeating information in tables are not considered a good database design But I have a question for following particular design for multi level parent child relationship ...
Pawan Nogariya's user avatar
1 vote
0 answers
29 views

what is the best way to create database index on json cloumn in postgress [closed]

I want to create a database index on json column on field customer_number which has the follwoing data.. { "version": "3.0", "order_header": { "...
Vinaya Nayak's user avatar
0 votes
0 answers
41 views

How to Preserve related Table Entries for a final composition?

Please bear with me if I don't quite hit the right wording for my question, or perhaps don't understand the problem correctly. I have an application where you can take an abstract version of something,...
Slevin's user avatar
  • 101
0 votes
2 answers
51 views

Referencing information from same table in Postgresql

I have a geo table that contains countries localities (city, town, village, island, archipelago) locations (venue/business + boroughs/district/area), e.g - Big Ben, or Southwark Borough. For extra ...
BinaryVeil's user avatar
0 votes
0 answers
56 views

Database design: specifications for different types of products

I have table product that contains all types of products. Each product has a set of specifications unique for that particular product type. For example if the product is smartphone its specifications ...
FAMO4S's user avatar
  • 1
0 votes
2 answers
56 views

Choosing a Database system

I am currently in the process of designing a multi-business system that involves user management, business details, and order processing. I am contemplating whether to store all business data in a ...
Shadow's user avatar
  • 1
0 votes
1 answer
203 views

How to calculate MAX server memory and MIN server memory?

There is a total of 10GB of RAM. I want to set MAX server memory and MIN server memory for SQL Server. How do I set this? Would 20% of the total RAM for the MIN value and 80% of the total RAM for the ...
Merve's user avatar
  • 55
-1 votes
1 answer
105 views

Optimizing Negative Int/BigInt Ranges in SQL Server: Strategies and Benefits

I am currently delving into the potential applications and advantages of utilizing the negative range of the int or bigint data types within SQL Server, with a particular focus on the range extending ...
Ali varzeshi's user avatar
0 votes
0 answers
42 views

copying data from database with the same skeleton

I have a database design with the same tables, procedures and all other details on two different servers. Since one of them ran out of traffic, I forwarded the web software project to the other one. I ...
Kadir Çolak's user avatar
2 votes
2 answers
71 views

How do I build a data model for a grid of XY data consisting of many to many relationships?

The Data Let's say I have a grid representing all the people in a room and the conversations they have when they speak to each other. John Susan Brian Rachel John Reassurance Work Sports Movies ...
leigero's user avatar
  • 125
0 votes
0 answers
31 views

I am able to login using server, client and x509 authentication in MongoDB community edition

I am trying to configure x509 authentication for mongodb community edition. Though I have configured the same, I am able to login using server as well as client authentication along with x509 auth. Is ...
dheepakraj govindarajan's user avatar
0 votes
1 answer
52 views

1 to 0 or 1 relationship when both entities are optional

In business process which I'm trying to model there are 2 entities which are in 1 to 1 or 0 relationship from both sides, for example: entity_1 might or might not produce one and only one entity_2 ...
bst19's user avatar
  • 1
0 votes
1 answer
70 views

SQL Server using table's Primary Key as part of Foreign Key

The situation is I have a Tenant table, and a tenant based status lookup table. Each with their own autonumber Primary keys. Now I want to add a column to the Tenant table for a default Status that ...
mcsov's user avatar
  • 15
1 vote
1 answer
50 views

How should I correctly do modelling with this data?

I have created Conceptual data model and Physical data model with this information: Conceptual data model: Physical data model: I want 'Purchase' to have many 'Ticket'. For example, something like ...
Justas's user avatar
  • 13
0 votes
0 answers
243 views

Database design for Splitwise

I am Trying to do DDD for splitwise. Use cases are ability to add, remove, edit transaction with we should be able to create a group as well as one-one expenditures. We should be able to show ...
best wishes's user avatar
0 votes
1 answer
149 views

Find and reserve available spot in parking lot interview question

This is part of parking lot interview question where candidate are asked to design parking lot system. Designing entities for parking lot is fairly discussed problem. But I am stuck on a part where We ...
best wishes's user avatar
0 votes
1 answer
80 views

Should I Use a Composite Key or a Single-Column Primary Key in my Entity Relationship Diagram?

I am designing an Entity Relationship Diagram (ERD) for a database that includes a table with variants annotated by different tools. In this table, each variant is annotated by a specific tool, and ...
Cristian Riccio's user avatar
0 votes
1 answer
73 views

Many to many relation between multiple tables

I'm currently implementing a subscription system where a user can subscribe on an item that can be a type of either A, B or C. There is table for each of the item types : ItemTypeA, ItemTypeB and ...
Martial's user avatar
  • 103
0 votes
2 answers
109 views

What database should I use for storing all Reddit comments/submissions for local hobby project

I'm playing around with machine learning projects that use Reddit comments. I would like to download all Reddit comments and submissions (available as a torrent) and store them in a database on an ...
Dima's user avatar
  • 101
0 votes
1 answer
25 views

How to model edited linked records of a multi-schema entity while preserving the original linked records?

If you have a base class parent. parent can have multiple child records, a one-to-many relationship. parent schema: +-----------+ | parent_id | +-----------+ child schema: +-----------+----------+ | ...
Henry's user avatar
  • 213
0 votes
2 answers
83 views

Handling two different types of relationships between same two tables

I'm working on a database where I have two tables where there can be different types of relationships between them, and I'm struggling with the best way to handle it because all the options I seem to ...
anjama's user avatar
  • 121
-1 votes
3 answers
109 views

2nd Normal Form ERD thoughts

This ERD has completed 2nd Normal Form normalisation, as every table has a primary key, the data is atomic, there are no repeated groups, and there is no partial key dependency. What are your thoughts?...
McNanners's user avatar
0 votes
1 answer
377 views

Using array VS separate table JOIN for many to many relationship

I have a use case where I need to create entity in postgresql to store some configurations. Example of two rows for configuration is below: ConfigurationCode OperationOne OperationOneValue ...
postgis-user's user avatar
0 votes
2 answers
28 views

How do I design a table which has limited key diversity?

I'm in the process of designing a Cassandra database expected to handle messages on several clusters. The data model is primarily structured with a partitioning strategy based on a key locationId ...
Chillax's user avatar
  • 131
-1 votes
1 answer
86 views

Creating a fast relational db with billions of rows

I have thousands of IoT sensors writing to a table in a MySQL DB. I have 10s of millions of rows and it is running fine. I am about to expand and would like advice on how I can adjust the db to have a ...
Matt's user avatar
  • 1
0 votes
3 answers
163 views

How to design a table that can reference two different table?

I am designing a schema for a very simple contact management software. I have two tables, viz. person and customer. A person is an individual while customer is meant as a company or individual or ...
Harshal Patil's user avatar
0 votes
0 answers
53 views

how to create a duplicate table with the same constraints as the original in Oracle

I usually create a duplicate table like this: CREATE TABLE TEST_NEW AS SELECT * FROM TEST; This does create a replica of the original table, however, the constraints aren't replicated. is there a way ...
datascinalyst's user avatar
1 vote
1 answer
80 views

Table filtered for multiple column: eav support table can be the best solution for search performance improvement?

I have a table with 10~15 columns (some varchar, some int, some double, and some date). Table can contain tens of millions of records. User can filter from all columns using all filter operator (equal,...
Claudio's user avatar
  • 11
1 vote
0 answers
11 views

PowerBI Data Modeling: Modeling with sub-dimension and sub-facts

We collect test data from network tests. There is common dimensions and facts for all the different tests, But there are also some facets of the dimensions and facts that are unique. If this was an ...
Dr.YSG's user avatar
  • 399
2 votes
1 answer
197 views

Retrieve 1 million rows of user record in postgress

I am preping for a Notification service in which a single notification can be broadcasted to 1 million users at once. What are the available options to store the users record so that i can retrieve it ...
The Keeper's user avatar
2 votes
2 answers
56 views

MongoDB schema for visit and like

MySQL serves as our primary database, while MongoDB is employed for handling intensive write operations. I have been tasked with implementing a system for tracking visits and likes on products. The ...
BooRuleDie's user avatar
1 vote
1 answer
79 views

Database Design Advice for a 'Favourites' Feature in a Forum System

I'm working on a forum system and need some advice on database design for a new feature: User Favourites. The system currently has four tables: Thread (posts), Comment, Category, and Topic. The new ...
Hhry's user avatar
  • 111
0 votes
1 answer
125 views

Is There a Workaround to Reduce MySQL Table size?

Long story short. I have a MySQL database that has only one table and is around 50GB, while my drive storage is almost full and cannot get reduced. So the only way is to reduce the size of the 50GB ...
Chris921's user avatar
0 votes
0 answers
41 views

feedback and improvements for London Autos ERD

London Autos has several locations within London and its surroundings, from its humble beginning a decade ago in an east London garage, the business has expanded into a multi-million-pound business. ...
user avatar
1 vote
3 answers
41 views

Should a datbase reflect a user's actions or user's state?

We have a Postgres DB in which we store a "settings" JSON field on Users. This JSON field indicates (among other things) whether the user is subscribed to a digest we send out. There's some ...
duhaime's user avatar
  • 129
1 vote
1 answer
61 views

Confusion regarding Weak and Strong Entity types!

Apologies if this is a trivial question, I recently started studying about E.R. Model. Let me try to clarify my doubt using an example. Consider the two entities,Customer and Loan in a relationship ...
Quorthon's user avatar
0 votes
2 answers
123 views

3 tables with many to many relationships

I have these following tables: platforms ( id [PK] name ) shops ( id [PK] name ) products ( id [PK] name description price ) I need to store the data between shop ...
Luna's user avatar
  • 11
0 votes
1 answer
86 views

How do I protected my sensitive data (financial) from website/CRM programmers?

As a company owner, I need to protect my sensitive data from my website/CRM programmers. I know I can scramble DB values with a simple script but it needs to be applied manually all the time and when ...
abenci's user avatar
  • 113
1 vote
2 answers
73 views

database design for tree structure with just one level

is it possible to design a database with a classic tree structure (no nested-set), forcing to have just 2 levels? the table I thought should be: id title parent_id 1 row NULL 2 child 1 3 ...
Giacomo M's user avatar
  • 163
1 vote
1 answer
80 views

Model a database for user subscription that can change during time

I'm struggling modeling a database. This is the domain: an user does have a subscription that has a start_date and a end_date an user can change its subscription, starting from a certain date (it can ...
Giacomo M's user avatar
  • 163
1 vote
0 answers
11 views

Power Pivot/Data model issue

Good day, I am facing two blocking points where I would need your insights please. I have downloaded all my sheets in power query and made the necessary transformations, including creating a common ...
Maissa Oueslati's user avatar
2 votes
0 answers
38 views

FK over multiple columns of which one is already unique

I have a pair of master-detail tables masters(id, ...) and details(id, master_id, ...) with details referencing masters via details.master_id = masters.id. For optimization purposes, I want to add a ...
Boris B.'s user avatar
  • 153
1 vote
0 answers
80 views

expanding a current database

I am rewriting a server program. currently the program has order batching and orders. (currently written in winforms with mssql database with no orm- to be rewritten as a blazor server app with mssql ...
Code-Crasher911's user avatar
0 votes
2 answers
37 views

Understanding Secondary Log Hard Disk Impact on Write Speed and Data Integrity After Power Outage

I've recently come across the notion that a secondary log hard disk can be employed to enhance write operation speed in a database system. I find this concept intriguing but am struggling to grasp the ...
cricket900's user avatar
1 vote
1 answer
30 views

Seeking Guidance on Storage Models for Frequently Executed SQL Statement

An application frequently executes the following prepared statement in SQL: SELECT AVG(StockUnits) FROM PRODUCT; I'm currently exploring the most suitable storage model for the database architecture. ...
cricket900's user avatar
1 vote
3 answers
58 views

Modifying PostgreSQL Table for Handling Multiple Delivery Modes

I'm working on a project where I need to modify the PostgreSQL table structure to handle multiple delivery modes for an ordering system. I have a table named seller with columns like id, user_id, ...
Maine's user avatar
  • 11