Re: How to store a old company which become a new company or part of a group?

Axel Schwenke <[email protected]> Mon, 10 Aug 2020 10:00:18 +0200
Newsgroups comp.databases.mysql
Organization A noiseless patient Spider
Message-ID <[email protected]>
On 07.08.2020 21:19, Lew Pitcher wrote:
> On August 5, 2020 10:58, ^Bart wrote:
> 
>> I need to do a db where I could store company's details and company's
>> products but what happen when a company for example named "X" become a
>> company named "Y"?
> [snip]

Funny. I don't see the original query here.

> See my 2020-02-25 reply to you in the comp.databases.mysql thread titled 
> "Something like a FK but in the same table"
> where I outline how to use a many-to-many table to hold company history.

If the user is running MariaDB, there is now an even better way of storing
and handling multiple (historical) versions of a record:

https://mariadb.com/kb/en/temporal-data-tables/