Это довольно простой набор моделей для рельсов.
rails g model movie name:string
rails g model person name:string
rails g model movie_role movie:belongs_to person:belongs_to role:string
А для модельных ассоциаций:
class Person < ActiveRecord::Base
has_many :movie_roles
has_many :movies, :through => :movie_roles
end
class Movie < ActiveRecord::Base
%w(actor director writer).each do |type|
base = "#{type}_movie_roles"
has_many base, :conditions => { :role => type }, :class_name => 'MovieRole'
has_many type.pluralize, :through => base, :source => :person
end
end