# Proper database setup/import

**URL:** <https://www.ruby-forum.com/t/proper-database-setup-import/111467>\
**Category:** Rails\
**Created:** [August 7, 2007, 5:57pm UTC](https://www.ruby-forum.com/t/proper-database-setup-import/111467 "2007-08-07T17:57:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [August 7, 2007, 5:57pm UTC](https://www.ruby-forum.com/t/proper-database-setup-import/111467/1 "2007-08-07T17:57:25Z")

</div>

Excuse my newbiness I am just learning Ruby/Rails.  
What way would be correct or is there another way?

Lets say I have a single excel file of cities, counties, states that I  
want to import into mysql for a Rails project.  
Do I import each category (city, county, state) into separate tables  
or all into one table? I guess I would need to know the proper way to  
do this in order to create the has\_many relationships. I also want to  
maintain the relationships that exist in the excel file such as what  
city is in what county.

Thanks in advance
