Re: Defining dynamic sets of business rules
Posted in 1997
Topics: General Discussion
"BAIS" <dave@digidem.com> wrote: >Hi all, > >I have a database application where i want to validate a bunch of fields >against some known "business rules". Of course the rules and the fields are >must be dynamic and table driven. Here is an example of the application of >these rules: Changed by whom? A programmer or an end user? >Registration screen consists of 2 fields, state and sales_code > >I want to define a rule that says "if state =nj return 1" Why? What is being returned to? If an end user is doing the rule creation, will the end user understand what he is doing? >I also want to make sure that all "xxx" sales_codes return 5 "if >sales_code=xxx return 5" Do you mean that if a sales_code is a something i.e. member of some group? >What is the best way to do this. Say i create a table with 4 columns: name >, value , operator, result >Then i can put each rule in this table. My registration program then checks >this table to see if its fields fit and if so does the rule apply? Here's >the problem with this, what do i key the table on? I plan on this table >growing to the 10s of thousands. If i have to scan this whole table this >won't be feasible. Are you going to require multiple operators? For example, if state="NJ" or state="NY" return 1 >Anyone have any suggestions or pointers (urls, books,...) Any help would be >appreciated! More details are required before anyone can give you more than general advice. >David M Rosner Sincerely, Gene Wirchenko C Pronunciation Guide: y=x++; "wye equals ex plus plus semicolon" x=x++; "ex equals ex doublecross semicolon"