-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema
26 lines (26 loc) · 887 Bytes
/
schema
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
CREATE TABLE Fish (
Family NVARCHAR(20),
ScientificName NVARCHAR(40),
CommonName NVARCHAR(40),
Trophic NVARCHAR(2),
FishLength REAL,
FishCount INTEGER,
CONSTRAINT Fish_PK PRIMARY KEY (Family,ScientificName,CommonName,Trophic,FishLength,FishCount)
);
CREATE TABLE Location (
Region NVARCHAR(20),
SubRegion NVARCHAR(40),
StudyArea NVARCHAR(20),
BatchCode NVARCHAR(40),
Latitude REAL,
Longitude REAL,
Management NVARCHAR(10),
StructureType NVARCHAR(10),
CONSTRAINT Location_PK PRIMARY KEY (Region,SubRegion,StudyArea,BatchCode,Latitude,Longitude,Management,StructureType)
);
CREATE TABLE Date (
SurveyYear INTEGER,
SurveyDate NVARCHAR(10),
SurveyIndex INTEGER,
CONSTRAINT Date_PK PRIMARY KEY (SurveyYear,SurveyDate,SurveyIndex)
);