Topic: One table that relates to itself?

I am building a database that will hold points of interest but instead of creating a Continent table and a Country table and a Region table, etc. I just want to create one table called Spots where I can put all the Continents, then Countries, then Regions and then Spots and have them relate upwards. For example, North America is parent of USA is parent of California is parent of Santa Cruz is parent of Santa Cruz Diner.

I created a table called Spots with id, name and spot_id and I put has_many :spots in the spot.rb file, but it doesn't seem to work.

How do I do this?

Re: One table that relates to itself?

You'd also have to have it belong_to itself I think..

Also check out acts_as_tree which gives you a bunch of extra methods to play with..