CHAPTER 9More on Keys and Constraints

In previous chapters, you have seen how to take a class diagram and represent it as a set of relational database tables. We looked at how to represent relationships between classes with primary and foreign keys and then applied the ideas of normalization to ensure the attributes were in the right tables. In this chapter, we take another look at some of these ideas and think about some alternative possibilities. In particular, we take a closer look at primary keys and how to choose them. We also take a look at how we can maintain referential integrity when data is being constantly updated.

Choosing a Primary Key

In the previous two chapters, I described how we can choose a field or combination of fields to ...

Get Beginning Database Design 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.