Skip to main content
-2 votes
1 answer
70 views

The project is a database for an online clothing store. Which tables are well normalized and which need to be normalized? DB schema of all the tables before doing any normalization: https://i.sstatic....
Renad Aiad's user avatar
0 votes
0 answers
47 views

We’re building a system where an offer can be redeemed until a global limit is reached. For example, an offer may allow a maximum total redeemable amount (e.g., 10M), or/and only allow each user to ...
tusharRawat's user avatar
Best practices
0 votes
2 replies
122 views

I’m designing a domain model where some entities evolve over time, and I need to keep a historical record of their state that can be retrieved later. A simplified example: A Credit Line represents a ...
MABC's user avatar
  • 605
Best practices
0 votes
5 replies
97 views

I'm developing a desktop application for gym management. One feature is a store for selling memberships and products. My client sometimes wants to sell something that is not in the inventory or ...
kitt51's user avatar
  • 11
Best practices
1 vote
1 replies
103 views

Our team manages a SQL Server 2019 data warehouse that’s grown to over 10 TB. It currently uses a single database with multiple schemas (clinical, financial, hr, operations, staging, etc.). Our DBA is ...
Raja's user avatar
  • 68
Best practices
3 votes
1 replies
115 views

I am creating an E-Commerce app. It has Category and Product classes. Both have multilingual descriptions, so, tables with title, description, meta-*, etc. and unique key (id, language_id). To add ...
qarabala's user avatar
  • 178
0 votes
0 answers
114 views

I have a table CREATE TABLE Person ( id SERIAL PRIMARY KEY, name VARCHAR(100) NOT NULL, home CHAR(2) NOT NULL ); where I would like the values of home to be either a country code or a ...
SBGO's user avatar
  • 9
0 votes
1 answer
61 views

I’ve been working on a React/Firebase app for the past 10 months, and things have been smooth so far. Recently, I decided to do some refactoring. I switched from using user-generated fields as unique ...
Emi Buliga's user avatar
3 votes
1 answer
138 views

I have two tables in Postgres with a parent/child relationship: CREATE TABLE table_a ( id SERIAL PRIMARY KEY, type TEXT NOT NULL, rundate DATE NOT NULL ); CREATE TABLE table_b ( id ...
AcrKnight's user avatar
  • 486
1 vote
2 answers
69 views

We have entities Teacher and Student; there are two relationships between them, supervision and teaching: Supervision is one-to-many, but teaching is many-to-many, which is a problem. To fix it, I ...
Sim's user avatar
  • 19
0 votes
1 answer
82 views

I have these tables in my PostgreSQL database: CREATE TABLE companies ( id INT PRIMARY KEY, name VARCHAR(255) NOT NULL UNIQUE ); -- Employees belong to one company CREATE TABLE employees ( ...
Rohit Menon's user avatar
-1 votes
1 answer
121 views

I have a table Languages: ID | ISO639 | NAME ---+--------+--------- 1 | EN | English 2 | DE | Deutsch 3 | TR | Türkçe (etc.) I have another table Headlines: ID | EN | DE | ...
rhavin's user avatar
  • 1,804
0 votes
2 answers
153 views

I want to create a database for my blog website where I have many posts and categories. A post can have many categories and a category can have many posts. I couldn't figure out how to implement it in ...
Hau Khua Lian's user avatar
-1 votes
1 answer
70 views

Why isn't it possible to add a column to a partition? From my point of view, the partitioning feature introduced in PostgreSQL is much more useful than table inheritance. Table inheritance shoots at ...
rela589n's user avatar
  • 1,224
0 votes
1 answer
59 views

I have an application that represents user-defined data in two views: A hierarchical view (parent-child nodes) A flat view (a table where all attributes are listed in a row) In PostgreSQL it handles ...
Oskan's user avatar
  • 21

15 30 50 per page
1
2 3 4 5
1614