Chapter 18. Entities and Relationships

“The pure and simple truth is rarely pure and never simple.”

Oscar Wilde

This chapter presents a more complex system and introduces a model diagram and its representation in tables.

Relationships

Sam’s system started off with a simple setup—a Customer table and a CD table. The CD table had an entry for each physical CD. This corresponded to Sam’s paper system, in which each CD had a separate index card that recorded its being rented. The table looked like this.

image

Entities and Relationships

A system is often more complex than Sam’s example. There are more entities than just a CD, and there are relationships ...

Get Lean-Agile Acceptance Test-Driven Development: Better Software Through Collaboration now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.