9

So I read this What is the difference between a URI, a URL and a URN? but I'm still not sure whether it's a database URL or URI.

For example MySQL could have something like this:

mysql+mysqldb://scott:tiger@localhost/test?charset=utf8&use_unicode=0

Is this an URL or URI?

Community
  • 1
  • 1
Patrik Lippojoki
  • 1,523
  • 3
  • 17
  • 21
  • did you read all the way through? The one with the highest votes exactly describes what you need – davejal Jan 31 '17 at 19:46
  • Possible duplicate of [What is the difference between a URI, a URL and a URN?](http://stackoverflow.com/questions/176264/what-is-the-difference-between-a-uri-a-url-and-a-urn) – davejal Jan 31 '17 at 19:46
  • 2
    @davejal I hope you're not serious? I did read, why else would I ask? -.- – Patrik Lippojoki Jan 31 '17 at 19:54
  • This pic https://i.stack.imgur.com/HGWwt.png say all URL are URI and same for this https://i.stack.imgur.com/RKFwk.png but this pic https://i.stack.imgur.com/IeX0x.png disgaree, – Patrik Lippojoki Jan 31 '17 at 21:01

1 Answers1

6

I think the link in the comments is good enough but I can see there is a need for a TLDR;.

Here is my take on it:

  • A URI is the generic version -- it includes everything as optional.

  • A URL not only includes the location it also include how to work on that location (eg http:// for the protocol).

  • A URN is just the name that should be unique, it can look like a URI or URL but the semantics (being unique) are what define it. (eg https://stackoverflow.com/users/215752/hogan)

This is the quick version --- there might be minor inaccuracies and side cases but maybe this gets you going in the right direction?

Hat tip: If it still exists feel free to look at the wikipedia entry. I believe it is clearer than the answer mentioned in the comments.

The answer to your question is that it is both a URL and a URI

Community
  • 1
  • 1
Hogan
  • 63,843
  • 10
  • 75
  • 106