Is this a good example for decomposing a table and a 1-1 table relationship?

I store website information in a table. One set of information is whois domain website name information. This data set contains about 40 fields, and each entry refers to one website. I have no requirement to keep track of updates. I could put all the whois data in the website table, but it seems β€œcleaner” and more intuitive so that the whois domain information in the new table is matched with 1-1.

What is the best solution in this case? Is a table with many fields always preferable to two smaller tables with an unnecessary join?

+3
source share
5 answers

. ? whois?

- whois ( ), . , , , . , .

, 1:1, . 1: 0: , , , 1: 0.

+2

, "" .

, , , . , , , .

+4

A join . , , , , .

+2

, ( ..).

/, , . , , , , .

+1

Joining is not necessarily worth anything. Depending on how the tables are stored, the join may be no-op. Please note that such tables usually do not have a value of 1-1, since a foreign key is always optional on one side of the constraint. Therefore, if whois data is not applied to each row, this is a good reason to have two tables.

0
source

Source: https://habr.com/ru/post/1734148/


All Articles