Link an object to a database value

Hi everyone,

I would like to know if it’s possible to link a 3D object to a database value and how i can do this.

For exemple : I have a book, when a user click it, i want to see how many times the book has been opened.

Also, if i make a function to handle the click on a particular object, can i use a react component to be used only in this function? Or do i need to setup the render inside that component?

It would be something like this : user click on book → open a window inside the 3D → see the content of the book

Thank you !