use `db` and `table_name` in kwargs of Resource