adding database structure and models