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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T21:54:41+00:00 2026-06-07T21:54:41+00:00

My database has around 100 tables and anywhere from 1,000 to 20,000 rows per

  • 0

My database has around 100 tables and anywhere from 1,000 to 20,000 rows per table. Each of the tables has a primary key called id – at the moment when referencing rows in a table I am simply using id, for example www.domain.com/viewuser.php?id=3

I am pretty sure I have no hardcoded references to row ID’s in my code, they all reference either a POST value or a session ID set when the user logs in.

Is it easy to retrospectively change the id from auto increment integer to a unique alphanumeric id for all my existing tables without causing extensive recoding or altering existing queries etc? If so, how would I go about it?

My tow thought were to manually update all my tables but this would also require changing every insert as well? Could I do something with a unique_id table which sits between though I think this may require updating of all queries? Hoping there is an easy way to do this…

  • 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-07T21:54:44+00:00Added an answer on June 7, 2026 at 9:54 pm

    Randomizing the id values (changing them from auto_increment integers to alphanumeric) in the database doesn’t really address the underlying problem.

    Even if you manage to randomize and obfuscate the id values, users are still going to be able to access other user’s data through URL manipulation. All you are going to achieve is to make it it “less likely” that any particular URL manipulation attempt will succeed at returning forbidden data.

    If your app needs to PREVENT some users from seeing some data, then your app needs to provide a real mechanism for doing that.

    Obfuscating ID values is going to be whole lot of work, and in the end, it won’t accomplish what really needs to be done.

    (see the comments from Sabeen Malik, drew010, Justin Swartsel,,, they are all “right on”.)


    If your application already implements a mechanism to prevent access to forbidden data, the obfuscation of ID values is not necessary.

    The only place these ID values really need to obfuscated would be in the URL (or POST), and that can be achieved WITHOUT changing the existing database. (See Sabeen Malik’s comment; it’s possible to encrypt/decrypt the id values sent to/from the browser… the big issue there is if there is javascript running in the browser that is depending on the id values being “orderable”…)


    I understand this may not be the answer you were looking for in your original question. But I wouldn’t undertake the effort to change from id INT AUTO_INCREMENT values absent a good reason to.

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

Sidebar

Related Questions

My database has a table with thousands of records. The primary key is an
I have a table with around 100,000 rows at the moment. I want to
So, I have a database with around 100 audit tables and I want to
I have an application where the database back-end has around 15 lookup tables. For
In the following my SQLite database has 10 values in each table. However, when
I have a database that has around 10k records and some of them contain
Database has tables Photos and PhotoAlbums. I need a query that will select all
My database has 7 tables: one is the parent (feeds) and the other 3
My database has an organisation table and an address table. In the address table,
Each user object in my database has an incremental ID (1, 2, 3, ...).

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.