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 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.