I run www.damosoft.co.uk which is a locked Tiki, by locked onto to clients. using the security groups. Each client can get access to only their own area.
tikiforge.org is a public site and again, as well as having public content, there are client groups, and each client login gets to secured areas.
Its certainly capable of it.
As to the database functions, look at PluginSQL
I've got some links to variation Tikis on my name page below.