DROP TABLE CUSTOMER;
DROP TABLE POST;
DROP TABLE COMPANY;


CREATE TABLE POST
(
	ID Integer ,
	NAME VARCHAR (128) ,
primary key(
	ID 
)
);

CREATE TABLE COMPANY
(
	ID Integer ,
	NAME VARCHAR (128) ,
primary key(
	ID 
)
);

CREATE TABLE CUSTOMER
(
	ID Integer ,
	NAME VARCHAR (255) DEFAULT '---- ',
	POST_ID Integer NOT NULL ,
	COMPANY_ID Integer NOT NULL ,
primary key(
	ID 
)
);

alter table CUSTOMER add constraint fk_CUSTOMER_POST_ID foreign key (POST_ID) references POST (ID);
alter table CUSTOMER add constraint fk_CUSTOMER_COMPANY_ID foreign key (COMPANY_ID) references COMPANY (ID);
