Updated database schema , added foreign key relations  & fixed pep8 errors 

Please ignore previous ones.Removed previous issue due to multiple commit messages. Sorry for it  :)