|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
When to use a flag Attribute?Hello World,
I have a SalesAgent, SalesOrder, Product, and ProductType entities. Say, my product types are "Hard Drive","Mouse","Monitor". I need to store the record when/if the SalesAgent did purchase a product for demo purpose (for profiling). Please comment on the options below or adivise for bettter option: 1. Create a Demoflag on SalesOrder. Say, we have 500,000 sales order a year. 2. Refer to a Calculated column based on the CommissionCost in the SalesOrder or the AccountExecutive attribute (which will be "demo"). 3. Add product types "demo" to ProductType entity such as "Hard Drive - Demo" . Currently we have only less than 15 types. So this will our types to 30, max. 4. Create a SalesAgentProductDemo entity. There will be only 200 demo products purchased the first year, 50 thereafter. Thank you. You know your data better than I do and any assumptions I make based on
a list of names may be erroneous. Based on what you said I don't like any of your options. If the "demo" information already exists in the AccoutExecutive attribute then I'm guessing that you don't need to record any extra information - you already have it. -- David Portas SQL Server MVP -- In(2) I said "Refer to a Calculated column..." I really meant calculated
logic, would this make difference to your response? What if AccountExecute attribute does not have "demo", but I have to combine some conditional rules based on no name found and CommisionCost equal 0, to arrive at the conclusion this product was a demo, would this change your comment as well? In short, I am trying find out when we start (and NOT to) to think about adding a flag and calculated column, especially for those which can be calculated? Thanks. Show quote "David Portas" wrote: > You know your data better than I do and any assumptions I make based on > a list of names may be erroneous. Based on what you said I don't like > any of your options. If the "demo" information already exists in the > AccoutExecutive attribute then I'm guessing that you don't need to > record any extra information - you already have it. > > -- > David Portas > SQL Server MVP > -- > >
Other interesting topics
|
|||||||||||||||||||||||