Demo entry 6745999

create

   

Submitted by anonymous on May 28, 2018 at 07:08
Language: SQL. Code size: 968 Bytes.

CREATE TABLE IF NOT EXISTS Employers (
	empID INTEGER PRIMARY KEY,
	NAME VARCHAR(20) NOT NULL
);

CREATE TABLE IF NOT EXISTS Positions(
	pID INTEGER PRIMARY KEY,
	empID INTEGER REFERENCES employer(empID), 
	Require_qualification VARCHAR(40),
	Require_skill VARCHAR(40),
	Title VARCHAR(30), 
	Vacancy SMALLINT, 
	Duty VARCHAR(100)
);

CREATE TABLE IF NOT EXISTS Applicants(
	AppID INTEGER PRIMARY KEY,
	NAME VARCHAR(30),
	Gender VARCHAR(10), 
	Age SMALLINT, 
	Nationality VARCHAR(15), 
	Qualification VARCHAR(40), 
	Interest VARCHAR(40), 
	Experience VARCHAR(100),
	Skill VARCHAR(40)
);

CREATE TABLE IF NOT EXISTS Interview(
	AppID INTEGER REFERENCES Applicants(AppID),
	PID INTEGER REFERENCES Positions(PID), 
	iNumber SMALLINT, 
	iDate DATE, 
	succeed CHAR(1), 
	location VARCHAR(50)
);

CREATE TABLE IF NOT EXISTS Apply(
	AppID INTEGER REFERENCES Applicants(AppID),
	PID INTEGER REFERENCES Positions(PID), 
	adate DATE
);

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).