tag:blogger.com,1999:blog-426922399870577072.post7592387086414602969..comments2024-03-29T01:50:29.775-04:00Comments on The Database Programmer: Database Skills: A Sane Approach To Choosing Primary KeysKenDownshttp://www.blogger.com/profile/11117175783163937575noreply@blogger.comBlogger34125tag:blogger.com,1999:blog-426922399870577072.post-29161646794395701592020-12-02T07:39:19.229-05:002020-12-02T07:39:19.229-05:00At first, reach the Roku channel store and move to...At first, reach the Roku channel store and move to the TV and Movies section. Look for the Hulu app and choose it to install. Once after that, access the app, sign in, and then get the channel link code. Open a browser and navigate to <a href="https://www.activate-hulu-com.com/" rel="nofollow">www.hulu.com/activate</a>. Now, key in the link code and start with the activation process.www-hulu-com-activatehttps://www.blogger.com/profile/03611212941769609764noreply@blogger.comtag:blogger.com,1999:blog-426922399870577072.post-19921929109637659962020-04-15T04:17:17.855-04:002020-04-15T04:17:17.855-04:00www.hulu. com/activate – For hulu channel activati...<a href="http://comsetup.website/" rel="nofollow">www.hulu. com/activate</a> – For hulu channel activation, just start with hulu login or starts with hulu activate guide to watch all your favorite movies, TV shows, news, and live sports just a click away at <a href="http://comsetup.website/" rel="nofollow">hulu.com/activate</a> and enter hulu activation code.<br /><br /><a href="https://www.huluucomhulu.com/" rel="nofollow">www.hulu. com/activate</a> – hulu activate guide to watch all your favorite movies, TV shows, news, and live sports just a click away at <a href="https://www.huluucomhulu.com/" rel="nofollow">hulu.com/activate</a> and enter hulu activation code.<br /><br /><a href="https://www.huluucomhulu.com/" rel="nofollow">www.hulu.com/activate</a> – For hulu channel activation, just start with hulu login or starts with hulu activate guide to watch all your favorite movies, TV shows, news, and live sports just a click away at <a href="https://www.huluucomhulu.com/" rel="nofollow">hulu.com/activate</a> and enter hulu activation code.<br />sarah johnsonhttps://www.blogger.com/profile/06501540333823739575noreply@blogger.comtag:blogger.com,1999:blog-426922399870577072.post-37463614205391796572020-02-18T05:58:15.152-05:002020-02-18T05:58:15.152-05:00Norton Antivirus is one the most widely used and t...<br />Norton Antivirus is one the most widely used and trusted anti-virus software in the world managing to protect users of all knowledge levels and all hardware configurations against malicious software threat that are targeting Windows-powered services and privacy of their users. It efficiently detects and removes viruses, worms, Trojans and countless other types <a href="http://getsoftclues.com/my-setup" rel="nofollow">norton.com/setup</a><br /> of threats automatically, without intruding on your …Chanchalhttps://www.blogger.com/profile/01460406828958178025noreply@blogger.comtag:blogger.com,1999:blog-426922399870577072.post-8427329741660316072020-02-18T05:54:53.878-05:002020-02-18T05:54:53.878-05:00Accomplish more with OneDrive and Office 365 Creat...Accomplish more with OneDrive and Office 365 Create cleaned records, open bits of knowledge, present with lucidity, and team up <a href="http://getsoftclues.com/myaccount" rel="nofollow">office.com/myaccount</a> continuously utilizing Office 365.<br />Chanchalhttps://www.blogger.com/profile/01460406828958178025noreply@blogger.comtag:blogger.com,1999:blog-426922399870577072.post-37055611457315855362020-02-18T05:48:29.856-05:002020-02-18T05:48:29.856-05:00enter avg retail activation code to install and ac...enter avg retail activation code to install and activate your avg antivirus software instantly.to download avg visit : <a href="http://setmyanti.com/avg.html" rel="nofollow">avg.com/retail</a> for more details.<br />Chanchalhttps://www.blogger.com/profile/01460406828958178025noreply@blogger.comtag:blogger.com,1999:blog-426922399870577072.post-19837161812670659452020-02-18T05:42:49.340-05:002020-02-18T05:42:49.340-05:00Install 123 HP Printer Driver, Software Downloads ...Install 123 HP Printer Driver, Software Downloads How to install a local printer in computer or mobile devices. Hit a Start button in your computing devices and click <a href="http://setmyanti.com/hp.html" rel="nofollow">123.hp.com/setup</a><br /> a control panel on a Start menu.Chanchalhttps://www.blogger.com/profile/01460406828958178025noreply@blogger.comtag:blogger.com,1999:blog-426922399870577072.post-14268170414159391842020-02-18T05:36:15.967-05:002020-02-18T05:36:15.967-05:00To enact Hulu Plus on your gadget, either utilize ...To enact Hulu Plus on your gadget, either utilize the on-screen console to enter your Hulu sign in data or go to and enter the gadget initiation code. Both of these strategies will <br /><a href="http://setmyanti.com/hulu.html" rel="nofollow">hulu.com/activate</a> enable you to utilize Hulu on any Hulu-upheld gadget.<br />Chanchalhttps://www.blogger.com/profile/01460406828958178025noreply@blogger.comtag:blogger.com,1999:blog-426922399870577072.post-88777091491122101352020-02-18T05:33:31.023-05:002020-02-18T05:33:31.023-05:00The Roku Channel is your home for nothing and prem...The Roku Channel is your home for nothing and premium , anyplace you go. Stream many hit films, famous shows, all day, every day live news, and more for nothing. Effectively include and oversee Premium Subscriptions like Showtime, Starz, and Epix with one login <br /><a href="http://setmyanti.com/roku.html" rel="nofollow">roku.com/link</a> , one bill, and one spot to stream them all.<br />Chanchalhttps://www.blogger.com/profile/01460406828958178025noreply@blogger.comtag:blogger.com,1999:blog-426922399870577072.post-45734164156790668622020-02-18T05:30:17.565-05:002020-02-18T05:30:17.565-05:00McAfee is centered around your security and gives ...McAfee is centered around your security and gives a gathering of free McAfee instruments to help in your security affirmation. Just select a mechanical <br /><a href="http://setmyanti.com/mcafee.html" rel="nofollow">mcafee activate product key</a><br /> assembly and download it in nothing. Chanchalhttps://www.blogger.com/profile/01460406828958178025noreply@blogger.comtag:blogger.com,1999:blog-426922399870577072.post-3468620557582032992016-06-09T18:37:51.706-04:002016-06-09T18:37:51.706-04:00Hi Ken
Very nice article. I have one question to ...Hi Ken<br /><br />Very nice article. I have one question to ask you. What is the difference between a transaction table and a cross-reference table?AKhttps://www.blogger.com/profile/14507910950849784888noreply@blogger.comtag:blogger.com,1999:blog-426922399870577072.post-41465577939692069202015-03-20T10:27:06.804-04:002015-03-20T10:27:06.804-04:00This doesn't hold water: "they are still ...This doesn't hold water: "they are still just identifiers, which happen to be easier to work with because they are less abstract." It's pretty abstract if JSMITH maps to Joan Jones. Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-426922399870577072.post-2430389005584949332015-03-20T10:20:47.171-04:002015-03-20T10:20:47.171-04:00I thought exactly the same thing: "I think yo...I thought exactly the same thing: "I think you've argued against your tip #2."Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-426922399870577072.post-23118179886916139752012-08-28T23:44:10.437-04:002012-08-28T23:44:10.437-04:00Really Really good article. Thanks for writing. ...Really Really good article. Thanks for writing. Nice to see someone that bucks the "this is how its always been done mentality" Kudos!Richardhttps://www.blogger.com/profile/11078434611780935740noreply@blogger.comtag:blogger.com,1999:blog-426922399870577072.post-61286276389172652972012-04-27T11:06:21.245-04:002012-04-27T11:06:21.245-04:00@Eric, it is not simpler to have an objectId for a...@Eric, it is not simpler to have an objectId for any particular ad-hoc program, the PK is fine. But for library code it is simpler if the code can always assume the existence of some column such as "UniversalID" that it can use for SELECT, UPDATE, and DELETE. Makes the generation of SQL commands easier.KenDownshttps://www.blogger.com/profile/11117175783163937575noreply@blogger.comtag:blogger.com,1999:blog-426922399870577072.post-75238337449860252792012-04-26T16:23:39.866-04:002012-04-26T16:23:39.866-04:00I'm with you on everything but object ids. I d...I'm with you on everything but object ids. I don't think you really presented any good arguments about them. How does this make anything simpler for programs? What is the advantage for ui code? Why can't it simply use the PK? I've never used such a thing and never run into difficulty that made me think "if only I had another unique key that isn't the PK!".Eric J. Schwarzenbachhttps://www.blogger.com/profile/01765639465111862484noreply@blogger.comtag:blogger.com,1999:blog-426922399870577072.post-60893529585025438102011-04-13T14:27:39.948-04:002011-04-13T14:27:39.948-04:00PostgreSQL works just fine using TEXT primary colu...PostgreSQL works just fine using TEXT primary columns.François Beausoleilhttp://blog.teksol.info/noreply@blogger.comtag:blogger.com,1999:blog-426922399870577072.post-23054557735338233012011-04-13T13:10:44.720-04:002011-04-13T13:10:44.720-04:00François, Use varchar (or possibly nvarchar if you...François, Use varchar (or possibly nvarchar if you will be getting UTF-16) for the url field. Also cap it at like 1024 characters, not max. I don't even know if a text field can be a primary key.zippy1981https://www.blogger.com/profile/15771103697556009092noreply@blogger.comtag:blogger.com,1999:blog-426922399870577072.post-66787525618681463902011-04-13T12:49:07.756-04:002011-04-13T12:49:07.756-04:00What would you advise I do with a table whose natu...What would you advise I do with a table whose natural primary key would be URLs as found on the Web?<br /><br />My primary key is a TEXT NOT NULL column, whose content is the URL (think crawler-like).<br /><br />This will be a large master table, thus rule #3 argues it should be an integer.<br /><br />Any other tips?François Beausoleilhttp://blog.teksol.info/noreply@blogger.comtag:blogger.com,1999:blog-426922399870577072.post-37658426296981399122010-12-17T11:23:44.262-05:002010-12-17T11:23:44.262-05:00@zippy
Just to clarify the "performance conce...@zippy<br />Just to clarify the "performance concern" that you allude to for using GUID keys:<br />1) 128 bits is wide, that means fewer rows per page, more pages taking up more buffer cache. This impacts every part of query processing from more data to pull from disk to more cpu time & cache misses when computing joins, etc. <br />2) Fragmentation and data packing-- guid keys necessarily cause more splits, which results in much less compaction, resulting in poor space utlization (i.e. more pages, etc.)<br />3) cache locality-- there is often (not always) some "temporal" locality when inserting adjacent records. I.e. inserting checks for a bank deposit: if there were four checks then you might insert all four into the "checks" table at the same time. With "random" keys, these checks will end up in different locations in the index. When you later must retrieve the checks in the transaction, you will be pulling from four different locations instead of from one location (in the case of sequential keys). The point is that you break the spacial locality which often benefits the intrinsic temporal locality present in a lot of tables/relationships.<br /><br />Sequential keys have their problems as well (hot spots for latching, allocation), but in general I find blind adoption of GUIDs insidious.<br /><br />@KenDowns<br />Regarding your response to IGV (and maybe I didn't read the discussion closely enough) -- but if you claim that the value has no intrinsic value and thus its only a "more meaningful" identifier-- then I think you've argued against your tip #2. I am more skeptical of breaking normalization in some of these cases, because subject names are not philosophically, intrinsically, forever-and-ever guaranteed to be the same thing. The first time you avoid the join and rely on the name in the FK, now you have incurred hefty debt when the customer changes their requirement or wants to change "calculus" to "calculus AB" and "calculus BC". Also, these tables you specifically reference as being small and rarely changing, thus the performance penalty of the join is just a bit of CPU as its all likely to be cached (under your definition). Im not disputing your rule of thumb for some circumstances, but I value the risk mitigation of post-development expense much higher than the risk mitigation of not knowing how to write a join in SQL (or the cost of typing the additional characters to do the join).<br /><br />SteveAnonymoushttps://www.blogger.com/profile/06360294285988063025noreply@blogger.comtag:blogger.com,1999:blog-426922399870577072.post-7410423835786338372010-08-01T03:39:53.722-04:002010-08-01T03:39:53.722-04:00Great series, just one comment.. The rule for obje...Great series, just one comment.. The rule for object ID makes no sense to me as I haven't come across the concept before and there was no example of how or why I would use it. Otherwise very lucid and has helped me a great deal.Benhttps://www.blogger.com/profile/12798206405677568032noreply@blogger.comtag:blogger.com,1999:blog-426922399870577072.post-65743448292236818412010-04-02T18:29:41.231-04:002010-04-02T18:29:41.231-04:00Thank you for this article.
Google is so full of u...Thank you for this article.<br />Google is so full of useless spam. It's great to see that perls like this article exist...Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-426922399870577072.post-30377645654306385592009-03-31T12:43:00.000-04:002009-03-31T12:43:00.000-04:00HiThis is really great article. I would like to ad...Hi<BR/>This is really great article. I would like to add one point. Choosing a Primary key on Character columns is case by case.<BR/><BR/>Thanks -- Vijaya Kadiyala<BR/>www.dotnetvj.comVijaya Kadiyalahttps://www.blogger.com/profile/08108155552780950397noreply@blogger.comtag:blogger.com,1999:blog-426922399870577072.post-8434084497931422732009-03-10T07:38:00.000-04:002009-03-10T07:38:00.000-04:00@igv: regarding rule #1, let me ask what we would ...@igv: regarding rule #1, let me ask what we would do if we had an integer key instead? The integer is not meant to convey any meaning, it is only an identifier. So far so good.<BR/><BR/>If we follow rule #1, and use character keys, the first thing to understand is that they are still just identifiers, which happen to be easier to work with because they are less abstract. It does not mean they carry an authoritative representation of some fact, such as an absolute statement of a person's name, it just means they are easier to work with and remember. <BR/><BR/>Back in the day when everybody did this (before the web), if Joan Smith (JSMITH) got married and became Joan Jones, they just left the key as-is. It worked fine.KenDownshttps://www.blogger.com/profile/11117175783163937575noreply@blogger.comtag:blogger.com,1999:blog-426922399870577072.post-25780597161978544272009-03-06T20:10:00.000-05:002009-03-06T20:10:00.000-05:00Great article. I have some concern though about Ru...Great article. I have some concern though about Rule #1 though.<BR/>What about the case you will need to change teacher name (due to typo or just last name change etc.)?<BR/>You will need to change the name everywhere it exists and it can be easily forgotten in one place, which will cause problems.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-426922399870577072.post-72545916573742044402009-01-19T08:19:00.000-05:002009-01-19T08:19:00.000-05:00@ericdes: Thanks! Glad you found it helpful.@ericdes: Thanks! Glad you found it helpful.KenDownshttps://www.blogger.com/profile/11117175783163937575noreply@blogger.com