bluetechnx
June 19th, 2005, 06:21 PM
Heya, I am not DB buff...
I was hoping somebody could look over this and give me a heads up these relations look ok.
The entity relationship I am trying to model: http://blue_technx.tripod.com/db.jpg
I have these models currently in place:
class Course < ActiveRecord::Base
has_and_belongs_to_many :sections
end
class Instructor < ActiveRecord::Base
has_many :courses
end
class Quarter < ActiveRecord::Base
has_many :courses
end
class Section < ActiveRecord::Base
end
class Student < ActiveRecord::Base
has_many :sections
end
I think that they are sort of correct, but I'm not certain..and yes this is a mock db for a school scheduling application. Any help is appreciated. I'm also on AIM with username "ada95sux"
I was hoping somebody could look over this and give me a heads up these relations look ok.
The entity relationship I am trying to model: http://blue_technx.tripod.com/db.jpg
I have these models currently in place:
class Course < ActiveRecord::Base
has_and_belongs_to_many :sections
end
class Instructor < ActiveRecord::Base
has_many :courses
end
class Quarter < ActiveRecord::Base
has_many :courses
end
class Section < ActiveRecord::Base
end
class Student < ActiveRecord::Base
has_many :sections
end
I think that they are sort of correct, but I'm not certain..and yes this is a mock db for a school scheduling application. Any help is appreciated. I'm also on AIM with username "ada95sux"