normalization - Postal code database normalisation -


In the context of areas and postal codes

Each postal code can have another area in each area In one or more postal codes,

Accordingly, it should be created in the form of an M: M scenario with an M3 being included in the "areas"?

The postal code table should contain only one column in the postal code and the locality table will contain only one column that is the name of the locality.

Alternate is a table, which contains both, but its repeated data will result.

Thank you in advance ...

The question you asked is mostly opinion There are several factors that can help you reduce the generalization based on the goal, how you ask for data.

Traditional normalization generally suggests M-M scenario, but this application consistently relates to 3 table information, and this can not be the most effective, if this application is high frequency Be in

The option of a table with repeated data can be optimal if well-designed non-cluster indexing can be added to reduce connectivity and the index is optimized in execution plans. However, due to non-cluster indexes, storage will be imposed, and the application must know for sure that incoming data can be tricked. But if this thing is only valid that a location is within the zip code, then it is expected.

The short story is the answer to the textbook in an ideal world, and then can be practically other factors of performance, storage, query optimization, and app tendencies, Makes better


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -