Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create SQL Server users or use Windows users for auditin
Message
De
23/02/2021 18:45:03
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
01677765
Message ID:
01678545
Vues:
37
>
>I am not 100 sure I understand your question. But here is how I deal with PK. Each table has a PK field (e.g. MyTable_PK I). And the PK is an identity column. So, when a user adds a record to a table, the BIZ object gets the Identity Number set by the SQL Server and stores it into the field. Therefore, the Cursor Adapter can use this PK to edit a record or do whatever it is necessary.
>I am wondering, why do you use a compound PK? Could you give an example? Again, in my case, each table has a PK which is an identity column.

Well, referring to a compound PK. I have a table of services:
INTER - INTERNATIONAL
IMPOR - IMPORTS
EXPOR - EXPORTS
LOCAL - LOCALS
And for each service a have several rates:
INTER - INTERNATIONAL
     CO - CORPORATE RATES
     PR - PREMIUM RATES
IMPOR - IMPORTS
     IS - STANDARD IMPORT
LOCAL - LOCALS
     LS - LOCAL STANDARD RATES
     LP - LOCAL PREMIUM RATES
And the rates changes almost every month according to our suppliers. I use codes instead of identity columns so that the user can recognize them. Is that bad? Identity columns can improve that?

I hope you could understand it.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform