I would like to know if there is any way of getting a database's identifier for a record through JDBC.

For example, i am querying the database and getting back a `ResultSet` which i store in a `Map`. I give an Id to each record based on the order that i retrieve them from the ResultSet.

Now i would like to re-query the Database and be able to correlate the new `ResultSet` to my already existing records. So, if a record got deleted, ideally, i would be able to just remove it from the `Map` by using the unique identifier.

My problem here is that i cannot find a unique identifier coming from the RDBMS itself. I tried using the `ResultSet.getRowId()` but this method is not implemented by all JDBC driver providers.

Could anyone thing of any way to get a get an identifier from the ResultSet that uniqely identifies a record in the Database ?

Thanks.