I am not sure if this is best practice or not. or it is a stupid
question.
Using static name as unique key instead of id in some table.
What I mean by static name is the unique name from the actual field name
For example : "San francisco" become "san_francisco" (it automatically
replace space or others not character to "_")
Reason to use this way
1. User friendly url
so someone can type domain.com/san_francisco
Cons of not using it
1. need to customize route.rb to use static name
2. others table that reference this
3. performance in database indexing
4. slower database query
5. Others table start to use "static_name" instead of id to reference to
this table