O'Reilly logo

Oracle SQL by Carol McCullough-Dieter, Gavin JT Powell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

20

Constraints

In this chapter:

  • What is Referential Integrity?

  • What are constraints and how are they used to implement Referential Integrity?

  • How are constraints placed into tables?

  • What else can constraints do?

This chapter shows you how to define constraints on tables. Constraints perform validation on data both within and between tables and, to a lesser degree, with views.

Primary and foreign key constraints are probably the most significant of constraints. These constraints can be used to enforce the validity (integrity) of relationships (references) between rows in tables (entities). A primary key reference is placed on a unique identifying column in a superset entity. A foreign key is placed on a subset table, which contains a copy of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required