While I loved the MMOs I always wanted something that I could run at home and ... "adjust" to suite my play preferences (e.g. faster or slower advancement, more or less powerful items/skills etc). The closest product I've ever seen was Neverwinter Nights and it was fun in it's own way but I've never liked D&D rules and it was a 2.5D world which doesn't fit my ideas.
I realize that Cafu has no built in features for inventory or quests or other RPG style features but I can script and if absolutely required I can program in C++ to some degree so I'm looking forward to experimenting with Cafu (I've seen some forum posts about inventory etc which look promising).
What I haven't seen is anyone implementing a connection to an external detabase. There have been a few general questions without definitive answers but the questions were somewhat vague so the answers couldn't be very definitive. I'll try to be clearer

What I'd like to know is if it's possible to make a database connection (Say MySQL or PostGres) from Cafu scripts or would some C++ coding be required to allow connections and more C++ coding required to allow scripts to use that connection? Security on those connections, of course, would be my responsibility.
Also, can scripts access entity property values i.e. if I add a Strength property can a script set/retrieve that value?
My intent would be to save character stats, character inventory, character quest states, game entity states and locations, those sort of things required for a persistant RPG world. Of course I realize I have to implement the systems for the above, I just want to know if I can access and save all the data to a database.
P.S. I know scripting is based on Lua and Lua can indeed connect to many RDMS but being based on Lua doesn't necessarily mean being able to do everything that stand-alone Lua can do.
Thanks!