Skip to content

Instantly share code, notes, and snippets.

@vicly
Created May 29, 2019 23:33
Show Gist options
  • Save vicly/ba37e655c282e1a101054c3ace0d99fd to your computer and use it in GitHub Desktop.
Save vicly/ba37e655c282e1a101054c3ace0d99fd to your computer and use it in GitHub Desktop.
[slug] #Note

A slug is a part of the URL when you are accessing a resource.

http://localhost/cars/audi-a6/ could maps to

// 0 or 1 record expected
select * from car_table where brand='audi' and model='a6';

http://www.bbc.co.uk/news/world-africa-24506006 could maps to

// world-africa => connect to physical database "africa_news"
// and then
select * from posts where post_id='24506006' # suppose 24506006 is unique within a physical DB.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment