Get a unique hash value for any given input using PHP

I need to regularly check the rows (100,000) and check if their current state matches the last saved version in another database. Is there a way to get some unique value for the row matching them, or do I need to manually check the row columns by column?

The source database is a SQL Server 2005 database, and the table does not have a timestamp mechanism for creating, updating, and / or deleting. I looked around to check if there is row information available, but only pseudo-columns %%lockres%%and row information are available , but which does not provide date and time information.

I am limited in my tools, but I have a web server with Apache and PHP and direct access to the source and target databases. I only have permissions to read the source database.

What will be the most efficient way to compare data and maintain performance in the source database.

+4
source share
1 answer

Since you do not have access to the database, Id suggests using an “alternative” database to store information. I can come up with several different approaches, each of which has different pros and cons.

Approach 1

, , Id , , , .

, , , , .

:

:

  • -

2

. , , , . .

:

:

3

. , .

:

:

  • .

, , SQLite - , .

0
source

Source: https://habr.com/ru/post/1609310/


All Articles