Simplicity Counts

Simplicity Counts

Avoid introducing more elements into your design than is really needed.

Example : Suppose that instead of a relationship between Movies and Studios we assumed the existence of "movie-holdings" the ownership of a single movie. We might then make another entity set Holdings. A one-one relationship Represents could be established between each movie and the unique holding that represents the movie. A many-one relationship from Holdings to Studios completes the picture shown in the following figure.

A poor design with an unnecessary entity set
Technically, the structure of above figure actually represents the real world, as it is possible to go from a movie to its unique owning studio via Holdings. However, Holdings serves no useful purpose, and we are better off without it. It creates programs that use the movie-studio relationship more difficult, wastes space, and encourages errors.



Tags