NPM is the package manager for Node JS. So in order to be able to use NPM on a web server you’ll need to be granted very high permissions — i.e. almost like an admin — since you’d be installing software on the server machine. It’s unlikely that any web hosting service will grant you such privileges, so you’ll be needing either a virtual hosting service or an independent machine of yours hosted by the ISP.
Databases have not much to do with NPM, to use NPM you also need to be able to connect to your server via remote shell, where you can type commands and have full access to your account (including installing and uninstalling software).