Yes, PostGreSQL has FK support, no this line doesn't do it on its own. Check here for various ways: http://guides.rubyonrails.org/association_basics.html