What does "slug" mean

DatabaseCouchdb

Database Problem Overview


> Possible Duplicate:
> What is the etymology of 'slug'?

In CouchDB definitive guide the author used key "slug" in a document.

{
   "title": "Hello World",
   "slug": "hello_world"
}

What does "slug" mean and why is it used?

Database Solutions


Solution 1 - Database

A slug is an alternative to a name that would otherwise not be acceptable for various reasons - e.g. containing special characters, too long, mixed-case, etc. - appropriate for the target usage. What target usage means is context dependent, but could include usage in a URL or name of a file or database table for example. In the general case a slug may be composed from a combination of multiple fields; in the above case, only one field is used - title.

Have a look at these SOqs, too:

If you are into the origin of the term, see this:

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionajsieView Question on Stackoverflow
Solution 1 - Databaseicyrock.comView Answer on Stackoverflow