How can a relationship between different data sets?

how can i as a developer create a relationship between different data sets. e.g. between the collections and the assets?

is there some kind of ID or other, how i can recognize the data in the backend?