Summary: yes you can have a numerical ID in your URL but you have to be careful with naming (if any), keep Google News in mind (if that matters), and realize that words carry more meaning than numbers.
What Do You Mean With Numerical ID's?
A URL can contain a number to identify to the website itself what data that URL should get from the database powering the site.
Example. A site may have a URL example.com/category/42 or example.com/post/42
The number corresponds to the ID of the category or post (or ecommerce item or… etc etc).
Why Use Numerical ID's?
Numbers are a fast and efficient way of mapping something (a number) to something else (an article). You can think of telephone numbers, for example.
Words are much less precise because they are much less unique. With numbers for every new article you just go to the next number. With words you have to come up with a unique combination, one that isn't in use in your database yet.
I Heard There Are Drawbacks To Numbers in URL's?
Partly true. Some numbers in some URL's are dynamic and change per user. Instead of using numbers to make one unique URL for many visitors, those numbers try to create one unique user per visit — and so end up making many URL's. That's precisely what search engines do not want.
Those numbers are called session ID's. There's never a good reason to have them in your URLs — I can't think of a single one.
Any Other Caveats?
The other thing is that if you do not use a Google News sitemap and want to be in Google News your URL's must contain a unique number of at least 3 digits.
And then the clincher for me: example.com/coffee/espresso not only makes sense to people; it makes sense to search engines as well. Example.com/42/24 not so much.
- URL's can and may have numerical ID's in them
- the benefit is that numerical ID's are efficiently matched against database entries
- words are often less immediately efficient for a database
- but words carry more meaning with people and search engines
My paid passion at Search Engine People sees me applying my passions and knowledge to a wide array of problems, ones I usually experience as challenges. People who know me know I love coffee.