• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

What should be best approach for this seneraio?

 
Ranch Hand
Posts: 674
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Eliminate 95% of the weeds in your lawn by mowing 3 inches or higher. Then plant tiny ads:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic