SQL from one to one regardless of one table

Consider a data structure, such as below, where the user has a small number of fixed settings.

User

[Id] INT IDENTITY NOT NULL,
[Name] NVARCHAR(MAX) NOT NULL,
[Email] VNARCHAR(2034) NOT NULL

Usersettings

[SettingA],
[SettingB],
[SettingC]

Is it considered correct to move user settings to a separate table, thereby creating a one-to-one relationship with the user table? Does this have any real advantage over storing on the same line as the user (the obvious drawback is performance).

+12
source share
5 answers

1:1 , (.. ). . 100 .

, . , , , . , ? . . , , ? , , , , . .

, , , 150 , .

- . .

, 1:1, .

: () .

, . , 1:1, . , ​​ , - , . , , , . , , , , .

, : " , ?" , , , 1:1.

+8

1-1 . , , , .

, / . . , , .

. , .

, "" , SQL. , :

  • /
  • .
  • ,

. , " ". , , , .

+2

1:1 , :

1:1, , " ". , , AFAIK, . 1:1 , .

, , , , , . , 1:1.

( Thorsten/Mike. "", - , 6NF, , , ).

0

:) .

, , 1:1 -.

, ( 1-1 " "). . .. ..

, /

0

, , "- " . , ( ) .

UserSettings

[Settings_ID]
[User_ID]
[Settings]

, [Email].

-1

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


All Articles