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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T07:17:48+00:00 2026-05-11T07:17:48+00:00

Of course if I put enough rows eventually there will be a repeat. But

  • 0

Of course if I put enough rows eventually there will be a repeat. But let’s assume I choose a big enough id field.

I want to know if I can assume that the id uniquely identifies the row over time. And if the client sends me an id I want to be able to determine what row it refers or if the row was deleted (or if it is a fake id, but in that case I will not care telling, wrongly, that the row was deleted).

Please refer also to the following: if I restart the database, or backup and restore – will it be continue creating ids where it left – or may be it will decide to ‘fill in the holes’

  • 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. 2026-05-11T07:17:48+00:00Added an answer on May 11, 2026 at 7:17 am

    If you have a ‘int not null auto increment primary key’ that you never reset, then yes IDs will not be reused.

    However, this raises an interesting question – what happens if you happen to reuse an old ID (even though it won’t happen by default in MySQL, but the human factor always counts) ?

    If your database is properly normalized, cascaded and constrained your application should be able to handle the reuse of an ID.

    Edit (since you edited your post, I’ll flesh out my answer), about this quote: ‘And if the client sends me an id I want to be able to determine what row it refers or if the row was deleted’. It’s always possible to determine what row an ID belongs to if it’s not deleted (kind of vital to be able to extract information out of your database).

    However if the row the id refers to is deleted, then it’s not possible to determine what row it belongs to… since it’s not there. If you need this I would advice you to implement some type of auditing functionality, preferably by triggers .

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

Sidebar

Ask A Question

Stats

  • Questions 266k
  • Answers 266k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer This looks like a fairly decent implementation of one on… May 13, 2026 at 12:44 pm
  • Editorial Team
    Editorial Team added an answer You should check the permission of the user account of… May 13, 2026 at 12:44 pm
  • Editorial Team
    Editorial Team added an answer The latest CodeBlocks release is fine, however the MinGW setup… May 13, 2026 at 12:44 pm

Related Questions

I am selling desktop software written in C# to multiple clients, and having a
I have an encryption/copy protection question. I'm writing an application for a company that
Can anyone recommend a GUI builder tool for creating DHTML web apps using AJAX
In a couple of weeks, I'll be teaching a class of first-year engineers the

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.