Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GUID based on primary key
Message
De
25/08/2002 22:29:14
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00693475
Message ID:
00693518
Vues:
20
>I think so. With GUIDs there's no messing around with PK values when adding records that were created offline (Pocket PC, Palm, etc.). Yes, and they are unique for your record all over the world.

I just modified our framework to take care of such a field, as adding time, if it finds it in the table to plug a GUID in it. We'll have to consider that now, I guess, as you say, for upcoming multi-application purposes.

>I'm currently doing my first project with GUIDs as PKs. I really like it. We don't have to ask the application server for a valid PK value, we just create a GUID in our BizObjs locally. This saves us one roundtrip to the application and the database server (= more speed and less resources). It also makes prefetching of PK values easy this way. No need to ask the database for a PK value, so this is also easier for simple VFP apps. This might not be the best design from a theoretical point of view, but I see it as a contract between our BizObjs, the rest of the middle tier and the database.

There are some advantages.

As you said, I also faced those two disadvantages as well. But, the advantage of using the primary key across the world is really good.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform