| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: DB required to list multiple D.I.V.O.R.C.E.S. & Re-marriages
>> With many couple getting Divorced and re-married should I have multiple
cross referenced columns? <<
What you want to track is marriages, not people. Try something like this:
CREATE TABLE Marriages
(husband_id INTEGER NOT NULL
REFERENCES Men(id),
wife_id INTEGER NOT NULL
REFERENCES Women(id),
marriage_date DATE NOT NULL,
divorce_date DATE, -- null means still married
CHECK (marriage_date <= divorce_date),
marriage_location CHAR(3) NOT NULL DEFAULT 'Unknown',
... );
Received on Thu Dec 20 2001 - 12:43:46 CST
![]() |
![]() |