Implemented relations through foreign keys