can't figure out the differnece between URI, URN and URL

This is a discussion on can't figure out the differnece between URI, URN and URL within the Tech Board forums, part of the Community Boards category; I tried reading the W3C article but it confused me. I also red wikipedia and it confused me because if ...

  1. #1
    Registered User
    Join Date
    Apr 2010
    Location
    Vancouver
    Posts
    116

    can't figure out the differnece between URI, URN and URL

    I tried reading the W3C article but it confused me. I also red wikipedia and it confused me because if a book in a library has an ISBN wouldn't that be a URL because there is a system for finding a book given it's ISBN?

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    I have a book with ISBN 978-0-321-55944-9. Tell me where in my house it is.

  3. #3
    Registered User
    Join Date
    Nov 2010
    Location
    Long Beach, CA
    Posts
    5,459
    Quote Originally Posted by Wikipedia URI article
    The ISBN system for uniquely identifying books provides a typical example of the use of URNs. ISBN 0486275574 (urn:isbn:0-486-27557-4) cites unambiguously a specific edition of Shakespeare's play Romeo and Juliet. To gain access to this object and read the book, one needs its location: a URL address.
    ...
    For example, the URN urn:isbn:0-395-36341-1 is a URI that specifies the identifier system, i.e. International Standard Book Number (ISBN), as well as the unique reference within that system and allows one to talk about a book, but doesn't suggest where and how to obtain an actual copy of it.
    The ISBN doesn't help you find the book, it only tells you what book it is - author, publisher, version, etc. That makes it a URN. If you want a book analogy, the Dewey decimal system might be closer to a URL, since it tells you in what section of a library to find the book.

  4. #4
    Registered User
    Join Date
    Apr 2010
    Location
    Vancouver
    Posts
    116
    I get it about the ISBN now. So a URI can be either a URN or URL?
    It confuses me when they say the URL has a scheme such as "http or ftp" isn't that the protocol?

  5. #5
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,436
    Never really liked the book analogy. No idea why they keep insisting doing it since it is actually a bad analogy. No idea why they just don't show web addresses...

    The terms are almost interchangeable these days. They all refer to the same thing; i.e. the address (or location) of some resource. The difference between the three is what exactly the address is pointing to and whether the address includes the protocol (the standard specifications refers to this has the schema) or not. So:

    Code:
    http://cboard.cprogramming.com/tech-board/138678-cant-figure-out-differnece-between-uri-urn-url.html
    This is a URL. The protocol is defined (http). As well as a valid address to a document. No location in that document is defined.

    Code:
    http://cboard.cprogramming.com/tech-board/138678-cant-figure-out-differnece-between-uri-urn-url.html#post1032171
    This is a URI. The protocol is defined (http). A valid address to a document is defined. And a valid location in that document is defined.

    Code:
    cboard.cprogramming.com/tech-board/138678-cant-figure-out-differnece-between-uri-urn-url.html#post1032171
    This is a URN. It's the same as a URI, but no protocol is defined.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  6. #6
    Registered User
    Join Date
    Apr 2010
    Location
    Vancouver
    Posts
    116
    Thanks! got it

  7. #7
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,436
    Since a URI is also a URL and since webservers default to http, when specifying any type of valid address reachable through http, you can safely call it a URL. The distinction in terms is only necessary when you want to be technical, or perhaps when discussing addresses in the context of how a webserver sees them.

    Also, for any webserver implementing a default document, addresses the likes of http://cboard.cprogramming.com, are URLs too, since the document portion will expand to something like default.htm, index.html, etc.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Who can figure this one out?
    By jturner38 in forum C Programming
    Replies: 6
    Last Post: 03-08-2009, 11:39 AM
  2. What is the differnece between long and int?
    By forumuser in forum C Programming
    Replies: 9
    Last Post: 02-12-2008, 09:27 AM
  3. see how many can figure this out.
    By tdogg689 in forum C Programming
    Replies: 6
    Last Post: 05-16-2004, 07:21 PM
  4. Can't Figure this out
    By Unregistered in forum C++ Programming
    Replies: 7
    Last Post: 07-08-2002, 03:33 PM
  5. i can't figure this out
    By m00se123 in forum C++ Programming
    Replies: 10
    Last Post: 05-25-2002, 08:56 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21