prepare for commit
add entities & connection to database