SHARE
TWEET

Untitled

a guest Apr 21st, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CREATE TABLE SPORT
  2. (
  3.     TIP_SPORTA VARCHAR(30) NOT NULL,
  4.     BROJ_DISCIPLINE NUMBER(3) NOT NULL,
  5.     NAZIV VARCHAR(30) NOT NULL,
  6.     MSA VARCHAR(30) NOT NULL,
  7.     ID_SPORT NUMBER(5) PRIMARY KEY
  8. );
  9.  
  10. CREATE TABLE DISCIPLINA
  11. (
  12.  SIFRA NUMBER(10) PRIMARY KEY,
  13.  IME VARCHAR(30),
  14.  TIP_DISCIPLINE VARCHAR(20) CHECK (TIP_DISCIPLINE IN ('POJEDINACNA','EKIPNA','KOMBINOVANA')),
  15.  SVETSKI_REKORD NUMBER(20,2),
  16.  OLIMPIJSKI_REKORD NUMBER(20,2),
  17.  PROSLOGODISNJI_REZULTAT NUMBER(20),
  18.  SVETSKI_PRVAK VARCHAR(30),
  19.  OLIMPIJSKI_PRVAK VARCHAR(30)
  20.  );
  21.  
  22. CREATE TABLE IMA_DISCIPLINU
  23. (
  24.  SIFRA_DISCIPLINE NUMBER(10) ,
  25.  ID_SPORTA NUMBER(10),
  26.  CONSTRAINT IMA_DISCIPLINU_PK PRIMARY KEY (SIFRA_DISCIPLINE,ID_SPORTA),
  27.  CONSTRAINT SIFRA_DISCIPLINE_FK_IMA FOREIGN KEY (SIFRA_DISCIPLINE) REFERENCES DISCIPLINA(SIFRA),
  28.  CONSTRAINT ID_SPORTA_FK  FOREIGN KEY (ID_SPORTA) REFERENCES SPORT(ID_SPORT)
  29. );
  30.  
  31. CREATE TABLE TAKMICENJE
  32. (
  33.     NAZIV_STADIONA VARCHAR(30) NOT NULL,
  34.     VREME_ODRZAVANJA VARCHAR (5) NOT NULL,
  35.     DATUM_ODRZAVANJA DATE NOT NULL,
  36.     ID_TAKMICENJE NUMBER(5) PRIMARY KEY
  37. );
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top