Database Reference
In-Depth Information
You will need to go through this clarification process for all the entities
you have determined up to this point. This information will be used in the
next phase, creating the logical model. There is no hard science behind this
process; you just keep working with the relevant people in the organization
until you all agree on what they need.
Determining Business Rules
We hear business rules talked about in IT circles all the time. What are
they? In short, business rules are requirements of the business that must
be adhered to in order for the business to function properly. For example,
a company might say that its customers need to provide it with a valid
e-mail address or that their bill is due on the first of each month.
These rules are often implemented in different places in an IT system.
They can be as simple as limiting the customers' last names to 50 letters
when they enter them on a Web site, or as complex as a middle tier that
calculates the order total and searches for special discounts the customer
may be entitled to based on this or past purchases.
A debate rages in IT about the correct place to implement business
rules. Some people say it should be done by the front-end application, oth-
ers say everything should be passed to middleware, and still others claim
that the business rules should be handled by the database management
system. Because we don't want a slew of nasty e-mails, we won't say which
of these methods is correct. We will tell you, however, that your database
must implement any business rules that have to do with data integrity.
How do we determine which business rules need to be implemented,
and how do we enforce these rules in our model? This calls for a little black
magic, some pixie dust, and a bit of luck. Some rules are straightforward
and easy to implement, but others will leave you scratching your head and
writing a little T-SQL code. In this section we look at how to spot business
rules and the methods you can use to enforce them.
Determining the Business Rules
As we stated earlier, you need to enforce any business rules that have to do
with data integrity inside the database system. Some of these rules are in-
herently enforced in the logical model, and others require the advanced
features of SQL Server 2008. In either case, you should determine and
 
 
Search WWH ::




Custom Search