Database structures

Good morning.
I need to know the database structure of owncloud in detail. I need to know all the various links between the various tables.
I should make some corrections because of some conflicts created with a change with LDAP that duplicated some users.
The new users cannot access their old data, which fortunately has not been lost.
I need to be able to redirect the new users to their old homes.

Do you think this is feasible?

Thank you very much.

Antonio