<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Unique Keys versus IDs in Web Applications</title>
	<atom:link href="http://lostechies.com/chrismissal/2010/02/25/unique-keys-versus-ids-in-web-applications/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/chrismissal/2010/02/25/unique-keys-versus-ids-in-web-applications/</link>
	<description>Thoughts while working and playing as a Software Developer</description>
	<lastBuildDate>Mon, 10 Jun 2013 15:59:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
	<item>
		<title>By: Andrei Rinea</title>
		<link>http://lostechies.com/chrismissal/2010/02/25/unique-keys-versus-ids-in-web-applications/#comment-171</link>
		<dc:creator>Andrei Rinea</dc:creator>
		<pubDate>Wed, 17 Mar 2010 16:22:32 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chrismissal/archive/2010/02/24/unique-keys-versus-ids-in-web-applications.aspx#comment-171</guid>
		<description>You could have provided an example of a human-readable key in a web application as the last part of the URL of this very post ;)</description>
		<content:encoded><![CDATA[<p>You could have provided an example of a human-readable key in a web application as the last part of the URL of this very post ;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: J</title>
		<link>http://lostechies.com/chrismissal/2010/02/25/unique-keys-versus-ids-in-web-applications/#comment-170</link>
		<dc:creator>J</dc:creator>
		<pubDate>Sun, 28 Feb 2010 11:17:56 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chrismissal/archive/2010/02/24/unique-keys-versus-ids-in-web-applications.aspx#comment-170</guid>
		<description>This is called Surrogate keys (autogenerated, no business meaning) vs Business keys.

Surrogate keys are widely accepted and considered as a best practice in enterprise programming, because of:
-flexibility when requirements change
-performance
-db merging
-immutability

Your database design shouldn&#039;t suffer because of SEO decisions, it should be independent. If you need business keys for your webapp, you can take candidate key and put some unique constraints on it.</description>
		<content:encoded><![CDATA[<p>This is called Surrogate keys (autogenerated, no business meaning) vs Business keys.</p>
<p>Surrogate keys are widely accepted and considered as a best practice in enterprise programming, because of:<br />
-flexibility when requirements change<br />
-performance<br />
-db merging<br />
-immutability</p>
<p>Your database design shouldn&#8217;t suffer because of SEO decisions, it should be independent. If you need business keys for your webapp, you can take candidate key and put some unique constraints on it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nicolas</title>
		<link>http://lostechies.com/chrismissal/2010/02/25/unique-keys-versus-ids-in-web-applications/#comment-169</link>
		<dc:creator>Nicolas</dc:creator>
		<pubDate>Sun, 28 Feb 2010 09:44:07 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chrismissal/archive/2010/02/24/unique-keys-versus-ids-in-web-applications.aspx#comment-169</guid>
		<description>The problem with key that are meaningfull is that the sooner or later, you data model will change.


So the textual key will not be unique or usefull anymore... 

And maybe you&#039;ll change the title, naming of an item in your database (bacause of a typo for exemple). If the item is identified by a number, it will not change. If the ID is made with the item label or name, then the key will change.

It not so good for user, but very very bad for you software. More more mantenance cost, higher risk of bugs and all.</description>
		<content:encoded><![CDATA[<p>The problem with key that are meaningfull is that the sooner or later, you data model will change.</p>
<p>So the textual key will not be unique or usefull anymore&#8230; </p>
<p>And maybe you&#8217;ll change the title, naming of an item in your database (bacause of a typo for exemple). If the item is identified by a number, it will not change. If the ID is made with the item label or name, then the key will change.</p>
<p>It not so good for user, but very very bad for you software. More more mantenance cost, higher risk of bugs and all.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MC</title>
		<link>http://lostechies.com/chrismissal/2010/02/25/unique-keys-versus-ids-in-web-applications/#comment-168</link>
		<dc:creator>MC</dc:creator>
		<pubDate>Sun, 28 Feb 2010 09:10:46 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chrismissal/archive/2010/02/24/unique-keys-versus-ids-in-web-applications.aspx#comment-168</guid>
		<description>We use GUIDs in our current project, because the database generated keys are only unique to that instance. When it will late become necessary to merge databases, we&#039;d have a huge problem. A key server has been discussed, though.</description>
		<content:encoded><![CDATA[<p>We use GUIDs in our current project, because the database generated keys are only unique to that instance. When it will late become necessary to merge databases, we&#8217;d have a huge problem. A key server has been discussed, though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean</title>
		<link>http://lostechies.com/chrismissal/2010/02/25/unique-keys-versus-ids-in-web-applications/#comment-167</link>
		<dc:creator>Sean</dc:creator>
		<pubDate>Fri, 26 Feb 2010 16:16:42 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chrismissal/archive/2010/02/24/unique-keys-versus-ids-in-web-applications.aspx#comment-167</guid>
		<description>@Scott -- while I&#039;ll admit there are &quot;more mature and user-friendly web application development platforms&quot; out there, I fail to see how this translates to entertaining &quot;arbitrary constraints&quot;.  

Yes, folks should be encouraged to look outside the .NET domain, but by the same token, what is wrong with encouraging them to look within it? I don&#039;t see an issue with some folks promoting the n-stack and other promoting alternative and possibly more mature, better, way easier to use stacks.

Why does goodness and happiness == not using .NET?  Or to put it a different way, what is wrong with folks using a possibly less mature, inferior, harder to use technology if they *want* to?

Personally I think that people will be much happier if they are given options and allowed to make their own choices, rather than guided towards any particular web development platform.  If I want to use ASP MVC I&#039;ll look for guidance specific to it, if I want to use Spring or ROR I&#039;ll look for guidance specific to them. </description>
		<content:encoded><![CDATA[<p>@Scott &#8212; while I&#8217;ll admit there are &#8220;more mature and user-friendly web application development platforms&#8221; out there, I fail to see how this translates to entertaining &#8220;arbitrary constraints&#8221;.  </p>
<p>Yes, folks should be encouraged to look outside the .NET domain, but by the same token, what is wrong with encouraging them to look within it? I don&#8217;t see an issue with some folks promoting the n-stack and other promoting alternative and possibly more mature, better, way easier to use stacks.</p>
<p>Why does goodness and happiness == not using .NET?  Or to put it a different way, what is wrong with folks using a possibly less mature, inferior, harder to use technology if they *want* to?</p>
<p>Personally I think that people will be much happier if they are given options and allowed to make their own choices, rather than guided towards any particular web development platform.  If I want to use ASP MVC I&#8217;ll look for guidance specific to it, if I want to use Spring or ROR I&#8217;ll look for guidance specific to them. </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Bellware</title>
		<link>http://lostechies.com/chrismissal/2010/02/25/unique-keys-versus-ids-in-web-applications/#comment-166</link>
		<dc:creator>Scott Bellware</dc:creator>
		<pubDate>Thu, 25 Feb 2010 19:57:52 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chrismissal/archive/2010/02/24/unique-keys-versus-ids-in-web-applications.aspx#comment-166</guid>
		<description>PS:

Regarding your response to Annie:

&gt; @ajepst agreed, but as a shopper, i&#039;m not going to look for them in the
&gt; number coded aisle since I don&#039;t know the numbers

The cognitive processes involved here are predicated more on graph traversal and specialization than on identification. In this case, the usability design is quite a bit more involved than creating mnemonics.

You&#039;re not using direct access when narrowing down the location of vegetables, you&#039;re using relative access. Mnemonics are direct access mechanisms. These two different kinds of scenarios are polar opposites of each other in respect to usability design.

There are specific contexts where direct access mechanisms are useful to a general population of users, and when they are, they&#039;re rarely served by a mechanism like an browser&#039;s address bar.

Again, the great benefit of semantic resource addresses is SEO. And it&#039;s fine to make use of them then, but semantic resource addresses aren&#039;t a boon to usability. In any scenario where they might be useful, more terse mnemonics almost always serve the user better.</description>
		<content:encoded><![CDATA[<p>PS:</p>
<p>Regarding your response to Annie:</p>
<p>> @ajepst agreed, but as a shopper, i&#8217;m not going to look for them in the<br />
> number coded aisle since I don&#8217;t know the numbers</p>
<p>The cognitive processes involved here are predicated more on graph traversal and specialization than on identification. In this case, the usability design is quite a bit more involved than creating mnemonics.</p>
<p>You&#8217;re not using direct access when narrowing down the location of vegetables, you&#8217;re using relative access. Mnemonics are direct access mechanisms. These two different kinds of scenarios are polar opposites of each other in respect to usability design.</p>
<p>There are specific contexts where direct access mechanisms are useful to a general population of users, and when they are, they&#8217;re rarely served by a mechanism like an browser&#8217;s address bar.</p>
<p>Again, the great benefit of semantic resource addresses is SEO. And it&#8217;s fine to make use of them then, but semantic resource addresses aren&#8217;t a boon to usability. In any scenario where they might be useful, more terse mnemonics almost always serve the user better.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Bellware</title>
		<link>http://lostechies.com/chrismissal/2010/02/25/unique-keys-versus-ids-in-web-applications/#comment-165</link>
		<dc:creator>Scott Bellware</dc:creator>
		<pubDate>Thu, 25 Feb 2010 19:47:06 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chrismissal/archive/2010/02/24/unique-keys-versus-ids-in-web-applications.aspx#comment-165</guid>
		<description>Personally, I think that many more people could have much more happiness if they could be guided through the fear that blocks them from using more mature and user-friendly web application development platforms. There&#039;s undoubtedly value in clarifying the use of ASP MVC, but there&#039;s quite possibly even greater value in beginning the work to transition away from it. If the goal is goodness and happiness, then we shouldn&#039;t really entertain such arbitrary constraints. After all, there was a time years ago when we had to fight to transition companies on to ASP .NET. We have nothing but countless precedent that shows that the same thing can be done again.</description>
		<content:encoded><![CDATA[<p>Personally, I think that many more people could have much more happiness if they could be guided through the fear that blocks them from using more mature and user-friendly web application development platforms. There&#8217;s undoubtedly value in clarifying the use of ASP MVC, but there&#8217;s quite possibly even greater value in beginning the work to transition away from it. If the goal is goodness and happiness, then we shouldn&#8217;t really entertain such arbitrary constraints. After all, there was a time years ago when we had to fight to transition companies on to ASP .NET. We have nothing but countless precedent that shows that the same thing can be done again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Missal</title>
		<link>http://lostechies.com/chrismissal/2010/02/25/unique-keys-versus-ids-in-web-applications/#comment-164</link>
		<dc:creator>Chris Missal</dc:creator>
		<pubDate>Thu, 25 Feb 2010 19:20:32 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chrismissal/archive/2010/02/24/unique-keys-versus-ids-in-web-applications.aspx#comment-164</guid>
		<description>Scott,

You bring up some very good points. I would say that I can remember numbers fairly well when associating them with a single idea or another value. Things like zip codes, area codes, addresses, birthdays, and so on. I see the problem with web sites that use these numbers as a way to access content. Sites that serve up images or file downloads are hard to search if they don&#039;t have much for text content. Unfortunately I find that this is often the case. In other words, I can&#039;t think of a single web page or article or anything to which I know the content that has an address like http://www.sample.com/705.

If those sites did have great content and I could find anything I wanted to with ease, there&#039;s still the need for many web sites to attract new visitors through an open search like Google. They put a lot of weight on the URL (along with the title and h1 tags), so you&#039;re going to lose some relevance by not putting some text there, along with, or instead of, those numeric values. 

While sharing my ideas here, I&#039;d love to write about ideas and thoughts on the best of the best. I do nearly all of my work within MVC for my company, so my writing is usually within the .Net and ASP.NET MVC space. I never expect to give an ideal post to everybody, but if there are some readers out there that can benefit from this, I&#039;ll be happy.</description>
		<content:encoded><![CDATA[<p>Scott,</p>
<p>You bring up some very good points. I would say that I can remember numbers fairly well when associating them with a single idea or another value. Things like zip codes, area codes, addresses, birthdays, and so on. I see the problem with web sites that use these numbers as a way to access content. Sites that serve up images or file downloads are hard to search if they don&#8217;t have much for text content. Unfortunately I find that this is often the case. In other words, I can&#8217;t think of a single web page or article or anything to which I know the content that has an address like <a href="http://www.sample.com/705" rel="nofollow">http://www.sample.com/705</a>.</p>
<p>If those sites did have great content and I could find anything I wanted to with ease, there&#8217;s still the need for many web sites to attract new visitors through an open search like Google. They put a lot of weight on the URL (along with the title and h1 tags), so you&#8217;re going to lose some relevance by not putting some text there, along with, or instead of, those numeric values. </p>
<p>While sharing my ideas here, I&#8217;d love to write about ideas and thoughts on the best of the best. I do nearly all of my work within MVC for my company, so my writing is usually within the .Net and ASP.NET MVC space. I never expect to give an ideal post to everybody, but if there are some readers out there that can benefit from this, I&#8217;ll be happy.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Bellware</title>
		<link>http://lostechies.com/chrismissal/2010/02/25/unique-keys-versus-ids-in-web-applications/#comment-163</link>
		<dc:creator>Scott Bellware</dc:creator>
		<pubDate>Thu, 25 Feb 2010 16:20:06 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chrismissal/archive/2010/02/24/unique-keys-versus-ids-in-web-applications.aspx#comment-163</guid>
		<description>Chris,

I&#039;m quite interested in your comment about numeric ID&#039;s not being memorable. I don&#039;t believe that&#039;s so. I don&#039;t believe this for two reasons: I&#039;ve observed the contrary, and the things that cause memory imprinting are not inconsistent with numeric ID&#039;s. Memories are made by either repetition or by significance.

Users tend to work with some data more than others. They tend to remember the ID&#039;s or codes that act as mnemonics for these data. It can take some time to imprint these memories, but they are often sooner or later made. A user will also remember a datum when it&#039;s significant to their work. For example, we remember the project codes and job codes for the work we usually do and record into time tracking and billing apps.

Ultimately though, we shouldn&#039;t be creating user experiences whose successes are predicated upon remembering data identifiers. We shouldn&#039;t even be having this conversation as an issue of usability of identifiers. If we&#039;re talking about this as a usability issue, then we&#039;re far from the root cause and we&#039;re merely tweaking the manifestations rather than the source.

Case in point: I don&#039;t remember the identifiers for articles I read on the web - whether they&#039;re identified by a date-based ID or by a textual slug. Neither of these identifiers imprint memories unless I explicitly work to create the memories. I can, however, use the particles of memory that I do have about an article and search for that article.

On the issue of SEO, the text of the link is valuable for ranking, but ranking is only an issue when using general, open searches like Google. If I remember the application or website that owns the data that I want to use, then I&#039;m not confined to general, open searches. I can use the application or website&#039;s own search features. If those features don&#039;t exists, then we may have a root cause issue to look at in that case.

Lastly, I find it extremely disheartening that the .NET web community is still trying to deal with these kinds of implementation issues. Better, more mature web platforms have offered direct support for these kinds of things for a number of years. I sincerely wish that there was more open, best-of-breed thinking in this community. Especially because the adopters of ASP MVC were supposed to be the open-minded, best-tool-for-the-job people. I&#039;m just not seeing that trait expressed anymore. It really just appears that the goal is to continue to use .NET at all costs, even when it&#039;s more costly to do so and when there are platforms available that show .NET web platforms to be rather crude and primitive.</description>
		<content:encoded><![CDATA[<p>Chris,</p>
<p>I&#8217;m quite interested in your comment about numeric ID&#8217;s not being memorable. I don&#8217;t believe that&#8217;s so. I don&#8217;t believe this for two reasons: I&#8217;ve observed the contrary, and the things that cause memory imprinting are not inconsistent with numeric ID&#8217;s. Memories are made by either repetition or by significance.</p>
<p>Users tend to work with some data more than others. They tend to remember the ID&#8217;s or codes that act as mnemonics for these data. It can take some time to imprint these memories, but they are often sooner or later made. A user will also remember a datum when it&#8217;s significant to their work. For example, we remember the project codes and job codes for the work we usually do and record into time tracking and billing apps.</p>
<p>Ultimately though, we shouldn&#8217;t be creating user experiences whose successes are predicated upon remembering data identifiers. We shouldn&#8217;t even be having this conversation as an issue of usability of identifiers. If we&#8217;re talking about this as a usability issue, then we&#8217;re far from the root cause and we&#8217;re merely tweaking the manifestations rather than the source.</p>
<p>Case in point: I don&#8217;t remember the identifiers for articles I read on the web &#8211; whether they&#8217;re identified by a date-based ID or by a textual slug. Neither of these identifiers imprint memories unless I explicitly work to create the memories. I can, however, use the particles of memory that I do have about an article and search for that article.</p>
<p>On the issue of SEO, the text of the link is valuable for ranking, but ranking is only an issue when using general, open searches like Google. If I remember the application or website that owns the data that I want to use, then I&#8217;m not confined to general, open searches. I can use the application or website&#8217;s own search features. If those features don&#8217;t exists, then we may have a root cause issue to look at in that case.</p>
<p>Lastly, I find it extremely disheartening that the .NET web community is still trying to deal with these kinds of implementation issues. Better, more mature web platforms have offered direct support for these kinds of things for a number of years. I sincerely wish that there was more open, best-of-breed thinking in this community. Especially because the adopters of ASP MVC were supposed to be the open-minded, best-tool-for-the-job people. I&#8217;m just not seeing that trait expressed anymore. It really just appears that the goal is to continue to use .NET at all costs, even when it&#8217;s more costly to do so and when there are platforms available that show .NET web platforms to be rather crude and primitive.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
