-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: draskovic.etf.rs
-- Generation Time: Nov 27, 2016 at 09:08 AM
-- Server version: 5.6.17
-- PHP Version: 5.5.12

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `konferencija`
--
DROP DATABASE `konferencija`;
CREATE DATABASE IF NOT EXISTS `konferencija` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE `konferencija`;

-- --------------------------------------------------------

--
-- Table structure for table `korisnik`
--

CREATE TABLE IF NOT EXISTS `korisnik` (
  `korIme` varchar(100) NOT NULL,
  `lozinka` varchar(100) NOT NULL,
  `ime` varchar(100) NOT NULL,
  `prezime` varchar(100) NOT NULL,
  `tip` int(11) NOT NULL COMMENT '1-autor, 2-recenzent, 3-admin',
  PRIMARY KEY (`korIme`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `korisnik`
--

INSERT INTO `korisnik` (`korIme`, `lozinka`, `ime`, `prezime`, `tip`) VALUES
('anja', 'sifra123', 'Anja', 'Lazarevic', 1),
('bosko', 'sifra123', 'Bosko', 'Nikolic', 2),
('drasko', 'sifra123', 'Drazen', 'Draskovic', 2),
('mika', 'sifra123', 'Mihajlo', 'Petrovic', 1),
('pera', 'sifra123', 'Petar', 'Popovic', 1),
('sanja', 'sifra123', 'Sanja', 'Delcev', 2);

-- --------------------------------------------------------

--
-- Table structure for table `rad`
--

CREATE TABLE IF NOT EXISTS `rad` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `autor` varchar(100) NOT NULL,
  `naslov` varchar(250) NOT NULL,
  `sekcija` int(11) NOT NULL,
  `apstrakt` text NOT NULL,
  `tekst` longtext NOT NULL,
  `finalizovan` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `autor` (`autor`,`sekcija`),
  KEY `sekcija` (`sekcija`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;

--
-- Dumping data for table `rad`
--

INSERT INTO `rad` (`id`, `autor`, `naslov`, `sekcija`, `apstrakt`, `tekst`, `finalizovan`) VALUES
(1, 'anja', 'Simulator B stabla', 5, 'Spicy jalapeno bacon ipsum dolor amet bresaola short ribs irure laborum dolore sunt aliqua kielbasa fatback cupidatat ipsum ex mollit elit. Ullamco proident exercitation esse ribeye. Magna id pork, leberkas brisket incididunt turducken qui venison lorem spare ribs. Pork ground round hamburger nulla ribeye. Cupidatat tail shoulder meatball andouille incididunt deserunt shankle pastrami ground round velit landjaeger beef ribs salami occaecat. Magna deserunt meatball beef adipisicing. Labore elit turducken occaecat, ut excepteur dolore strip steak cupidatat jowl shank ea sunt picanha drumstick.', 'Spicy jalapeno bacon ipsum dolor amet bresaola short ribs irure laborum dolore sunt aliqua kielbasa fatback cupidatat ipsum ex mollit elit. Ullamco proident exercitation esse ribeye. Magna id pork, leberkas brisket incididunt turducken qui venison lorem spare ribs. Pork ground round hamburger nulla ribeye. Cupidatat tail shoulder meatball andouille incididunt deserunt shankle pastrami ground round velit landjaeger beef ribs salami occaecat. Magna deserunt meatball beef adipisicing. Labore elit turducken occaecat, ut excepteur dolore strip steak cupidatat jowl shank ea sunt picanha drumstick.\r\n\r\nOccaecat doner andouille frankfurter beef in ribeye meatball voluptate pork loin fatback. Fugiat cupim officia pork chop, andouille culpa bresaola pig. Tenderloin cupidatat dolore burgdoggen aliquip pariatur, proident landjaeger. Jerky aute ullamco shoulder, minim elit ut rump anim chuck sint aliqua est.\r\n\r\nJowl kielbasa nostrud duis ground round exercitation dolore drumstick biltong. Beef pariatur biltong, laborum nisi salami ball tip. Cillum sausage sint labore venison in magna fugiat beef ribs ham fatback eu ea swine shank. Drumstick tail et, turducken do in ham hock esse dolor landjaeger sint.\r\n\r\nEa quis boudin, mollit filet mignon ham eiusmod aliqua. Porchetta shank consequat leberkas turkey pork, esse ut pork belly cupidatat meatloaf aliqua commodo. Ball tip venison do, et anim culpa t-bone incididunt sint velit short ribs aute burgdoggen quis. Kielbasa ad ipsum pork belly boudin short ribs elit salami pancetta picanha proident chicken shoulder culpa. Cillum landjaeger short loin, duis enim eu kielbasa ea beef ribs sunt chuck. Ut shank pork belly jerky.\r\n\r\nNon velit tri-tip pork chop beef ribs. Sed turducken dolor tongue. Ea in pork loin biltong drumstick anim. Picanha tri-tip id kielbasa eiusmod, est dolor dolore jerky. Tri-tip in consequat anim cupidatat sausage, ut swine laborum nisi fatback tempor prosciutto. Culpa ut aute t-bone doner elit ad. Officia prosciutto leberkas swine capicola consectetur.', 1),
(2, 'anja', 'Veb sistem za rezervaciju restorana', 1, 'Ea non ball tip, dolore in quis tri-tip fugiat swine ut frankfurter sunt ham hock do. Filet mignon veniam nulla in pancetta ut laborum burgdoggen lorem porchetta salami meatloaf. Aute flank laborum, aliqua shankle biltong jerky incididunt nisi velit dolore aliquip. Short ribs fatback est, hamburger nisi esse occaecat picanha strip steak landjaeger. Pork belly pancetta ham tempor.', 'Ea non ball tip, dolore in quis tri-tip fugiat swine ut frankfurter sunt ham hock do. Filet mignon veniam nulla in pancetta ut laborum burgdoggen lorem porchetta salami meatloaf. Aute flank laborum, aliqua shankle biltong jerky incididunt nisi velit dolore aliquip. Short ribs fatback est, hamburger nisi esse occaecat picanha strip steak landjaeger. Pork belly pancetta ham tempor. Ball tip in laborum, chuck sausage drumstick chicken aliqua beef leberkas ipsum short ribs magna nostrud. Drumstick ex cupim est swine beef sirloin chicken anim turkey.\r\n\r\nCupidatat mollit eu capicola corned beef salami. Kevin enim veniam, anim consectetur qui nulla ham hock. Tail reprehenderit aliquip swine culpa hamburger sausage shank officia veniam est commodo. Minim filet mignon magna pancetta picanha, corned beef short ribs qui.\r\n\r\nShoulder ham hock culpa, flank biltong duis dolore beef ribs eu anim ex strip steak id drumstick in. Ball tip nulla bacon short loin alcatra exercitation qui corned beef pariatur dolore spare ribs pig beef tenderloin elit. Nulla minim doner rump tenderloin cupim. Aute ham hock frankfurter shoulder. Nulla beef ribs prosciutto ball tip hamburger, lorem t-bone enim porchetta pork magna flank jerky tenderloin bacon. Tempor aliqua ad beef burgdoggen.\r\nTempor turducken laborum cillum sunt tail pork loin leberkas porchetta fatback. Laborum pork sint sirloin tenderloin boudin. In bacon quis qui. Veniam sed pancetta landjaeger voluptate pariatur beef.\r\n\r\nKielbasa magna jerky ground round. Doner veniam do, pariatur sed brisket dolor deserunt shank salami irure occaecat pork loin. Et cow filet mignon picanha exercitation pariatur aute ullamco magna in salami brisket swine strip steak. Excepteur ball tip pork boudin exercitation cow short loin t-bone. Hamburger tail ad drumstick pork mollit, aute duis anim frankfurter jerky exercitation pork belly. Corned beef short loin ipsum biltong boudin, consectetur leberkas magna. Ham aute tri-tip jowl tail, incididunt rump pork turkey magna shankle esse short ribs nulla.', 1),
(3, 'mika', 'Sistem za detekciju plagijarizma', 1, 'Ludum mutavit. Verbum est ex. Et ... sunt occidat. Videtur quod est super omne oppidum. Quis transfretavit tu iratus es contudit cranium cum dolor apparatus. Qui curis! Modo nobis certamen est, qui non credunt at.', 'Ludum mutavit. Verbum est ex. Et ... sunt occidat. Videtur quod est super omne oppidum. Quis transfretavit tu iratus es contudit cranium cum dolor apparatus. Qui curis! Modo nobis certamen est, qui non credunt at. \r\n\r\nNonne vides quid sit? Tu es ... Jesse me respice. Tu ... blowfish sunt. A blowfish! Cogitare. Statura pusillus, nec sapientium panem, nec artificum. Sed predators facile prædam blowfish secretum telum non se habet. Non ille? Quid faciam blowfish, Isai. Blowfish quid faciat? In blowfish inflat, purus? \r\n\r\nBlowfish librantur in se quatuor, quinquies maior quam normalis, et quare? Quare id faciam? Ut terrorem facit, qui quid. Terrent! Ut alter, scarier pisces agminis off. Et quod tu es? Vos blowfish. Tu iustus in omnibus visio. Vides ... suus '' suus ''non aliud aerem. Nunc ... qui cum partibus blowfish Isai? Tu damnare ius. Vos blowfish. Dicere iterum. Dicere illam quasi velis eam. Es BLOWFISH! \r\n\r\nUt sibi fuerat socius sagittis. Ego intervenerit. Vere quia a te nuper iratus occidit illos undecim annorum puer. Deinde, si hoc forte qui fuit imperavit. ', 1),
(4, 'anja', 'Predlog algoritma za brisanje cvora iz crveno-crnog stabla', 4, 'Shoreditch ut try-hard, brunch poke gluten-free pariatur velit irony iPhone pabst letterpress raclette freegan chicharrones. IPhone ex selfies lyft, before they sold out freegan cray fixie mixtape.', 'Shoreditch ut try-hard, brunch poke gluten-free pariatur velit irony iPhone pabst letterpress raclette freegan chicharrones. IPhone ex selfies lyft, before they sold out freegan cray fixie mixtape. Sint magna bespoke, cardigan vaporware minim tote bag pabst vegan culpa dolore. Mustache trust fund bicycle rights delectus mlkshk small batch. Godard quinoa sed, direct trade actually prism delectus fanny pack succulents la croix photo booth snackwave lyft bitters. Austin small batch fashion axe fam kitsch plaid. Tattooed vero man bun prism, minim celiac live-edge accusamus keytar veniam.\r\n\r\nEst cred esse distillery hammock. Scenester letterpress church-key culpa offal. Hashtag placeat hell of, blog cred glossier austin try-hard thundercats fugiat leggings shoreditch. Labore lyft marfa, disrupt umami jean shorts heirloom. Bitters stumptown tbh eiusmod prism tacos, shoreditch venmo. Next level chartreuse leggings umami messenger bag. Raw denim before they sold out hell of tattooed locavore 90''s.\r\n\r\nBushwick etsy echo park raw denim incididunt. Chia activated charcoal vinyl bespoke copper mug post-ironic, assumenda magna raw denim. Brooklyn biodiesel raw denim, mollit mixtape narwhal kickstarter nihil single-origin coffee anim YOLO. 90''s vice nulla proident vexillologist officia fugiat umami. Exercitation ugh squid pinterest, shabby chic pabst snackwave. La croix tilde art party, vero selfies irony before they sold out edison bulb succulents kombucha shabby chic. Woke in yr cronut hashtag distillery, labore kitsch locavore ut pickled chia officia.\r\n\r\nUnicorn neutra cardigan, ea tempor incididunt occupy kitsch ad four dollar toast irony eu fixie chillwave microdosing. Synth forage nihil, cillum unicorn man braid echo park shoreditch fugiat lyft butcher poutine tofu PBR&B. Brunch williamsburg small batch, sartorial taxidermy hashtag franzen iPhone typewriter. Small batch shabby chic tumeric blog nulla et consectetur, four loko unicorn artisan. 3 wolf moon photo booth seitan fanny pack mixtape, synth helvetica aliqua copper mug. Ugh franzen sartorial shabby chic, selvage qui marfa waistcoat portland semiotics VHS nostrud. Waistcoat offal nesciunt, DIY 8-bit irony YOLO vinyl.', 0);

-- --------------------------------------------------------

--
-- Table structure for table `recenzent_sekcija`
--

CREATE TABLE IF NOT EXISTS `recenzent_sekcija` (
  `recenzent` varchar(100) NOT NULL,
  `id_sekcije` int(11) NOT NULL,
  PRIMARY KEY (`recenzent`,`id_sekcije`),
  KEY `id_sekcije` (`id_sekcije`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `recenzent_sekcija`
--

INSERT INTO `recenzent_sekcija` (`recenzent`, `id_sekcije`) VALUES
('bosko', 1),
('drasko', 2),
('drasko', 3),
('sanja', 4),
('sanja', 5);

-- --------------------------------------------------------

--
-- Table structure for table `recenzija`
--

CREATE TABLE IF NOT EXISTS `recenzija` (
  `id_rada` int(11) NOT NULL,
  `recenzent` varchar(100) NOT NULL,
  `ocena1` int(11) NOT NULL COMMENT 'relevantnost',
  `ocena2` int(11) NOT NULL COMMENT 'originalnost',
  `ocena3` int(11) NOT NULL COMMENT 'tehnička korektnost',
  `ocena4` int(11) NOT NULL COMMENT 'jasnoća',
  `ocena5` int(11) NOT NULL COMMENT 'reference',
  `ocena0` int(11) NOT NULL COMMENT 'opšti utisak',
  `komentar` text NOT NULL,
  PRIMARY KEY (`id_rada`),
  KEY `recenzent` (`recenzent`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `recenzija`
--

INSERT INTO `recenzija` (`id_rada`, `recenzent`, `ocena1`, `ocena2`, `ocena3`, `ocena4`, `ocena5`, `ocena0`, `komentar`) VALUES
(2, 'bosko', 5, 4, 4, 4, 5, 5, '');

-- --------------------------------------------------------

--
-- Table structure for table `sekcija`
--

CREATE TABLE IF NOT EXISTS `sekcija` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `naziv` varchar(150) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;

--
-- Dumping data for table `sekcija`
--

INSERT INTO `sekcija` (`id`, `naziv`) VALUES
(1, 'softverski alati'),
(2, 'baze podataka'),
(3, 'hardver'),
(4, 'algoritmi'),
(5, 'simulacije');

--
-- Constraints for dumped tables
--

--
-- Constraints for table `rad`
--
ALTER TABLE `rad`
  ADD CONSTRAINT `fk_rad_sekcija` FOREIGN KEY (`sekcija`) REFERENCES `sekcija` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_autor` FOREIGN KEY (`autor`) REFERENCES `korisnik` (`korIme`) ON DELETE NO ACTION ON UPDATE CASCADE;

--
-- Constraints for table `recenzent_sekcija`
--
ALTER TABLE `recenzent_sekcija`
  ADD CONSTRAINT `fk_recenzent` FOREIGN KEY (`recenzent`) REFERENCES `korisnik` (`korIme`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_sekcija` FOREIGN KEY (`id_sekcije`) REFERENCES `sekcija` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `recenzija`
--
ALTER TABLE `recenzija`
  ADD CONSTRAINT `fk_recenzent_recenzija` FOREIGN KEY (`recenzent`) REFERENCES `korisnik` (`korIme`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_rad` FOREIGN KEY (`id_rada`) REFERENCES `rad` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
