2

From what I've read, the hash generated by bcrypt should be stored as type CHAR(60).

Now, should those bcrypt hashes be stored in the main User table together with the user's UserID and Username, or should it be stored in its own table with 2 columns (UserID, BcryptHash)?

2
  • 1
    Preference really I would say. Commented Mar 27, 2013 at 15:09
  • 5
    Proper normalization says that it should be stored in the User table. Commented Mar 27, 2013 at 15:16

2 Answers 2

2

It's fine to store it in the User table. It doesn't really matter. For simplicity I would store it in User.

Sign up to request clarification or add additional context in comments.

1 Comment

@phpNoOb: Not sure why you're giving him a hard time, his answer is correct, as corroborated by Sammitch in the comments above. It's short, but it's the answer I was looking for, and it's correct, so writing it as an answer will make it easier to find for those having the same question in the future. Thanks joeframbach!
0

By your preference I think, for 1st normal form is a repeat of item; about this concept you can use only a field, but (if i must to do that) I prefer 2 columns. paladinux

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.