Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating table for Variable values
Message
De
17/03/2017 17:30:55
Al Doman (En ligne)
M3 Enterprises Inc.
North Vancouver, Colombie Britannique, Canada
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01649129
Message ID:
01649144
Vues:
47
>Hi,
>
>I am posting this in VFP forum but the backend is SQL Server database.
>
>I want to ask your opinion on the following DB design consideration.
>I need to create a table (which will be a child table) that will store different value, depending on the Parent PK
>For example. Some records of the table will have 2 INT columns, 1 Bit Column, 4 Decimal columns. Other rows/records will have different number of types. And the captions to the columns (the way they will be viewed by user of the VFP app) will be different.
>I am thinking of having a set of different type columns, as follows:
>BIT_VAL 1 Type: Bit
>BIT_VAL2 Type: Bit
>BIT_VAL3 Type: Bit
>DEC_VAL1 Type Decimal
>DEC_VAL2 Type Decimal
>DEC_VAL3 Type Decimal
>DEC_VAL4 Type Decimal
>INT_VAL1 Type INT
>and so on.
>
>So, for each different Type the table will have a max number of columns. This way, the UI will take care of Captions and matching the Captions to the Col Name/Type.
>
>What do you think of this approach?

This seems to be a classic example of where it would be helpful for you to tell us what you're trying to do, rather than arguing over implementation details. There may be a completely different approach that would make all this discussion so far, obsolete.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform