Database Reference
In-Depth Information
Figure 5-3. Here's a series of sentences that describe relationships between entities on your list.
(You may have worded things differently, or come up with some that aren't on this list.) If you're
writing good subject-action sentences, they'll usually tell you what kind of relationship you'll need
between the two entities.
Now you need to convert your list of sentences into a graphic representation. You can show
each entity in a sentence as a box with its name in it and then draw lines to show the type of
relationship each pair will have. For example, the sentence “A customer hires me to do jobs,
and a job is for a customer” makes a clear case for what's called a one-to-many relationship.
That is, one customer can have many jobs, and each job has only one customer. The line you
see in the top pair of boxes in Figure 5-4 is the visual representation of a one-to-many rela-
tionship.
As you work down the list, you can see how entities like Invoices and Customers relate to
one another. (I send invoices to customers.) But the relationship with the Time entity isn't so
obvious. Is “Time” plural? For that matter, if Time is an entity, then it has to be a thing, so
what is a time ? You've just discovered one of the common challenges to good relational
design—choosing names that are clear and helpful.
Search WWH ::




Custom Search