Uvod u relacione baze podataka

Similar documents
Rešenja zadataka za vežbu na relacionoj algebri i relacionom računu

1a select indeks from dosije where mesto_rodjenja='beograd' union select indeks from ispit where ocena=10 order by indeks desc;

Mathcad sa algoritmima

TEORIJA SKUPOVA Zadaci

ALGORITMI I STRUKTURE PODATAKA

RELACIONI MODEL PODATAKA

Assessment of surface deformation with simultaneous adjustment with several epochs of leveling networks by using nd relative pedaloid

Modified Zagreb M 2 Index Comparison with the Randi} Connectivity Index for Benzenoid Systems

Projektovanje paralelnih algoritama II

On the relation between Zenkevich and Wiener indices of alkanes

Oracle Spatial Koordinatni sustavi, projekcije i transformacije. Dalibor Kušić, mag. ing. listopad 2010.

THE PRECISION OF TIME REGISTRATION WITH DANJON ASTROLABE

SOLUTION FOR HOMEWORK 11, ACTS 4306

DETALJNI IZVEDBENI NASTAVNI PLAN PREDMETA

An Algorithm for Computation of Bond Contributions of the Wiener Index

KLASIFIKACIJA NAIVNI BAJES. NIKOLA MILIKIĆ URL:

Kevin James. MTHSC 206 Section 16.4 Green s Theorem

Scripture quotations marked cev are from the Contemporary English Version, Copyright 1991, 1992, 1995 by American Bible Society. Used by permission.

Red veze za benzen. Slika 1.

LOGIKA. Logika. Sveučilište u Rijeci ODJEL ZA INFORMATIKU Radmile Matejčić 2, Rijeka Akademska 2017/2018. godina

AIR CURTAINS VAZDU[NE ZAVESE V H

u Novom Sadu na Tehnološkom fakultetu od Septembra održava Workshop pod nazivom:

Math 240 Calculus III

MIDTERM 1. April 24, 2002

SOLUTION FOR HOMEWORK 12, STAT 4351

Approximation of the attractor of a countable iterated function system 1

Graphs with the Same Detour Matrix

Slika 1. Slika 2. Da ne bismo stalno izbacivali elemente iz skupa, mi ćemo napraviti još jedan niz markirano, gde će

STUDENT NAME: STUDENT SIGNATURE: STUDENT ID NUMBER: SECTION NUMBER RECITATION INSTRUCTOR:

ANALYSIS OF THE RELIABILITY OF THE "ALTERNATOR- ALTERNATOR BELT" SYSTEM

APPROPRIATENESS OF GENETIC ALGORITHM USE FOR DISASSEMBLY SEQUENCE OPTIMIZATION

Detaljni izvedbeni nastavni plan za kolegij: Uvod u bioanorgansku kemiju

ANALYSIS OF METEOROLOGICAL AND AGRICULTURAL DROUGHTS IN SERBIA UDC (497.11)= (497.11)=111

NAPREDNI FIZIČKI PRAKTIKUM II studij Geofizika MODUL ELASTIČNOSTI

Problem Max. Possible Points Total

STAT 516 Midterm Exam 3 Friday, April 18, 2008

EXAM # 3 PLEASE SHOW ALL WORK!

Temperature dependence of the Kovats retention indices for alkyl 1,3-diketones on a DB-5 capillary column

Tablica 2: Opis predmeta 1. OPĆE INFORMACIJE Nositelj predmeta: Marko Katić Davor Zvizdić

INTRODUCTION TO LOW FREQUENCY LOCAL PLASMONS IN BULK EXTRINSIC SEMICONDUCTORS UDC 538.9; Yuri Kornyushin

Solution/Correction standard, second Test Mathematics A + B1; November 7, 2014.

2010 GCE A Level H2 Maths Solution Paper 2 Section A: Pure Mathematics. 1i) x 2 6x + 34 = 0 6 ± x = 2

DIFFERENTIAL EQUATIONS

Sveučilište u Rijeci University of Rijeka

Zbirka ispitnih zadataka iz Baza Podataka 1 Ispiti i kolokvijumi u periodu

Fourth Order RK-Method

Unit 1 Matrices Notes Packet Period: Matrices

2. Second-order Linear Ordinary Differential Equations

Mass transfer between a fluid and an immersed object in liquid solid packed and fluidized beds

DIFFERENTIAL EQUATIONS

Aromaticity of Carbon Nanotubes*

STA2603/205/1/2014 /2014. ry II. Tutorial letter 205/1/

Multiple Integrals. Chapter 4. Section 7. Department of Mathematics, Kookmin Univerisity. Numerical Methods.

THE NATIONAL UNIVERSITY OF IRELAND, CORK COLÁISTE NA hollscoile, CORCAIGH UNIVERSITY COLLEGE, CORK. Summer Examination 2009.

ECE 302 Division 2 Exam 2 Solutions, 11/4/2009.

Lecture 7: The Beam Element Equations.

A L A BA M A L A W R E V IE W

Statistical Learning Theory

ZANIMLJIVI ALGEBARSKI ZADACI SA BROJEM 2013 (Interesting algebraic problems with number 2013)

ZBIRKA ZADATAKA IZ DISKRETNIH MATEMATIQKIH STRUKTURA

Analysis of Experimental Designs

Ekosustav slobodnog softvera u geoinformatici

Electron content of rings of fully benzenoid hydrocarbons

NAPREDNI FIZIČKI PRAKTIKUM 1 studij Matematika i fizika; smjer nastavnički MJERENJE MALIH OTPORA

Solutions 1. Introduction to Coding Theory - Spring 2010 Solutions 1. Exercise 1.1. See Examples 1.2 and 1.11 in the course notes.

ELABORAT O STUDIJSKOM PROGRAMU

COMPSCI 650 Applied Information Theory Jan 21, Lecture 2

Points-to Analysis using Types

J.Serb.Chem.Soc. 68(7) (2003) UDC : : Original scientific paper

Dynamic holdup in a countercurrent gas - flowing solids - packed bed contactors

YOU MAY USE YOUR OWN BLANK SO AS NOT TO DISTURB OTHER COHERENTLY, OR THEY RISK NOT YOU MAY WRITE SOLUTIONS ON THE

MIL-DTL-5015 Style Circular Connectors

Final Exam Review Part I: Unit IV Material

Conditional stability of Larkin methods with non-uniform grids

Complex Analysis - Final exam - Answers

NAPREDNI FIZIČKI PRAKTIKUM II studij Geofizika POLARIZACIJA SVJETLOSTI

Chapter 10: Moments of Inertia

Random Variables. Cumulative Distribution Function (CDF) Amappingthattransformstheeventstotherealline.

or we could divide the total time T into N steps, with δ = T/N. Then and then we could insert the identity everywhere along the path.

Lab 3: measurement of Laser Gaussian Beam Profile Lab 3: basic experience working with laser (1) To create a beam expander for the Argon laser (2) To

Elementary ODE Review

FP1 Mark Schemes from old P4, P5, P6 and FP1, FP2, FP3 papers (back to June 2002)

Algebraic structure count of linear phenylenes and their congeners *

VARIS DODATNA OPREMA. Alu naplatak Podium anthracite. Alu naplatak 15 11, Light Grey PZ49P-B0671-CE. Sigumosne matice. Krovni nosac (3 vrata)

IZVEXTAJ. 1. Biografija kandidata. 2. Nauqni i struqni rad. Nastavno nauqnom ve u Matematiqkog fakulteta Univerziteta u Beogradu

This paper is not to be removed from the Examination Halls

The existence theorem for the solution of a nonlinear least squares problem

The temperature dependence of the disproportionation reaction of iodous acid in aqueous sulfuric acid solutions

MATH 52 MIDTERM 1. April 23, 2004

BOSNA I HERCEGOVINA TRŽIŠTE OSIGURANJA 2009

Mathematics for Economists

NIPP. Implementing rules for metadata. Ivica Skender NSDI Working group for technical standards.

FP1 Mark Schemes from old P4, P5, P6 and FP1, FP2, FP3 papers (back to June 2002)

Liquid membrane ion-selective electrodes for potentiometric dosage of coper and nickel

DESIGN AND CALCULATION OF RING SPRINGS AS SPRING ELEMENTS OF THE WAGON BUFFER UDC : Jovan Nešović

ANALYSIS OF UNEVENLY SPACED TIME SERIES DATA IN HIGHLY DISTRIBUTED AND UNRELIABLE NETWORKS

cauchy s integral theorem: examples

3. If a choice is broken down into two successive choices, the original H should be the weighted sum of the individual values of H.

IDENTIFICATION OF DONOR LINES FOR IMPROVING FRUIT YIELD OF K 35 x K 12 EGGPLANT HYBRID

Transcription:

Uvod u relacione baze podataka Ana Spasić 2. čas 1 Mala studentska baza dosije (indeks, ime, prezime, datum rodjenja, mesto rodjenja, datum upisa) predmet (id predmeta, sifra, naziv, bodovi) ispitni rok (godina roka, oznaka roka, naziv) ispit (indeks, id predmeta, godina roka, oznaka roka, ocena, datum ispita,bodovi) 2 Relacioni račun 1. Izdvojiti naziv i broj bodova za sve predmete koji se predaju na fakultetu., px.bodovi 2. Izdvojiti sve detalje o studentima rodenim u Beogradu.,, dx.datum_rodjenja, dx.mesto_rodjenja, dx.datum_upisa where dx.mesto_rodjenja = Beograd 3. Prikazati detalje svih parova student ispit takvih da je student polagao taj ispit.,, dx.datum_rodjenja, dx.mesto_rodjenja, ix.id_predmeta, ix.ocena, ix.datum_ispita, ix.godina_roka, ix.oznaka_roka where ix.indeks = 1

4. Prikazati ime i prezime studenta koji je polagao predmet čiji identifikator je 2001. where exists ix(ix.indeks = and ix.id_predmeta = 2001) 5. Izdvojiti brojeve indeksa studenata koji su polagali sve predmete. where forall px( exists ix( ix.indeks = where not exists px( not exists ix( ix.indeks = 6. Prikazati ime i prezime studenta koji je položio najmanje 1 predmet koji nosi 6 bodova. where exists px( px.bodovi = 6 and exists ix( ix.indeks = and ix.ocena > 5 where exists ix(ix.indeks = and ix.ocena > 5 and exists px(ix.id_predmeta = px.id_predmeta and px.bodovi = 6)) 2

7. Prikazati brojeve indeksa studenta koji su položili bar one različite predmete koje je polagao student sa brojem indeksa 20130023. where forall px(if exists ix(ix.indeks = 20130023 and px.id_predmeta = ix.id_predmeta ) then exists ix(ix.indeks = and px.id_predmeta = ix.id_predmeta and ix.ocena > 5)) range of iy is ispit where forall ix(if ix.indeks = 20130023 then exists iy(iy.indeks = and iy.ocena > 5 and ix.id_predmeta = iy.id_predmeta)) range of iy is ispit where forall ix( ix.indeks <> 20130023 or exists iy(iy.indeks = and iy.ocena > 5 and iy.id_predmeta = ix.id_predmeta)) range of iy is ispit where not exists ix(ix.indeks = 20130023 and not exists iy(iy.indeks = and ix.id_predmeta = iy.id_predmeta and iy.ocena > 5) 8. Izdvojiti nazive svih predmeta koje su položili svi studenti koji su upisali fakultet 2013. godine. where forall dx(if > 20130000 and < 20140000 3

then exists ix( ix.indeks = and ix.ocena > 5 where forall dx( < 20130000 or > 20140000 or exists ix( ix.indeks = and ix.ocena > 5 where not exists dx( > 20130000 and < 20140000 and not exists ix(ix.indeks = and ix.id_predmeta = px.id_predmeta and ix.ocena > 5)) 9. Izdvojiti ime i prezime za svakog od studenata koji nisu polagali predmet čiji identifikator je 1021. where not exists ix(ix.indeks= and ix.id_predmet = 1021) where forall ix(if ix.indeks = then ix.id_predmeta <> 1021) 10. Prikazati šifre svih predmeta koji nose 6 bodova ili ih je neko položio u roku Januar 2015. px.sifra where px.bodovi = 6 or exists ix( ix.godina_roka = 2015 and ix.oznaka_roka = jan and ix.id_predmeta = px.id_predmeta and ix.ocena > 5) 4

11. Izdvojiti nazive svih ispitnih rokova u kojima je polagan predmet Programiranje 1. irx.naziv where exists ix(ix.godina_roka = irx.godina_roka and ix.oznaka_roka = irx.oznaka_roka and exists px(px.id_predmeta=ix.id_predmeta and = Programiranje 1 )) 12. Izlistati spisak identifikatora predmeta koji nose manje bodova od predmeta čiji identifikator je 2004. range of py is predmet px.id_predmeta where exists py(py.id_predmeta = 2004 and px.bodovi < py.bodovi) 13. Prikazati imena i prezimena studenata koji imaju položen neki ispit sa ocenom 6, i neki drugi položen sa ocenom 10. where exists ix( ix.ocena = 6 and = ix.indeks) and exists ix( ix.ocena = 10 and = ix.indeks) 14. * Prikazati nazive svih predmeta koje je položio student Nikola Vukovic. where exists ix( ix.ocena>5 and ix.id_predmeta = px.id_predmeta and exists dx( = ix.indeks and dx.ime = Nikola and dx.prezime = Vukovic )) 15. * Napraviti spisak parova brojeva indeksa studenata takvih da su oba rodena u istom gradu. 5

range of dy is dosije, dy.indeks where dx.mesto_rodjenja = dy.mesto_rodjenja and < dy.indeks Uvodenjem strogog uredenja na indeksima eliminišu se semantički isti parovi indeksa: A,B i B,A. 16. * Izdvojiti nazive svih predmeta koji su studenti rodeni u Beogradu položili u aprilu 2015. where exists ix(ix.ocena>5 and ix.id_predmeta = px.id_predmeta and exists dx( = ix.indeks and dx.mesto_rodjenja = Beograd ) and exists irx(irx.godina_roka = ix.godina_roka and irx.oznaka_roka = ix.oznaka_roka and irx.naziv = April 2015 )) 17. * Prikazati imena i prezimena svih studenata koji su položili najmanje jedan ispit koji je položio student sa indeksom 20140025. where exists px( exists ix(ix.indeks = 20140025 and ix.ocena > 5 and ix.id_predmeta = px.id_predmeta) and exists ix(ix.indeks = and ix.ocena >5 18. * Prikazati oznake i godine ispitnih rokova u kojima nijedan student iz Kraljeva nije položio nijedan predmet koji nosi 4 bodova. irx.godina_roka, irx.oznaka_roka where forall dx(if dx.mesto_rodjenja = Kraljevo then not exists ix( ix.indeks = and ix.ocena > 5 and irx.godina_roka = ix.godina_roka 6

and irx.oznaka_roka = ix.oznaka_roka and exists px(ix.id_predmeta = px.id_predmeta and px.bodovi = 4)) irx.godina_roka, irx.oznaka_roka where forall dx( dx.mesto_rodjenja <> Kraljevo or not exists ix( ix.indeks = and ix.ocena > 5 and irx.godina_roka = ix.godina_roka and irx.oznaka_roka = ix.oznaka_roka and exists px(ix.id_predmeta = px.id_predmeta and px.bodovi = 4)) irx.godina_roka, irx.oznaka_roka where not exists dx( dx.mesto_rodjenja = Kraljevo and exists ix( ix.indeks = and ix.ocena > 5 and irx.godina_roka = ix.godina_roka and irx.oznaka_roka = ix.oznaka_roka and exists px(ix.id_predmeta = px.id_predmeta and px.bodovi = 4)) 7