Re: Using char(36) as a uuid

2012-02-29 Thread dYth
Just in case, i'm using UUID as primary key for branch office. periodically
integrated with database in HO.

On Thu, Mar 1, 2012 at 8:37 AM, Larry E. Masters  wrote:

> check out all of the plugins at http://cakedc.github.com all of them are
> using UUID
>
> --
> Larry E. Masters
>
>
> On Wed, Feb 29, 2012 at 8:53 AM, Ighor Martins wrote:
>
>> Hello,
>>
>> I was thinking about the use of integer as primary key of the table or
>> use a char(36) as UUID in the entire project,
>> What I dont like about the integer, is the auto increment number, So I
>> decided to use char(36) 'cause cake automatically fill it with an UUID, but
>> I dont know if this can slow down the search in DB.
>>
>> So, anyone who used this before, please tell me about that.
>> Is that right to use this in tables like: Users, Cars, Categories?
>>
>>
>> Thanks.
>>
>> --
>> Our newest site for the community: CakePHP Video Tutorials
>> http://tv.cakephp.org
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>> others with their CakePHP related questions.
>>
>>
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group
>> at http://groups.google.com/group/cake-php
>>
>
>  --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Using char(36) as a uuid

2012-02-29 Thread Larry E. Masters
check out all of the plugins at http://cakedc.github.com all of them are
using UUID

-- 
Larry E. Masters


On Wed, Feb 29, 2012 at 8:53 AM, Ighor Martins wrote:

> Hello,
>
> I was thinking about the use of integer as primary key of the table or use
> a char(36) as UUID in the entire project,
> What I dont like about the integer, is the auto increment number, So I
> decided to use char(36) 'cause cake automatically fill it with an UUID, but
> I dont know if this can slow down the search in DB.
>
> So, anyone who used this before, please tell me about that.
> Is that right to use this in tables like: Users, Cars, Categories?
>
>
> Thanks.
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Using char(36) as a uuid

2012-02-29 Thread Greg Skerman
There is some debate that keys should be meaningful, and I get that - but a
UUID is as meaningless as an auto incremented key.

With judicious use of routes, configuration, and other such bits you can
utterly hide your IDs from public scrunity if that is what you're worried
about... personally I find it much easier to navigate to posts/5 as opposed
to posts/aeasd12382nd2jujud3nx3juo3ehu9282 but maybe thats just me.


On Thu, Mar 1, 2012 at 7:26 AM, Miles J  wrote:

> Whats the reason for disliking auto-incrementing numbers? Its probably the
> best thing about databases.
>
>
> On Wednesday, February 29, 2012 6:53:38 AM UTC-8, Ighor Martins wrote:
>>
>> Hello,
>>
>> I was thinking about the use of integer as primary key of the table or
>> use a char(36) as UUID in the entire project,
>> What I dont like about the integer, is the auto increment number, So I
>> decided to use char(36) 'cause cake automatically fill it with an UUID, but
>> I dont know if this can slow down the search in DB.
>>
>> So, anyone who used this before, please tell me about that.
>> Is that right to use this in tables like: Users, Cars, Categories?
>>
>>
>> Thanks.
>>
>  --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Using char(36) as a uuid

2012-02-29 Thread Miles J
Whats the reason for disliking auto-incrementing numbers? Its probably the 
best thing about databases.

On Wednesday, February 29, 2012 6:53:38 AM UTC-8, Ighor Martins wrote:
>
> Hello,
>
> I was thinking about the use of integer as primary key of the table or use 
> a char(36) as UUID in the entire project,
> What I dont like about the integer, is the auto increment number, So I 
> decided to use char(36) 'cause cake automatically fill it with an UUID, but 
> I dont know if this can slow down the search in DB.
>
> So, anyone who used this before, please tell me about that.
> Is that right to use this in tables like: Users, Cars, Categories?
>
>
> Thanks.
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Using char(36) as a uuid

2012-02-29 Thread euromark
it will slow things down and it will store a lot of overhead data (due
to the byte size of those chars compared to integers).
but if speed isnt that big of an issue you are fine.
it gets problematic in the 1 to 5 record area
everything from then on you will really feel - especially with some
more joins going on

in one project the boss wanted to use UUIDs everywhere. database size
is more than twice it would be with AIIDs (due to many foreign_id
fields).
I personally favor a mix (only there where necessary)
but that has other downsites or limitations. so in the end it is a
matter of personal preference as long as the data stays in a specific
range.



On 29 Feb., 15:53, Ighor Martins  wrote:
> Hello,
>
> I was thinking about the use of integer as primary key of the table or use
> a char(36) as UUID in the entire project,
> What I dont like about the integer, is the auto increment number, So I
> decided to use char(36) 'cause cake automatically fill it with an UUID, but
> I dont know if this can slow down the search in DB.
>
> So, anyone who used this before, please tell me about that.
> Is that right to use this in tables like: Users, Cars, Categories?
>
> Thanks.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Using char(36) as a uuid

2012-02-29 Thread Ighor Martins
Hello,

I was thinking about the use of integer as primary key of the table or use 
a char(36) as UUID in the entire project,
What I dont like about the integer, is the auto increment number, So I 
decided to use char(36) 'cause cake automatically fill it with an UUID, but 
I dont know if this can slow down the search in DB.

So, anyone who used this before, please tell me about that.
Is that right to use this in tables like: Users, Cars, Categories?


Thanks.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php