I make a service that should work with Access databases.

The user can download new databases to the repository, download existing databases from the repository and modify them, and then return.

For each Access database, an entry is created in the database service, where the path and storage location is indicated.

Actually the question is: How can I better organize the identification of Access databases, which would be to understand: "So this is a new base, I will create a line for it, but this base is old, I have to update it"?

By name, identify is not an option.

I have an idea to create a hidden table and write Id from the database there.

In this case, you will have to contact interopt (to create a hidden table), but I dislike it

Maybe there is something better that can be used for identification?

  • and in the record in the "service database" you can store this flag? - KoVadim
  • The base is registered in the service. The user can download the database, make edits and upload to the repository through the service. Here on this place I need to understand the database is registered in the service or not. - iluxa1810
  • What is the difference between the bases in the service (structure, different users, etc.)? those. for example, a person downloaded the database, saved it under 2 names, made various edits and loads into the repository, from the point of view of the service, is it 1 base or different? - Tunker
  • If the database has an identifier that marks the bases, then one. In this case, the service will replace the database in the repository with a newer version. - iluxa1810
  • about the identifier - this is understandable, from the point of view of the service logic, i.e. different bases in the service - these can be the same in the structure of the base but with different data, or it should be different in the structure of the base. That's what I need: for example, if different databases are with different structures, then you can store a hash of the database structure, for example md5, and check it when loading - Tunker

1 answer 1

It is necessary to create for different users different directories in which the base will lie in each directory. Because with one directory may be a problem of competing access to the database . Also, different directories (each user will see only his own directory) will ensure the uniqueness of the database within one user, i.e. the identifier is the name of the directory. The difference in the database must be compared using hash sums (for example, md5 ). Inside the service, there will be a database identification based on the name of the directory owned by the user.

The solution contains a number of pitfalls, from competing access to the problem of lack of space with a large base, because there will be a copy of the file for each user, but this will solve the general problem of the author.

  • And how then to bring the zoo database to a general form, synchronize that is? @ iluxa1810 maybe you should go to the client-server database? UPD discovered replication :) - aryndin
  • In the carousel mode, poll each changed base. The question was specifically about Access. Naturally, Access is not suitable for multi-user operation. But even in my example, it is possible for each user to give only information that concerns only him. Accordingly, only a certain part will be filled. A kind of offline version. PS: Yes, it is replication. - RemiZOffAlex
  • For details on the replication account. - iluxa1810
  • What specifically interests? There will be the so-called asynchronous replication with all its problems. Only one user base with the central base will be synchronized at a time. - RemiZOffAlex