Will the resource id and note id be duplicated?

I observed that notes and resources are two tables in sqlite, so does this mean that resource id and note id may be duplicated? But the syntax of citing notes and resources is :/, how does joplin distinguish it?

1 Like

At the db level they can be duplicated, but for sync, links, etc. they cannot be. For links, the code just looks up in the various tables until it finds the right ID.

Is there a mechanism in the current implementation to ensure that the ids in the two tables will not be duplicated, or is there a possibility that duplicate ids will cause synchronization failure?

It would definitely cause a synchronisation failure because all the items are on the same folder in the sync target.

The mechanism to ensure there's no duplicate ID is built-in in the way they are generated - as long as you use a real UUID function, you can be sure that there won't be any duplicate.