B
B
BonBon Slick2020-09-15 09:18:02
Database design
BonBon Slick, 2020-09-15 09:18:02

How to merge 2 tables by excluding identical records in certain fields?

Make a port of the old application. Used all the old tables and structures. All the new functionality with the new API lies with me, but the people who support that project sometimes solve the same problem as me and thereby cancel my work.
For example, the task is to make promo codes for promotions. 2 entities, 2 tables, etc. wrote, scattered, then it turned out they had already made tables: 2 tables per 1 entity where 50% of the columns are identical.
There are problems with synchronization.

How to blind 2 tables?
Or sculpt another table that includes 2 others?
Or sculpt an entity such as AdminAndClientUserPromoCode which contain the fields of both tables and in the crown every minute check for data updates in both tables and synchronize?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Andreev, 2020-09-15
@BonBonSlick

Your problem is not technical, but organizational. Any crutch of yours today will turn into a pile of crutches tomorrow until it turns into an uncontrollable monster, to which they will first of all tell you - what are you heaping up here. Solve an organizational issue.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question