RelationalDatabase and DatabaseReference are NOT supported in the Wolfram Cloud for "public" accounts, not even for Premium Plan (Commercial)!
Dr Darren (otherwise a staunch advocate for Wolfram technologies) says:No, you didn't misread that. It's hard to wrap your head around. You CANNOT even with Premium Plan (Commercial) costing thousands per year connect to a relational database in full client-server mode in the Wolfram Cloud from aFormPage
orAPIFunction
It is supposedly due to security restrictions, which restrictions can apparently optionally be lifted on the Wolfram Enterprise Private Cloud (EPC), which effectively runs on separate infrastructure like a quarantined VPS.
Dear Wolfram Research, Imagine you have been extolling the virtues of Mathematica and the Wolfram Language over Python to a Project Manager who knows nothing about anything, you develop a compelling EntityStore based system backed by a relational database hosted whereever, demonstrate it working on a Notebook, then have to eat humble pie with your tail between your legs when you tell that Project Manager (who has access to Python developers who don't even know Wolfram exists), that after all it does not work when deployed to the Wolfram Cloud (unless you upgrade to an Enterprise Cloud Platform with setup overhead and significant additional expense).
Something any Python developer can do on a basic VPS in minutes.
UPDATE: Use H2(Embedded)
Wolfram Support has kindly advised that an H2(Embedded) database may be accessed from the Wolfram Cloud using a low level SQLConnection with a.my.db
file hosted as a CloudObject. There is no support for EntityStore, all database manipulations must be done via low level SQLQuery, SQLUpdate etc. At the time of writing it is not known whether there are concurrency access issues due to use of embedded mode with a single H2 file. H2 does offer a full client-server mode, but it is not know whether that is supported in the Wolfram Cloud.
Visit also: