CMS from tutorial

connect to DB. writes and retrieves from DB