Listing 5. A Three-Column Appoinments Table

CREATE TABLE Appointments (
   person_id   INT4       NOT NULL,
   appt_when   TIMESTAMP  NOT NULL,
   notes       TEXT       NULL       CHECK (notes <>
''),

   UNIQUE(appt_when)
);