Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE TABLE Company (
- Company_id TINYINT PRIMARY KEY IDENTITY (1, 1),
- Name VARCHAR(20),
- Short_name VARCHAR(10),
- City VARCHAR(15),
- Coefficent TINYINT
- )
- CREATE TABLE Cooperator (
- Cooperator_id TINYINT PRIMARY KEY IDENTITY (1, 1),
- Surname VARCHAR(15),
- Name VARCHAR(15),
- Bitrhday DATE,
- City VARCHAR(15),
- Salary DECIMAL,
- Category VARCHAR(30),
- Start_date DATE,
- Dept_id TINYINT,
- Phone_number VARCHAR(12),
- Passport_num VARCHAR(12),
- CONSTRAINT FK_Dept_id FOREIGN KEY (Dept_id) REFERENCES Department(Dept_id)
- )
- CREATE TABLE Department_head (
- Dept_head_id TINYINT PRIMARY KEY IDENTITY (1, 1),
- Name VARCHAR(15),
- Surname VARCHAR(15),
- City VARCHAR(15),
- )
- CREATE TABLE Department (
- Dept_id TINYINT PRIMARY KEY IDENTITY (1, 1),
- Name VARCHAR(15),
- Short_name VARCHAR(15),
- Hours tinyint,
- Dept_head_id tinyint,
- Company_id tinyint,
- CONSTRAINT FK_Dept_head_id FOREIGN KEY (Dept_head_id) REFERENCES Department_head(Dept_head_id),
- CONSTRAINT FK_Company_id FOREIGN KEY (Company_id) REFERENCES Company(Company_id)
- )
- CREATE TABLE Evaluation (
- Eval_id TINYINT PRIMARY KEY IDENTITY (1, 1),
- Cooperator_id tinyint,
- Status decimal,
- Date date,
- CONSTRAINT FK_Cooperator_id FOREIGN KEY (Cooperator_id) REFERENCES Cooperator(Cooperator_id)
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement