Chapter 13. Extracting Business Rules
The previous chapters have built up a basic design for The Pampered Pet database. They gathered customer requirements, built a semantic object model and entity-relationship diagrams, and converted those into a relational model.
This chapter further refines the design by identifying business rules in the relational model and isolating them so they will be easy to modify in the future if necessary.
In this chapter you see examples that:
Identify required fields and other field-level constraints that are unlikely to change.
Identify sanity checks that are also unlikely to change.
Identify business rules that are more complicated or likely to change in the future.
Identifying Business Rules
The text and exercises in Chapter 11 listed the fields required for the initial database design. For each field, that chapter gave the field's data type, whether the field is required, and its domain. That information describes most of the project's business rules.
Domain information usually includes simple "sanity check" constraints. These are conditions that basically verify the "laws of physics" for the database. For example, an item's cost cannot be less than $0.00. Exercise 12 in Chapter 12 discussed free clinics and outings, so it's possible that an item might be free, but it's hard to imagine The Pampered Pet's management charging less than nothing for a product.
Other sanity check conditions include field data types and whether a field is required. It may also ...
Get Beginning Database Design Solutions now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.