Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3222524
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T16:00:03+00:00 2026-05-17T16:00:03+00:00

This is a web dev best practice question. I am envisioning a website where

  • 0

This is a “web dev best practice” question. I am envisioning a website where users would sign up with a username they would select (revolutionary, I know). They would also enter a valid email address. I would test for the uniqueness of those in the db before allowing the sign-up.

The site is non-commercial in nature, and I don’t need a GUID.

Given this, should I have in my db a separate user ID? I understand vaguely that MySQL might index more efficiently a number-based ID?

Alternatively, should I just use the email address as a unique identifier?

Thanks.

JDelage

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T16:00:04+00:00Added an answer on May 17, 2026 at 4:00 pm

    User names are typically not unique, and even e-mail addresses can be reused. That’s one reason to have a numeric unique user id.

    Another is that when you create a database relation, MySQL has to make a copy of the primary key of the user table. For example, if you have a list of orders per customer. The order would contain the username if that was the primary key. Usernames are longer than integers, which hurts index performance.

    If you combine the two, a user that changes his username or email becomes a big problem: you have to rename a primary key, which isn’t easy, and you’d have to update all references to that user from other tables.

    But overall, eh, I would hope you have bigger things to worry about, like adding functionality to attract users 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Warm Standby SQL Server/Web Server This question might fall into the IT category but
This web page http://www.w3schools.com/ASP/prop_sessionid.asp states that a session ID is generated on the ServerSide.
I have this web application that has grown to an unmanageable mess. I want
I found this web site (photoblog) http://www.OneReaction.net/ and I am very curious how this
In particular from this web.config: <configuration> <configSections> <section name=RStrace type=Microsoft.ReportingServices.Diagnostics.RSTraceSectionHandler,Microsoft.ReportingServices.Diagnostics /> </configSections> <system.diagnostics> <switches>
So we have this web app where we support UTF8 data. Hooray UTF8. And
I'm using JQuery and Prototype in this web application that I'm developing. I'm looking
I've got a web service: http://machine001/Services/conversionService.asmx This web service has one method in it
I have a web application deployed in an internet hosting provider. This web application
I have this .NET web app that draws a table in Page_Load. Then after

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.