# Database design problem

**URL:** <https://www.ruby-forum.com/t/database-design-problem/135402>\
**Category:** Rails\
**Created:** [April 21, 2008, 10:39pm UTC](https://www.ruby-forum.com/t/database-design-problem/135402 "2008-04-21T22:39:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![evan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/54ee81/32.png) [@evan](https://www.ruby-forum.com/u/evan)\
**Post date:** [April 21, 2008, 10:39pm UTC](https://www.ruby-forum.com/t/database-design-problem/135402/1 "2008-04-21T22:39:40Z")

</div>

Hi, please read my post at  
[http://railsforum.com/viewtopic.php?pid=60321#p60321](http://railsforum.com/viewtopic.php?pid=60321#p60321)

I’ve been stuck on this problem for weeks now and nobody has been able  
to help me! I would be very grateful to whoever can solve this  
problem! Thanks

---

<div class="post-metadata">

**Author:** ![evan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/54ee81/32.png) [@evan](https://www.ruby-forum.com/u/evan)\
**Post date:** [April 21, 2008, 11:19pm UTC](https://www.ruby-forum.com/t/database-design-problem/135402/2 "2008-04-21T23:19:08Z")

</div>

Evan wrote:

> Hi, please read my post at  
> [http://railsforum.com/viewtopic.php?pid=60321#p60321](http://railsforum.com/viewtopic.php?pid=60321#p60321)
> 
> I’ve been stuck on this problem for weeks now and nobody has been able  
> to help me! I would be very grateful to whoever can solve this  
> problem! Thanks

Your teacher has\_many meetings… and you have several options…

teacher.meetings.each do |m|

# you have all your meeting fields available here, as m.this or m.that

end

or  
for meeting in teacher.meetings

# likewise with meeting.this or meeting.that

end

Iterating across the meetings lends itself easily to rendering TRs, and  
the fields you want to display would be the TDs

[http://api.rubyonrails.org](http://api.rubyonrails.org) is your friend, as is  
[RDoc Documentation](http://ruby-doc.org/core)
