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 8584643
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:49:16+00:00 2026-06-11T21:49:16+00:00

I want to know if I can use human readable primary keys for a

  • 0

I want to know if I can use human readable primary keys for a relatively small number of database objects, which will describe large metropolitan areas.

For example, using “washington_dc” as the pk for the Washington, DC metro area, or “nyc” for the New York City one.

Tons of objects will be foreign keyed to these metro area objects, and I’d like to be able to tell where a person or business is located just by looking at their database record.

I’m just worried because my gut tells me this might be a serious crime against good practices.

So, am I “allowed” to do this kind of thing?

Thanks!

  • 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-11T21:49:17+00:00Added an answer on June 11, 2026 at 9:49 pm

    It all depends on the application – natural primary keys make a good deal of sense on the surface, since they are human readable and don’t require any joins when displaying data to end users.

    However, natural primary keys tend to be larger than INT (or even BIGINT) suragate primary keys and there are very few domains where there isn’t some danger of having a natural primary key change. To take your example, a city changing its name is not a terribly uncommon occurrence. When a city’s name changes you are then left with either an update that needs to touch every instance of city as a foreign key or with a primary key that no longer reflects reality (“The data shows Leningrad, but it really is St. Petersburg.”)

    So in sum, natural primary keys:

    1. Take up more disc space (most of the time)
    2. Are more susceptible to change (in the majority of cases)
    3. Are more human readable (as long as they don’t change)

    Whether #1 and #2 are sufficiently counteracted by #3 depends on what you are building and what its use is.

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

Sidebar

Related Questions

I want to know if I can use datas inside configuration profile generate by
First i briefly want to know how you can use oauth works. What we
I know I can use install-data-hook to do anything I want after my data
On hover I want my div to scroll down. I know i can use
I want to know how and when can I use the exit() function like
I don't know if I can use regex for this, but I want to
I know why I want to use private virtual functions, but how exactly can
I want to know how to limit the MySQL result. I can use select
SPI protocal use on MCU & device. I want know if it can use
i want to know in site navigation which contol can be used? i just

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.