table and row gateway