Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Database URI or URL?

Tags:

url

sql

uri

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?

like image 328
Patrik Lippojoki Avatar asked Jan 31 '17 19:01

Patrik Lippojoki


People also ask

What is the URI of a database?

A Uniform Resource Identifier (URI) is a unique sequence of characters that identifies a logical or physical resource used by web technologies. URIs may be used to identify anything, including real-world objects, such as people and places, concepts, or information resources such as web pages and books.

Is URI same as URL?

URL and URI, both crucial concepts of the web, are terms that are often interchanged and used. However, they are not the same. The URI can represent both the URL and the URN of a resource, simultaneously, while URL can only specify the address of the resource on the internet.

What is URI in SQL?

A connection URI is a connection string that contains parameters required to connect to SQL Server.

What is the difference between URL URI and urn?

URI (uniform resource identifier) identifies a resource (text document, image file, etc) URL (uniform resource locator) is a subset of the URIs that include a network location. URN (uniform resource name) is a subset of URIs that include a name within a given space, but no location.


1 Answers

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

like image 174
Hogan Avatar answered Sep 24 '22 13:09

Hogan