<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlserver.ro/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Intrebari</title><link>http://sqlserver.ro/forums/14/ShowForum.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Re: La ce foloseste coloana &amp;quot;GUID&amp;quot; de tip &amp;quot;uniqueidentifier&amp;quot;?</title><link>http://sqlserver.ro/forums/thread/887.aspx</link><pubDate>Wed, 15 Nov 2006 13:08:31 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:887</guid><dc:creator>MrSmersh</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/887.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=14&amp;PostID=887</wfw:commentRss><description>&lt;p&gt;Sa completam putin sau sa comprimam&lt;/p&gt;&lt;p&gt;Sint clar unice (si&amp;nbsp;din cite stiu nu numai in baza de date), si citeodata ai nevoie de asa&amp;nbsp;ceva...&lt;/p&gt;&lt;p&gt;Ca dezavantaj mare, care rezulta din &amp;nbsp;avantaj, e ca trebuie sa fie mari si mai ciudate (nu neaparat secventiale etc)&amp;nbsp;ca sa fie unice.... &lt;/p&gt;</description></item><item><title>Re: La ce foloseste coloana &amp;quot;GUID&amp;quot; de tip &amp;quot;uniqueidentifier&amp;quot;?</title><link>http://sqlserver.ro/forums/thread/885.aspx</link><pubDate>Wed, 15 Nov 2006 09:00:48 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:885</guid><dc:creator>xmldeveloper</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/885.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=14&amp;PostID=885</wfw:commentRss><description>&lt;p&gt;GUID se foloseste ca identificator unic in special de dezvoltatori pentru ca este relativ comod de folosit.&lt;/p&gt;&lt;p&gt;Personal evit folosirea GUID deoarece cauzeaza probleme serioase de performanta (a se vedea:&lt;a href="http://www.informit.com/articles/printerfriendly.asp?p=25862&amp;amp;rl=1" target="_blank"&gt;The Cost of GUIDs as Primary Keys&lt;/a&gt; ). In plus chiar Books Online enumera urmatoarele dezavantaje: &lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;/p&gt;&lt;p&gt;The &lt;strong&gt;uniqueidentifier&lt;/strong&gt; data type has the following disadvantages: &lt;/p&gt;&lt;ul&gt;&lt;li&gt;The values are long and obscure. This makes them difficult for users to type correctly, and more difficult for users to remember.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The values are random and cannot accept any patterns that may make them more meaningful to users.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;There is no way to determine the sequence in which &lt;strong&gt;uniqueidentifier&lt;/strong&gt; values were generated. They are not suited for existing applications that depend on incrementing key values serially.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;At 16 bytes, the &lt;strong&gt;uniqueidentifier&lt;/strong&gt; data type is relatively larger than other data types, such as 4-byte integers. This means indexes that are built using &lt;strong&gt;uniqueidentifier&lt;/strong&gt; keys might be relatively slower than indexes using an &lt;strong&gt;int&lt;/strong&gt; key.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Exista si multi care au argumente pro GUID mai ales de cand SQL Server 2005 a introdus functia NEWSEQUENTIALID. &lt;/p&gt;&lt;p&gt;GUID poate fi util in cazul replicarii.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>La ce foloseste coloana GUID de tip uniqueidentifier?</title><link>http://sqlserver.ro/forums/thread/884.aspx</link><pubDate>Wed, 15 Nov 2006 08:53:27 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:884</guid><dc:creator>Syberye</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/884.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=14&amp;PostID=884</wfw:commentRss><description>&lt;p&gt;Buna ziua&lt;/p&gt;&lt;p&gt;Am o intrebare care tine mai mult de logica, cred si de practiva. Am vazut foarte des aceasta coloana &amp;quot;Guid&amp;quot; de tip &amp;quot;uniqueidentifier&amp;quot; in diferite baze de date. Intrebarea mea este la ce foloseste cu adevarat, am stat si m-am gindit si am gasit 2 posibile situati dar vreau sa stiu daca ma insel sau daca in realitatea este mult mai smechera. Mi-ar place daca ati avea si ceva articole (exemple) care sa descrie rolul lui &amp;quot;Guid&amp;quot;&lt;/p&gt;&lt;p&gt;1. daca am o aplicatie cu o baza de date centrala insa care poate lucra in mai multe module ofline prin guid generez un id unic cu ajutorul caruia la sincronizare pot sa imi aduc datele in baza de date centrala.&lt;/p&gt;&lt;p&gt;2. am o aplicatie care incar o inregistrare pentru editare, generez un guid. la update daca guid meu e diferit de ce este in db inseamna ca cineva a&amp;nbsp;deschis acea inregistrare sau chiar a editato si atunci eu sint pasibil de suprascrierea munci facut de cineva in timp ce editam datele acelei inregistrarii.&lt;/p&gt;&lt;p&gt;&amp;nbsp;Va multumesc&lt;/p&gt;&lt;p&gt;Petre&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>