Data Hooks

Hey Everyone, I want to know about data hooks.
I don’t know what they are, the purpose, the need, where to use and so on.
If anybody would help me with these questions, I would be grateful.

I will understand the code part myself seeing the documentation, I just want to know what they are.
Also, I know page code but don’t know what backend files mean and how to use them. It seems a bit complicated. I believe many noobs (like me) want to know about this but don’t know where to start😀

Thanks in advance.

Data hooks are functions that run on database actions. For example, you can set a before_insert hook that changes the data before you insert it to the database. or an after_query hooks that run after a query etc…
You can read this:

and this:
https://www.wix.com/corvid/reference/wix-data/hooks

As for the backend files, these are .js or jsw files that contain you code and run on the server side (and not on the client browser). The data hooks you mentioned earlier are in the data.js backend file.

Thanks it gave me the idea about it.