Update data from the database in real time

Can webflow pull data from the database and assign it to global js variables in real time when the data values from the database change?

Nope. Not a current feature on the platform. You may want to consider using an API that does.