using the database and tables