alephcommons / ru-egrul

Russian companies registry
7 stars 1 forks source link

Using INN or OGRN as company/person ID? #3

Open pudo opened 2 years ago

pudo commented 2 years ago

My initial sense was that we should use OGRN because its longer and thus more likely to actually be unique. Also that it identifies the company, not the taxable subject. However, as I am starting to dive into the EGRUL data, I see that INN is used as a foreign key all over the place - which would make it maybe easier to use INN. What do people think? @ArtemCLime @ozhyrenkov ?

English explainer: http://intranorm.com/en/comm/ogrn-and-inn-en.html

ArtemCLime commented 2 years ago

In the current implementation, OGRN is used as a Primary key for all organisations and INN for all persons. INN can be actually NA for a few types of organisations (for example some orthodox companies may have no INN) so we can't use INN properly here as the primary key. OGRN again is always available for all kinds of companies.