Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What should be best approach for this seneraio?

 
Kishor Joshi
Ranch Hand
Posts: 674
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there

I am design a web application.Where there is a portion for user registration.In that when I register a user I need to verify their email address and mobile number then their userId and Password is active otherwise not.

For this I have design this table
UserId,Password,OtherFields.......,MobileVerify,EmailVerify

When I register any user I will Insert data in database but these two fields(MobileVerfiy,EmailVerify) are marked as false flag.

I will send a email on user email and a message on user Mobile number.
And based on click on email and some mechanism from mobile I will change these two boolean flag as true.

Will this be right data modelling?

I mean If I have 10milllon rows in mysql table then for any simple execuation I have to check for these two fields to?


Thanks
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's a good design. You'll have an index on your table to find the row you need quickly. (presumably on user id). The fields for a row are usually stored together. So checking two fields on a row you've already found is not expensive.

Remember even if you have 10 million rows, you are never checking 10 million rows - thanks to indexes.
 
Kishor Joshi
Ranch Hand
Posts: 674
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Jeanne

What will be your approach if you need to detect whethar email or mobile number is clicked or not to make userId and Password active?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic