Updated database schema and added foreign key relations 

Updated according to this schema

![image00](https://f.cloud.github.com/assets/934032/2502804/7648f01e-b37b-11e3-9dd7-4c6358ba2cee.png)