Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Select and set to variable
Message
 
 
À
08/03/2015 06:45:17
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2014
Application:
Web
Divers
Thread ID:
01616353
Message ID:
01616440
Vues:
27
>>>>If there's one thing I know about it's inventory. The software company I worked for constantly ran into companies who had tried to cut corners and ran into problems. There is no shortcut to keeping track of things down to the SKU and transaction level. Then you can query as needed. Besides, in database theory you don't store sums in any table. Dr. Codd changed all that.
>>>
>>>Which theory would that be? Normalisation? Eh... I don't know anyone that normalizes tables to the 5th NF or even 3rd Boyce -Codd. Storing redundant data is allowed as long as it is controlled.
>>
>>I disagree. IMO if the data is easily accessible by SQL Select (or similar) there is no reason to wander in harm's way. The milliseconds of query overhead easily outweigh the potential downside of data being out of sync, i.e. wrong. IMO, of course.
>
>As a professor from local college here said, "once you make it possible to keep your totals in two places, it will happen that they're out of sync and nothing will wash you... so keep them in only one place, even untotalled, and they don't have a way to get them from two places. It doesn't matter whether it's correct.".

I didn't say keep the totals in two places. I said don't keep the totals anywhere, just sum as needed.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform