set up database, files and table