- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2017 01:59 PM
We have query business rules, one per table (INC, RITM, CHG, etc.), that limit query returns based on various conditions such as user hasRole, or is a member of a group. In these query BRs, we use scripting and multiple if - if else statements to accomplish our needs, but the scripts are becoming much more complicated with every additional if condition that our management requires.
My question is: is it better to continue keeping all the logic in one query business rule per table, or can we/should we use multiple BRs per table, which will allow for simplicity and easier comprehension of the logic?
Solved! Go to Solution.
- Labels:
-
Best Practices
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2017 02:03 PM
I would suggest one query per table instead of multiple queries.
It will become more complicated, if you use multiple business rules.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2017 02:03 PM
I would suggest one query per table instead of multiple queries.
It will become more complicated, if you use multiple business rules.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2017 02:18 PM
I think you have different business rules per table and that would be good to maintain.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2017 02:22 PM
I second Sanjiv. One rule judiciously commented would be better.
You may already be doing this, but don't forget about ACLs as a means to control your read, modify, delete. Users can belong to more than one group. You could easily create a new group such as "Table1 Read Access Access Group" with a custom role of table1_read_access. Then add the users you want to limit read access for this table.