feat(rest): add GET /table and add db constraints