susan1978
asked on
Enforce business rules in microsoft sql server
When designing a datbase Is there any way to enforce a programer to query the data base in a certain way for example i made a login table the table has a username, password and active field. On five different projects with different programmers when they create the logi screen they query the login table for username and password but they tend to forget the and active=1 is there any way for me to force them to say uername='' and password='' and active=1. I would like them to force them to query ifthe user is active. I cant force them to use a stored procedure is there an alternative way to set this type of rule.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Was hoping that would help. It works well in some systems I have as you can follow some standard naming convention for developed views like "vw_something" or have them in specific schema, but I have a lot of views that have non-prefixed names so they would not be differentiated from tables in a developers mind. For example, if the true table is SECURITY_LOGINS_MASTER having a simple view name of USERS would be more user-friendly, give you the opportunity to do business rules upfront and would probably be preferred by the programmers anyway given the shorter name.
ASKER