Sha256: 332de13790126a9c13067e89960d836205b1a074a9ebd81f9df818dbbe30d4f2
Contents?: true
Size: 1.04 KB
Versions: 5
Compression:
Stored size: 1.04 KB
Contents
CREATE TABLE Marriage ( -- Marriage is by husband-Person and Person has family-Name, HusbandFamilyName varchar NOT NULL, -- Marriage is by husband-Person and Person has given-Name, HusbandGivenName varchar NOT NULL, -- Marriage is of wife-Person and Person has family-Name, WifeFamilyName varchar NOT NULL, -- Marriage is of wife-Person and Person has given-Name, WifeGivenName varchar NOT NULL, PRIMARY KEY(HusbandGivenName, HusbandFamilyName, WifeGivenName, WifeFamilyName) ) GO CREATE TABLE Person ( -- Person has family-Name, FamilyName varchar NOT NULL, -- Person has given-Name, GivenName varchar NOT NULL, PRIMARY KEY(GivenName, FamilyName) ) GO ALTER TABLE Marriage ADD FOREIGN KEY (HusbandGivenName, HusbandFamilyName) REFERENCES Person (GivenName, FamilyName) GO ALTER TABLE Marriage ADD FOREIGN KEY (WifeGivenName, WifeFamilyName) REFERENCES Person (GivenName, FamilyName) GO
Version data entries
5 entries across 5 versions & 1 rubygems