Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
A good naming convention for fields
Message
De
04/02/2001 10:43:34
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
A good naming convention for fields
Divers
Thread ID:
00472294
Message ID:
00472294
Vues:
55
I have been using the following convention for field naming in tables:

TRANSACTION.DBF

tr_id I(4)
tr_code C(10)
tr_dtime DATETIME
tr_exported L(1)
tr_cl_id I(4) (FK from client table)
tr_pr_id I(4) (FK form products table)


CLIENT.DBF
cl_id I(4)
cl_name C(30)
cl_address1 C(30)

etc.

PRODUCTS.DBF
pr_id I(10)
pr_name C(30)
etc.

I have used FKeys as in the transaction table above so that one can easily know where the join is.

Any comments on this naming scheme. I have been told that this is an OLD method and that the "NEW" thinking is to use :

TRANSACTION
id I(4)
code c(10)
productid I(4)
clientid I(4)
exported L(1)

CLIENT
id I(4)
name C(30)


PRODUCT
id I(4)
name C(30)
etc.

Comments and thoughts please.

Bernard
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform