Answer the question
In order to leave comments, you need to log in
How beautiful is the address of residence?
I have an employee entity. Information about employees includes the address of residence. The fact is that there is also an entity Object, which has a foreign key of the employee (the employee works at the object) and also includes the address. How in the essence of an employee to beautifully decorate his place of residence? Maybe in a separate entity and somehow connected with the entity of the Object or there is another way...
Answer the question
In order to leave comments, you need to log in
mkm
create a table - the address of residence, to which you can refer both from the employee and from your entity object and from anywhere else (there are many things for addresses)
ps if you need queries on the elements of the address, do not fence the bike, take KLADR. I strongly recommend not to duplicate the base at home, but to use the nearby one, it seems there is a ready-made api for this, and you use its identifier, but remember, not all addresses are there (this can create a million problems due to which people duplicate the cladrus in their own database, but then crap with its updates begins, you can duplicate the structure, but first load the data from the cladry)
pps https://habr.com/post/214945/
https://habr.com/post/140378/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question