Sending the whole DB to the front end is a bad idea for several reasons.
-
whether you display it on the page or not, all that data is available to a savvy visitor, which could make security compromises.
-
The payload will be unsustainably large. It’s better to send just what is needed to the front.
-
Backend is a better place for calculations because the client (ie the browser) has many limitations for processing.
In general, you should try to only send to the front what is needed for the user experience and nothing more.