# Ruby on Rails Data Model Relationships Diagram

**URL:** <https://www.ruby-forum.com/t/ruby-on-rails-data-model-relationships-diagram/71306>\
**Category:** Rails\
**Created:** [October 6, 2006, 8:05pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-data-model-relationships-diagram/71306 "2006-10-06T20:05:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dylan\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bc8723/32.png) [@Dylan\_B](https://www.ruby-forum.com/u/Dylan_B)\
**Post date:** [October 6, 2006, 8:05pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-data-model-relationships-diagram/71306/1 "2006-10-06T20:05:17Z")

</div>

Hi, everyone. Rein H. was asking in the #rubyonrails freenode IRC  
channel about what we’d like to see in a beginner Ruby on Rails  
tutorial. I told him I wanted a good visual diagram of the basic data  
model relationships. This got me thinking, so I went ahead and cooked  
one up last night. I’ve added it to the files section of the Google  
Groups Beta page for this group. I also have it at the following  
address:

[http://mboffin.com/stuff/ruby-on-rails-data-relationships.png](http://mboffin.com/stuff/ruby-on-rails-data-relationships.png)

I hope it helps new Rails developers get their head around defining  
relationships. As a new Rails developer, I certainly would have loved  
to have something like this. I’d love to get feedback on it, good and  
bad. (Especially if there are errors.) 🙂

–Dylan

---

<div class="post-metadata">

**Author:** ![Dylan\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bc8723/32.png) [@Dylan\_B](https://www.ruby-forum.com/u/Dylan_B)\
**Post date:** [October 6, 2006, 11:19pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-data-model-relationships-diagram/71306/2 "2006-10-06T23:19:24Z")

</div>

I updated the diagram to correctly show the has\_one/belongs\_to  
relationship. It now reflects what is specified in the API.

–Dylan

---

<div class="post-metadata">

**Author:** ![Dylan\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bc8723/32.png) [@Dylan\_B](https://www.ruby-forum.com/u/Dylan_B)\
**Post date:** [October 6, 2006, 9:56pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-data-model-relationships-diagram/71306/3 "2006-10-06T21:56:01Z")

</div>

Cool!

---

<div class="post-metadata">

**Author:** ![Dylan\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bc8723/32.png) [@Dylan\_B](https://www.ruby-forum.com/u/Dylan_B)\
**Post date:** [October 7, 2006, 12:51am UTC](https://www.ruby-forum.com/t/ruby-on-rails-data-model-relationships-diagram/71306/4 "2006-10-07T00:51:32Z")

</div>

what about students who has 2 cars?

just joking, nice chart

–  
Heri R.  
[http://sprinj.com](http://sprinj.com)

---

<div class="post-metadata">

**Author:** ![Dylan\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bc8723/32.png) [@Dylan\_B](https://www.ruby-forum.com/u/Dylan_B)\
**Post date:** [October 7, 2006, 3:49am UTC](https://www.ruby-forum.com/t/ruby-on-rails-data-model-relationships-diagram/71306/5 "2006-10-07T03:49:44Z")

</div>

Very nice, and educational !!!  
more on this is needed… definitely a good time investment !!!
