I’m interested in learning about the best user registration practices. I tend to store site registrations in a separate registration table, and then, as soon as the registration is confirmed by e-mail, transferring data to the users table.
The advantage of this is that reading from the user table does not clutter up the ever activated registrations. Another advantage is that the email field (username) can remain unique in the user table, but if you try to register with an email address that you do not have, the owner of this email address can still register it as an email field mail will not be unique in the registration table.
I am wondering if this is common practice or if there is any reason, is this not a good idea?
Activated or not
. , , , . cron, , , x , .
Email
, , ? , , - , ? . , , , , , , .
, ?
, , , .
. , , , , , .
, .
SQL- ( ), 30 .
. , ( 3 ).
. .
, : . , , , , , , , ..
, NOT NULL.
NOT NULL
, ; . - , . , .
: " " " " .
" ". ( ), "output" " ". (, "-" , 1 ), " ".
As another answer said, in some cases this may be related to engineering, but it can also be a useful way to encapsulate the complexity of these two separate concepts. It can also be seen as contrary to the principles of normalization, but I suggest that you need to choose the tradeoff between encapsulation and normalization depending on your context.
Source: https://habr.com/ru/post/1708564/More articles:Fluent NHibernate - binding list Publishing a Website Using msbuild - .netweird IE7 behavior jQuery height () - javascriptHow to use CVS in TestComplete? - version-controlInstall rails plugins as git submodules - ruby-on-railsHow to create a GDI leak in Windows Forms! - winformsReordering UITableView sections on iPhone by dragging and dropping (for example, reordering strings) - objective-cJQuery: choosing images with a specific source? - jquerySilverlight: шифрование имени пользователя и пароля для веб-службы - encryptionЗначение типа '' не может быть преобразовано в - unit-testingAll Articles