r21973: make use of tdb_*_bystring() and string_term_tdb_data()