# Best practice for starting for building your DB?

**URL:** <https://www.ruby-forum.com/t/best-practice-for-starting-for-building-your-db/135888>\
**Category:** Rails\
**Created:** [April 25, 2008, 10:02pm UTC](https://www.ruby-forum.com/t/best-practice-for-starting-for-building-your-db/135888 "2008-04-25T22:02:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rSils3nvy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/3ab097/32.png) [@rSils3nvy](https://www.ruby-forum.com/u/rSils3nvy)\
**Post date:** [April 25, 2008, 10:02pm UTC](https://www.ruby-forum.com/t/best-practice-for-starting-for-building-your-db/135888/1 "2008-04-25T22:02:59Z")

</div>

Hi,

Im just starting RoR so forgive me if I ask some stupid questions. Is  
it easier to create the a DB with a couple of tables through ruby on  
rails or can I just as easily work with the DB if I already created it  
through a front end app like HeidiSQL?

---

<div class="post-metadata">

**Author:** ![rSils3nvy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/3ab097/32.png) [@rSils3nvy](https://www.ruby-forum.com/u/rSils3nvy)\
**Post date:** [April 26, 2008, 12:06am UTC](https://www.ruby-forum.com/t/best-practice-for-starting-for-building-your-db/135888/2 "2008-04-26T00:06:51Z")

</div>

Besides that rails generates migrations for you which is a very useful  
feature as you can rollback the changes in your database if they don’t  
satisfy you…

On 25 Kwi, 23:19, Shandy N. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![rSils3nvy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/3ab097/32.png) [@rSils3nvy](https://www.ruby-forum.com/u/rSils3nvy)\
**Post date:** [April 25, 2008, 11:19pm UTC](https://www.ruby-forum.com/t/best-practice-for-starting-for-building-your-db/135888/3 "2008-04-25T23:19:29Z")

</div>

r@ils3nvy wrote:

> Hi,
> 
> Im just starting RoR so forgive me if I ask some stupid questions. Is  
> it easier to create the a DB with a couple of tables through ruby on  
> rails or can I just as easily work with the DB if I already created it  
> through a front end app like HeidiSQL?

It should work either way, but rails apps need to have a column called  
id for every table and that id needs to be the key. As long as you have  
that for all your tables you should be golden. It would, however, be a  
good idea to create your tables - if you can - using rails because it  
can automagically generate the structure for you and in that way you can  
insure that the tables were constructed properly.

-S
