-
Need Help With Database Design
Hey Guys,
Iam John and a newbie..
Iam building a database to store the business rules in the database. For example the following expression
Expression=(a=5 or b>6) and (c<7 or d=0)
will be stored in the database as follows:
Rule
-----------------------------------------
RuleId |LHSCode | Operator | RHSValue
------------------------------------------
R1 a = 5
R2 b > 6
R3 c < 7
R4 d = 0
------------------------------------------
Rule Group
--------------------------------------
RuleGroupId | RuleGroupDescrip
--------------------------------------
G1 R1 or R2
G2 R3 or R4
G3 (R1 or R2) and (R3 or R4)
----------------------------------------
Rule Group Relation_1
--------------------------------------------------------------
RuleGrRelId |RuleGroupId|RuleId|RuleJoinOperator|RuleSeqNo
--------------------------------------------------------------
1 G1 R1 or 1
2 G1 R2 - 2
3 G2 R3 or 1
4 G2 R4 - 2
--------------------------------------------------------------
Rule Group Relation_2
--------------------------------------------------------------
GrRelId |RuleGroupId|GroupJoinOperator|RuleSeqNo
--------------------------------------------------------------
1 G1 and 1
2 G2 - 2
--------------------------------------------------------------
The problem is have expressions with more than 5 or 6 rules in which i have 2 build more tables.Is there any better way to do this?Any Better database design?
Any suggestion would be greatly appreciated...
Regards
John
Similar Threads
-
By Arjuna in forum Database
Replies: 2
Last Post: 07-25-2007, 03:22 AM
-
By rdl in forum VB Classic
Replies: 0
Last Post: 12-27-2001, 01:59 PM
-
By Nick in forum VB Classic
Replies: 1
Last Post: 12-14-2000, 02:59 PM
-
By Jacob Hatley in forum VB Classic
Replies: 4
Last Post: 07-12-2000, 08:06 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks