Replacing old tg database constructs