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

  • SEARCH
  • Home
  • 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 7901313
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:11:19+00:00 2026-06-03T09:11:19+00:00

I have a doubt about best practices and how the database engine works. Suppose

  • 0

I have a doubt about best practices and how the database engine works.

Suppose I create a table called Employee, with the following columns:

  • SS ID (Primary Key)
  • Name
  • Sex
  • Age

The thing is.. I see a lot of databases that all its tables has and aditional column called ID, wich is a sequencial number. Should I put and ID field in my table here? I mean, it already has a Primary Key to be indexed. Will the database works faster with a sequencial ID field? I dont see how it helps if I wont use it to link or research any table.

Does it helps? If so, why, what happens in the database?

thanks!

EDIT —–
This is just a silly example. Forget about the SS_ID, I know there are better ways for choosing a primary key. The main topi is because some people I know just ask me to add the collumn named ID, even if I know we wont use it for any SQL query. They just think it helps the database’s performance in some way, specially because some database tools like Microsoft Access always asks us if we want it to add this new column.

This is wrong, right?

  • 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-06-03T09:11:21+00:00Added an answer on June 3, 2026 at 9:11 am

    The actual performance gain in having a sequential id is going to depend a lot on how you use the table.

    • If you’re using some ORM framework, these generally work better having a sequential ID of an integral type [1], which is typically achieved with an sequential id column.
    • If you don’t use an ORM framework, having an idkey that you never use and a surrogate ss_id key which is effectively what you always use makes little sense.
    • If you’re referencing employees from other database table (foreign-key), then it’ll probably be more efficient to have an id column, as storing that integer is going to consume less space in the child tables than storing the ss_id (which I assume is a CHAR or VARCHAR) everywhere.

    On the ss_id, assuming it’s a social security number (looks like it would be), there might be legal & privacy concerns attached to it that you should care about – my answer assumes you do have valid reasons to have social security numbers in your database, and that you would be legally allowed to use & store them.

    [1] This is usually explained by the fact the ORM frameworks rely on having highly specialized cache mechanisms, that are tailored for typical ORM use – which usually implies having a sequential id primary key, and letting application deal with actual business identity. This is in fact related to consideration very similar to these of the “foreign key” considerations.

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

Sidebar

Related Questions

i have a doubt about a best practice... I have a bunch of enumerables
I have some doubts about the best way to do a database with passwords.
I have a doubt about orkut's new URL Writing method. Earlier the home page
I have little doubt about string reading in C. string reading functions like gets,
I am beginner so have some doubt about Adobe AIR. How do I install
I have a small architecture doubt about organizing code in separate functional units (most
I'm in a bit of a doubt about this subject. Situation: I have conducted
I'm developing a site and I have some doubts about the best approach to
I have doubt about the Row_DataBound and Row_Created events : What is the difference
I have a doubt about null assigning to variable in Java. In my program

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.