CREATE TABLE contract (
     ID SERIAL PRIMARY KEY, 
     Date    timestamp NOT NULL,
     ProjectId INT REFERENCES project(ID),
     CustomerId INT REFERENCES customer(ID)
);

CREATE TABLE customer (
     ID SERIAL PRIMARY KEY, 
     NameCustomer VARCHAR(30) NOT NULL,
     Description  VARCHAR NOT NULL
);

CREATE TABLE customeronproject (
     ID SERIAL PRIMARY KEY, 
     Descriptio VARCHAR NOT NULL,
     ContractId INT REFERENCES contract(ID),
     CustomerId INT REFERENCES customer(ID)
);

CREATE TABLE executor (
     ID SERIAL PRIMARY KEY, 
     FullName VARCHAR NOT NULL,
     DateOfBirth    timestamp NOT NULL,
     HourlyRate DECIMAL NOT NULL,
     JobTitles INT NOT NULL
);

CREATE TABLE project (
     ID SERIAL PRIMARY KEY, 
     NameProject VARCHAR NOT NULL,
     CustomerId INT REFERENCES customer(ID),
     CompletedStages INT NOT NULL
);

CREATE TABLE wage (
     ID SERIAL PRIMARY KEY, 
     Month INT NOT NULL,
     Year INT NOT NULL,
     NumberOfHours INT,
     ExecutorId INT REFERENCES executor(ID)
);

SELECT * FROM wage;