Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
String vs. Integer PK values.
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Divers
Thread ID:
01414751
Message ID:
01414787
Vues:
72
>>>If the String PK/FK approach is really ugly and just a BAD idea, I could use this as an opportunity to refactor over to an Integer based approach.
>>
>>Using strings as a PK is not ugly. In fact, in many projects I use GUIDs instead of integer primary keys. GUIDs do have many advantages over integers. I wouldn't, though, refactor a system to use GUIDs if it's currently integer values unless I have a strong business case.
>>
>>However, from what I understand is that you are ignoring the PK in your tables and instead are using other fields to link data, because those fields are the fields that the user enters. That's something I'd avoid.
>
>Hi Christof,
>
>Would you please list all the advantages vs. disadvantages of GUID vs. Integer (in your opinion)?
>
>Thanks in advance.

PMFJI -- here are the main advantage and disadvantages. The disadvantages are GUIDs take up more space and are slightly slower to process, neither of which is a major issue IMO. The advantage is GUIDs are guaranteed to be globally unique (that's what the G stands for), which can be important if data is spread across servers.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform