Added DB name length calculation