Natural keys: Database and Domain implementation

added by slo2ols
8/19/2010 1:02:01 AM

1 Kicks, 75 Views

Introduction Let's discuss one from many aspects of design quality domain model. This is a choice problem of natural keys. Some know them as domain keys or business keys. Before we begin exploring the problem we'll give a definition of natural keys. Natural key is a set of descriptions. For example, Social Security Number (SSN) is identify a person. Sometimes an object can have more then one natural key in different contexts. As an example, a name of product can be a natural key for a customer, but nothing says to a saler. He operates a product code using bar code. In programm solutions a projection of natural keys is a minimal set of columns (for database table) or properties (for domain object). In this post we'll talk about importance of natural keys for database and for domain model.


0 comments