build all tables