 	FOREIGN KEY (doc_contributer, doc_id) REFERENCES document_delete_upload);
 
 CREATE TABLE inspect_review(
-	inspector_uni VARCHAR(10),
+	inspector_uni VARCHAR(10) NOT NULL,
 	review_writer VARCHAR(10) NOT NULL,
 	review_id INTEGER NOT NULL,
 	PRIMARY KEY (inspector_uni, review_writer, review_id),
 	FOREIGN KEY (inspector_uni) REFERENCES inspector, 
 	FOREIGN KEY (review_writer, review_id) REFERENCES review_write);
 
-CREATE TABLE report_on(
-	client_uni VARCHAR(10),
-	doc_contributer VARCHAR(10),
-	doc_id INTEGER,
+CREATE TABLE report_doc(
+	client_uni VARCHAR(10) NOT NULL,
+	doc_contributer VARCHAR(10) NOT NULL,
+	doc_id INTEGER NOT NULL,
 	PRIMARY KEY (client_uni, doc_contributer, doc_id),
 	FOREIGN KEY (client_uni) REFERENCES client,
-	FOREIGN KEY (doc_contributer, doc_id) REFERENCES document_delete_upload);
+	FOREIGN KEY (doc_contributer, doc_id) REFERENCES document_upload);
 
 CREATE TABLE vote_doc(
-	client_uni VARCHAR(10),
-	doc_contributer VARCHAR(10),
-	doc_id INTEGER,
+	client_uni VARCHAR(10) NOT NULL,
+	doc_contributer VARCHAR(10) NOT NULL,
+	doc_id INTEGER NOT NULL,
 	PRIMARY KEY (client_uni, doc_contributer, doc_id),
 	FOREIGN KEY (client_uni) REFERENCES client,
-	FOREIGN KEY (doc_contributer, doc_id) REFERENCES document_delete_upload);
+	FOREIGN KEY (doc_contributer, doc_id) REFERENCES document_upload);
 
-CREATE TABLE download( 
-	client_uni VARCHAR(10),
-	doc_contributer VARCHAR(10),
-	doc_id INTEGER,
+CREATE TABLE download_doc( 
+	client_uni VARCHAR(10) NOT NULL,
+	doc_contributer VARCHAR(10) NOT NULL,
+	doc_id INTEGER NOT NULL,
 	PRIMARY KEY (client_uni, doc_contributer, doc_id),
 	FOREIGN KEY (client_uni) REFERENCES client,
-	FOREIGN KEY (doc_contributer, doc_id) REFERENCES document_delete_upload);
+	FOREIGN KEY (doc_contributer, doc_id) REFERENCES document_upload);
 
 CREATE TABLE vote_review(
-	client_uni VARCHAR(10),
-	review_writer VARCHAR(10),
-	review_id INTEGER,
+	client_uni VARCHAR(10) NOT NULL,
+	review_writer VARCHAR(10) NOT NULL,
+	review_id INTEGER NOT NULL,
 	PRIMARY KEY (client_uni, review_writer, review_id),
 	FOREIGN KEY (client_uni) REFERENCES client,
-	FOREIGN KEY (review_writer, review_id) REFERENCES client);
+	FOREIGN KEY (review_writer, review_id) REFERENCES review_write);
 
 

	update_date TIMESTAMP,
	content TEXT,
	workload REAL,
	PRIMARY KEY (writer, id),
	FOREIGN KEY (writer) REFERENCES client
		ON DELETE CASCADE
	FOREIGN KEY (course_prof_id, course_id) REFERENCES course_permit_instruct);

CREATE TABLE professor(
	uni VARCHAR(10),
	e_mail TEXT,
	PRIMARY KEY (uni) );

-- Relations
CREATE TABLE responsible_for(
	course_prof_id VARCHAR(10) NOT NULL,
	course_id VARCHAR(15) NOT NULL,
	course_inspector_uni VARCHAR(10) NOT NULL,
	PRIMARY KEY (course_prof_id, course_id, course_inspector_uni),
	FOREIGN KEY (course_prof_id, course_id) REFERENCES course_permit_instruct,
	FOREIGN KEY (course_inspector_uni) REFERENCES inspector);

CREATE TABLE inspect_doc(
	inspector_uni VARCHAR(10),
	doc_contributer VARCHAR(10) NOT NULL,
	doc_id INTEGER NOT NULL,
	PRIMARY KEY (inspector_uni, doc_contributer, doc_id),

-- Entities
CREATE TABLE professor(
	uni VARCHAR(10) NOT NULL,
	e_mail TEXT,
	PRIMARY KEY (uni) );

CREATE TABLE user (
    uni VARCHAR(10) NOT NULL,
    name VARCHAR(100),
    passwd TEXT,
    e_mail TEXT,
