initial database access, need to create tables first, use callbacks