In most countries the company will still have the same company
number/tax number, so would more likely do two tables in that case
companies
company_id (primary key)
tax_number
name
used_since (date)
company_name_history
company_id
name
used_since (date)
Each time you update you update the name, you store the old name with
it's "used_since" date to a history table and then you update the name
and used_since date.
As it's the same company but with a new name, it shouldn't become a new
entity in your system, it should still be the same, just display a new
name. You will still be able to find old names and it's far faster than
join the companies table multiple times with itself for you to figure
out all the 10 names a company has had.
Having a history table has the advantage that you don't usually need the
data, so it don't matter if it would have a lot of rows and be a bit
slow to get all the data.
Say we had company A which has changed name 10 times, we can make an
simple query
SELECT * FROM companies c LEFT JOIN company_name_history h ON
c.company_id = h.company_id WHERE
c.name = 'A'
compare that with
SELECT * FROM companies c1
LEFT JOIN companies c2 ON c1.oldname_fk_id_company = c2.id_company
LEFT JOIN companies c3 ON c2.oldname_fk_id_company = c3.id_company
LEFT JOIN companies c4 ON c3.oldname_fk_id_company = c4.id_company
LEFT JOIN companies c5 ON c4.oldname_fk_id_company = c5.id_company
LEFT JOIN companies c6 ON c5.oldname_fk_id_company = c6.id_company
LEFT JOIN companies c7 ON c6.oldname_fk_id_company = c7.id_company
LEFT JOIN companies c8 ON c7.oldname_fk_id_company = c8.id_company
LEFT JOIN companies c9 ON c8.oldname_fk_id_company = c9.id_company
LEFT JOIN companies c10 ON c9.oldname_fk_id_company = c10.id_company
WHERE
c1.name = 'A'
But say the company changes name once more, in the first case we don't
have to modify the query, but on the second one you would need to add
LEFT JOIN companies c11 ON c10.oldname_fk_id_company = c11.id_company
and for each name change the select will become slower and slower and
suddenly you will kill your database...
--
//Aho