Re: usung GUIDs and php
am 29.08.2007 09:34:58 von fjm67
Michael Fesser wrote:
> .oO(fjm67)
>
> >How would I go about implementing GUIDs with php and MySQL? I have
> >searched and come up empty-handed. I would like to GUIDs as my PKs.
>
> What's wrong with simple AUTO_INCREMENT numbers?
>
> Micha
Without getting into a Holy War, I have decided to use GUIDs as my PKs
becuae there are limitations to INDENTITY datatypes and besides they
are not very portable.
Re: usung GUIDs and php
am 29.08.2007 11:25:50 von Michael Fesser
..oO(fjm67)
>Without getting into a Holy War, I have decided to use GUIDs as my PKs
>becuae there are limitations to INDENTITY datatypes and besides they
>are not very portable.
This just depends on the implementation. Instead of AUTO_INCREMENT using
a sequence to generate the ID before inserting the record could be
another option (MySQL doesn't support them natively like other DBMS, but
there are ways to emulate them).
The main problem with GUIDs as PKs is that they waste a lot of space for
nothing, even more if they're referenced as FKs.
Micha