I
I
Igor2020-11-14 19:14:00
KLADR
Igor, 2020-11-14 19:14:00

FIAS, how to normalize correctly?

TK.

Write the address of a contact.
Region, City, Address (Address means everything else up to the apartment.).

Yuzayu FIAS. Now I'm normalizing, in order to make life easier when adding an address, perform appropriate filtering when searching for contacts.

Addresses are divided into levels.

Уровень	Описание
1	Регион
2	Автономный округ
3	Район
4	Город
5	Внутригородская территория
6	Населенный пункт
7	Улица
8	Здание, сооружение, объект незавершенного строительства
9	Помещение в пределах здания, сооружения
65	Планировочная структура
75	Земельный участок
90	Дополнительная территория
91	Объект, подчиненный дополнительной территории


I probably don't need that kind of detail.
But since I undertook to do it and have already imported FIAS XML to MYSQL
, then you need to normalize the data.

Obviously, creating an entity for each level in the current project is an extra overhead.

What if we compress to three entities?

1 - 2 Regions
3 - 4 Cities, Districts
5 - 91 All the rest (streets, dead ends, ...)

Of course there are still houses, but it will not be difficult to attach them in the future.

Just in case, I'm not looking for algorithms and ready-made normalization methods, but I just want to get good advice on the structure, which will be the most average solution.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Korotenko, 2020-11-14
@firedragon

Look at my git. Perhaps ideas will come

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question