# Relational Databases for Biologists
# Session 3: Building and modifying a database with SQL
#
# Create Data and Sources tables
# Targets table should already have been created

CREATE TABLE Data
(
	affyId varchar(30) NOT NULL,
	exptId varchar(10) NOT NULL,
	level int(5),
	PRIMARY KEY (affyId, exptId)
);

CREATE TABLE Sources
(
	exptId varchar(10) NOT NULL,
	source varchar(100),
	PRIMARY KEY (exptId)
);

# Skip this table; you should already have created it

# CREATE TABLE Targets
# (
# 	affyId varchar(20) NOT NULL,
# 	gbId varchar(20) NOT NULL,
# 	PRIMARY KEY (affyId)
# );
