Set up table structure in database