various fixes to database keying and constaints

Constraints should now properly accept operations when performed on less
then ideal circumstances.

Keying now converts : to / and also makes sure // are always represented
by a single /