Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. Create table if not exists projekty (
  2. id_projektu numeric(4) primary key,
  3. opis_projektu char(20) not null ,
  4. data_rozpoczecia date default now(),
  5. data_zakonczenia date check(data_rozpoczecia<data_zakonczenia),
  6. fundusz numeric(7,2),
  7. unique (opis_projektu)
  8. );
  9. create table if not exists przydzialy(
  10. id_projektu numeric(4) not null references projekty(id_projektu),
  11. id_prac numeric(4) not null references pracownicy(id_prac),
  12. od date default now(),
  13. "do" date CHECK(od<"do"),
  14. stawka numeric(7,2),
  15. rola char(20) ,
  16. check(rola in ('KIERUJACY','ANALITYK','PROGRAMISTA') ),
  17. primary key(id_projektu,id_prac)
  18. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement