Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: DB required to list multiple D.I.V.O.R.C.E.S. & Re-marriages

Re: DB required to list multiple D.I.V.O.R.C.E.S. & Re-marriages

From: --CELKO-- <71062.1056_at_compuserve.com>
Date: 20 Dec 2001 10:43:46 -0800
Message-ID: <c0d87ec0.0112201043.59809443@posting.google.com>


>> 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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US