Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Who should create the PK, view or table?
Message
De
13/09/2004 07:59:03
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
12/09/2004 22:44:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00941514
Message ID:
00941564
Vues:
16
Javier,

I may add to Hilmars that if you add the pk to the view, a concurent view somewhere else will not know about the new pk and may use it also. You will not know when a new view - record is written to its table. Then you will have two new records (in view) with the same pk.

Agnes
>Hi all,
>
>When adding records with views I don't where is the best place to create the primary key, the view or the table.
>I generate the PK with a newId() function, and I don't know whether to put it on the default value of the view field or the default value of the table itself. I "have" to put the code in the table just in case I don't use the view; so I thought that if I inserted the newId() in the view I would end up creating twice the PK (and wasting PK), but I tested and it was not the case. So I don't really know what should I do from a "good practices" point of view.
>
>TIA,
>Javier.
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform