CREATE TABLE HISTORIAN(
HistorianID int NOT NULL,
Name char(30) NOT NULL,
Phone int NULL,
Email varchar(1000) NULL,
InstitutionID int NULL,
CONSTRAINT HistorianIDPK PRIMARY KEY (HistorianID),
CONSTRAINT NameAK1 UNIQUE (Name),
CONSTRAINT InstitutionIDFK FOREIGN KEY (InstitutionID) REFERENCES INSTITUTION (InstitutionID)
);
CREATE TABLE INSTITUTION(
InstitutionID int NOT NULL,
Name char(30) NOT NULL,
Website varchar(1000) NULL,
Phone int NULL,
Description varchar(1000) NULL,
AreaID int NULL,
CONSTRAINT InstitutionIDPK PRIMARY KEY (InstitutionID),
CONSTRAINT NameAK1 UNIQUE (Name),
CONSTRAINT AreaIDFK FOREIGN KEY (AreaID) REFERENCES AREA (AreaID)
);
CREATE TABLE AREA(
AreaID int NOT NULL,
Country varchar(1000) NOT NULL,
Region char(30) NOT NULL,
Latitude/Longitude char(1000) NULL,
InstitutionID int NULL,
Description varchar(1000) NULL,
CONSTRAINT AreaDPK PRIMARY KEY (AreaID),
CONSTRAINT RegionAK1 UNIQUE (Region),
CONSTRAINT InstitutionIDFK FOREIGN KEY (InstitutionID) REFERENCES INSTITUTION (InstitutionID)
2007-04-23
14:17:42
·
2 answers
·
asked by
garlin104300
1