<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="sr">
	<id>https://siwiki.rs/w/index.php?action=history&amp;feed=atom&amp;title=%D0%91%D0%B0%D0%B7%D0%B5_%D0%BF%D0%BE%D0%B4%D0%B0%D1%82%D0%B0%D0%BA%D0%B0_1%2F%D0%9B%D0%B0%D0%B1_1_%D1%98%D0%B0%D0%BD%D1%83%D0%B0%D1%80_2021</id>
	<title>Базе података 1/Лаб 1 јануар 2021 - Историја измена</title>
	<link rel="self" type="application/atom+xml" href="https://siwiki.rs/w/index.php?action=history&amp;feed=atom&amp;title=%D0%91%D0%B0%D0%B7%D0%B5_%D0%BF%D0%BE%D0%B4%D0%B0%D1%82%D0%B0%D0%BA%D0%B0_1%2F%D0%9B%D0%B0%D0%B1_1_%D1%98%D0%B0%D0%BD%D1%83%D0%B0%D1%80_2021"/>
	<link rel="alternate" type="text/html" href="https://siwiki.rs/w/index.php?title=%D0%91%D0%B0%D0%B7%D0%B5_%D0%BF%D0%BE%D0%B4%D0%B0%D1%82%D0%B0%D0%BA%D0%B0_1/%D0%9B%D0%B0%D0%B1_1_%D1%98%D0%B0%D0%BD%D1%83%D0%B0%D1%80_2021&amp;action=history"/>
	<updated>2026-06-04T21:37:06Z</updated>
	<subtitle>Историја измена ове странице на пројекту</subtitle>
	<generator>MediaWiki 1.39.8</generator>
	<entry>
		<id>https://siwiki.rs/w/index.php?title=%D0%91%D0%B0%D0%B7%D0%B5_%D0%BF%D0%BE%D0%B4%D0%B0%D1%82%D0%B0%D0%BA%D0%B0_1/%D0%9B%D0%B0%D0%B1_1_%D1%98%D0%B0%D0%BD%D1%83%D0%B0%D1%80_2021&amp;diff=5163&amp;oldid=prev</id>
		<title>Aleksa: resenje java</title>
		<link rel="alternate" type="text/html" href="https://siwiki.rs/w/index.php?title=%D0%91%D0%B0%D0%B7%D0%B5_%D0%BF%D0%BE%D0%B4%D0%B0%D1%82%D0%B0%D0%BA%D0%B0_1/%D0%9B%D0%B0%D0%B1_1_%D1%98%D0%B0%D0%BD%D1%83%D0%B0%D1%80_2021&amp;diff=5163&amp;oldid=prev"/>
		<updated>2022-12-22T20:21:22Z</updated>

		<summary type="html">&lt;p&gt;resenje java&lt;/p&gt;
&lt;a href=&quot;https://siwiki.rs/w/index.php?title=%D0%91%D0%B0%D0%B7%D0%B5_%D0%BF%D0%BE%D0%B4%D0%B0%D1%82%D0%B0%D0%BA%D0%B0_1/%D0%9B%D0%B0%D0%B1_1_%D1%98%D0%B0%D0%BD%D1%83%D0%B0%D1%80_2021&amp;amp;diff=5163&amp;amp;oldid=3803&quot;&gt;Прикажи измене&lt;/a&gt;</summary>
		<author><name>Aleksa</name></author>
	</entry>
	<entry>
		<id>https://siwiki.rs/w/index.php?title=%D0%91%D0%B0%D0%B7%D0%B5_%D0%BF%D0%BE%D0%B4%D0%B0%D1%82%D0%B0%D0%BA%D0%B0_1/%D0%9B%D0%B0%D0%B1_1_%D1%98%D0%B0%D0%BD%D1%83%D0%B0%D1%80_2021&amp;diff=3803&amp;oldid=prev</id>
		<title>KockaAdmiralac: Tražena datoteka</title>
		<link rel="alternate" type="text/html" href="https://siwiki.rs/w/index.php?title=%D0%91%D0%B0%D0%B7%D0%B5_%D0%BF%D0%BE%D0%B4%D0%B0%D1%82%D0%B0%D0%BA%D0%B0_1/%D0%9B%D0%B0%D0%B1_1_%D1%98%D0%B0%D0%BD%D1%83%D0%B0%D1%80_2021&amp;diff=3803&amp;oldid=prev"/>
		<updated>2022-02-13T21:32:43Z</updated>

		<summary type="html">&lt;p&gt;Tražena datoteka&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;sr&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Старија измена&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Верзија на датум 13. фебруар 2022. у 23:32&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l8&quot;&gt;Ред 8:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ред 8:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Комитенти са својих рачуна врше трансакције путем ставки промета (прате се редни број, датум и време) које могу бити уплате (прати се основ и износ) или исплате (прате се износ и провизија), при чему је то могуће у било којој филијали.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Комитенти са својих рачуна врше трансакције путем ставки промета (прате се редни број, датум и време) које могу бити уплате (прати се основ и износ) или исплате (прате се износ и провизија), при чему је то могуће у било којој филијали.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Датотека:BP1 Lab 1 semestralni dijagram.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;png&lt;/del&gt;|center|ЕР дијаграм базе из поставке задатка.]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Датотека:BP1 Lab 1 semestralni dijagram.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;svg|frame&lt;/ins&gt;|center|ЕР дијаграм базе из поставке задатка.]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Задатак ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Задатак ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>KockaAdmiralac</name></author>
	</entry>
	<entry>
		<id>https://siwiki.rs/w/index.php?title=%D0%91%D0%B0%D0%B7%D0%B5_%D0%BF%D0%BE%D0%B4%D0%B0%D1%82%D0%B0%D0%BA%D0%B0_1/%D0%9B%D0%B0%D0%B1_1_%D1%98%D0%B0%D0%BD%D1%83%D0%B0%D1%80_2021&amp;diff=2284&amp;oldid=prev</id>
		<title>KockaAdmiralac: KockaAdmiralac преместио је страницу „Базе података 1/Лаб 1 Јануар 2020” на „Базе података 1/Лаб 1 јануар 2021” без остављања преусмерења: Sada se stranice nazivaju po godini održavanja</title>
		<link rel="alternate" type="text/html" href="https://siwiki.rs/w/index.php?title=%D0%91%D0%B0%D0%B7%D0%B5_%D0%BF%D0%BE%D0%B4%D0%B0%D1%82%D0%B0%D0%BA%D0%B0_1/%D0%9B%D0%B0%D0%B1_1_%D1%98%D0%B0%D0%BD%D1%83%D0%B0%D1%80_2021&amp;diff=2284&amp;oldid=prev"/>
		<updated>2021-06-27T13:44:28Z</updated>

		<summary type="html">&lt;p&gt;KockaAdmiralac преместио је страницу „&lt;a href=&quot;/w/index.php?title=%D0%91%D0%B0%D0%B7%D0%B5_%D0%BF%D0%BE%D0%B4%D0%B0%D1%82%D0%B0%D0%BA%D0%B0_1/%D0%9B%D0%B0%D0%B1_1_%D0%88%D0%B0%D0%BD%D1%83%D0%B0%D1%80_2020&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Базе података 1/Лаб 1 Јануар 2020 (страница не постоји)&quot;&gt;Базе података 1/Лаб 1 Јануар 2020&lt;/a&gt;” на „&lt;a href=&quot;/wiki/%D0%91%D0%B0%D0%B7%D0%B5_%D0%BF%D0%BE%D0%B4%D0%B0%D1%82%D0%B0%D0%BA%D0%B0_1/%D0%9B%D0%B0%D0%B1_1_%D1%98%D0%B0%D0%BD%D1%83%D0%B0%D1%80_2021&quot; title=&quot;Базе података 1/Лаб 1 јануар 2021&quot;&gt;Базе података 1/Лаб 1 јануар 2021&lt;/a&gt;” без остављања преусмерења: Sada se stranice nazivaju po godini održavanja&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;sr&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Старија измена&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Верзија на датум 27. јун 2021. у 15:44&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;sr&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нема разлике)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>KockaAdmiralac</name></author>
	</entry>
	<entry>
		<id>https://siwiki.rs/w/index.php?title=%D0%91%D0%B0%D0%B7%D0%B5_%D0%BF%D0%BE%D0%B4%D0%B0%D1%82%D0%B0%D0%BA%D0%B0_1/%D0%9B%D0%B0%D0%B1_1_%D1%98%D0%B0%D0%BD%D1%83%D0%B0%D1%80_2021&amp;diff=1698&amp;oldid=prev</id>
		<title>TopOfKeks: kategorizacija</title>
		<link rel="alternate" type="text/html" href="https://siwiki.rs/w/index.php?title=%D0%91%D0%B0%D0%B7%D0%B5_%D0%BF%D0%BE%D0%B4%D0%B0%D1%82%D0%B0%D0%BA%D0%B0_1/%D0%9B%D0%B0%D0%B1_1_%D1%98%D0%B0%D0%BD%D1%83%D0%B0%D1%80_2021&amp;diff=1698&amp;oldid=prev"/>
		<updated>2021-02-18T00:14:51Z</updated>

		<summary type="html">&lt;p&gt;kategorizacija&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;sr&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Старија измена&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Верзија на датум 18. фебруар 2021. у 02:14&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l160&quot;&gt;Ред 160:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ред 160:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Категорија:Базе података 1]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Категорија:Базе података 1]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Категорија:Лабораторијске вежбе]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>TopOfKeks</name></author>
	</entry>
	<entry>
		<id>https://siwiki.rs/w/index.php?title=%D0%91%D0%B0%D0%B7%D0%B5_%D0%BF%D0%BE%D0%B4%D0%B0%D1%82%D0%B0%D0%BA%D0%B0_1/%D0%9B%D0%B0%D0%B1_1_%D1%98%D0%B0%D0%BD%D1%83%D0%B0%D1%80_2021&amp;diff=1680&amp;oldid=prev</id>
		<title>TopOfKeks: /* Решење */ fix</title>
		<link rel="alternate" type="text/html" href="https://siwiki.rs/w/index.php?title=%D0%91%D0%B0%D0%B7%D0%B5_%D0%BF%D0%BE%D0%B4%D0%B0%D1%82%D0%B0%D0%BA%D0%B0_1/%D0%9B%D0%B0%D0%B1_1_%D1%98%D0%B0%D0%BD%D1%83%D0%B0%D1%80_2021&amp;diff=1680&amp;oldid=prev"/>
		<updated>2021-02-13T00:33:14Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Решење: &lt;/span&gt; fix&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;sr&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Старија измена&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Верзија на датум 13. фебруар 2021. у 02:33&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l73&quot;&gt;Ред 73:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ред 73:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;void proknjiziStavku(sqlite3 *baza, int iznos, int idFil, int idRac) {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;void proknjiziStavku(sqlite3 *baza, int iznos, int idFil, int idRac) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     const char *sql = &amp;quot;INSERT INTO Stavka (RedBroj, Datum, Vreme, Iznos, IdFil, IdRac) &amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     const char *sql = &amp;quot;INSERT INTO Stavka (RedBroj, Datum, Vreme, Iznos, IdFil, IdRac) &amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         &amp;quot;SELECT COALESCE(MAX(&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;S&lt;/del&gt;.RedBroj), 0) + 1, DATE(), TIME(), ?, ?, ? &amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         &amp;quot;SELECT COALESCE(MAX(&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Stavka&lt;/ins&gt;.RedBroj), 0) + 1, DATE(), TIME(), ?, ?, ? &amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         &amp;quot;FROM Stavka S &amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         &amp;quot;FROM Stavka S &amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         &amp;quot;WHERE S.IdRac = ?&amp;quot;;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         &amp;quot;WHERE S.IdRac = ?&amp;quot;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>TopOfKeks</name></author>
	</entry>
	<entry>
		<id>https://siwiki.rs/w/index.php?title=%D0%91%D0%B0%D0%B7%D0%B5_%D0%BF%D0%BE%D0%B4%D0%B0%D1%82%D0%B0%D0%BA%D0%B0_1/%D0%9B%D0%B0%D0%B1_1_%D1%98%D0%B0%D0%BD%D1%83%D0%B0%D1%80_2021&amp;diff=1637&amp;oldid=prev</id>
		<title>TopOfKeks: Нова страница: {{tocright}}  == Поставка == Банка путем својих филијала (прати се назив и адреса) у разним местима (п…</title>
		<link rel="alternate" type="text/html" href="https://siwiki.rs/w/index.php?title=%D0%91%D0%B0%D0%B7%D0%B5_%D0%BF%D0%BE%D0%B4%D0%B0%D1%82%D0%B0%D0%BA%D0%B0_1/%D0%9B%D0%B0%D0%B1_1_%D1%98%D0%B0%D0%BD%D1%83%D0%B0%D1%80_2021&amp;diff=1637&amp;oldid=prev"/>
		<updated>2021-02-04T18:30:55Z</updated>

		<summary type="html">&lt;p&gt;Нова страница: {{tocright}}  == Поставка == Банка путем својих филијала (прати се назив и адреса) у разним местима (п…&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Нова страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{tocright}}&lt;br /&gt;
&lt;br /&gt;
== Поставка ==&lt;br /&gt;
Банка путем својих филијала (прати се назив и адреса) у разним местима (прате се поштански број и назив) опслужује своје комитенте (прати се назив и адреса) који могу бити без места, а у тренутку првог појављивања у банци пријављују седиште у одређеном месту.&lt;br /&gt;
&lt;br /&gt;
Сваки комитент може да има више рачуна у свакој од филијала (прате се статус, број ставки, дозвољени минус, и стање), а мора имати бар један рачун. Статус рачуна може бити активан, блокиран или угашен. Рачун постаје блокиран када пређе у недозвољени минус, а активира се када стање пређе у дозвољени минус.&lt;br /&gt;
&lt;br /&gt;
Комитенти са својих рачуна врше трансакције путем ставки промета (прате се редни број, датум и време) које могу бити уплате (прати се основ и износ) или исплате (прате се износ и провизија), при чему је то могуће у било којој филијали.&lt;br /&gt;
&lt;br /&gt;
[[Датотека:BP1 Lab 1 semestralni dijagram.png|center|ЕР дијаграм базе из поставке задатка.]]&lt;br /&gt;
&lt;br /&gt;
== Задатак ==&lt;br /&gt;
Написати програм који врши уплату за задати рачун. Функција као аргументе прима idFil, idRac и износ. Треба да се обавести корисник уколико је рачун након уплате променио статус, као и да ли је уплата била успешна. Функција је потребно да буде отпорна на грешке.&lt;br /&gt;
&lt;br /&gt;
== Решење ==&lt;br /&gt;
За решавање је потребна [https://rti.etf.bg.ac.rs/rti/bp1/materijali/vezbe/Banka.db Banka.db] база са странице предмета и [https://sqlite.org/download.html SQLite C библиотека] за комуникацију с базом. Оба су већ дата на лабораторијској вежби.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;string&amp;gt;&lt;br /&gt;
#include &amp;quot;sqlite3.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
sqlite3 *otvoriBazu(const char *imeBaze) {&lt;br /&gt;
    sqlite3 *baza = nullptr;&lt;br /&gt;
    int kod = sqlite3_open(imeBaze, &amp;amp;baza);&lt;br /&gt;
    if (kod != SQLITE_OK) {&lt;br /&gt;
        throw std::string(&amp;quot;Kod pri otvaranju: &amp;quot;) + std::to_string(kod);&lt;br /&gt;
    }&lt;br /&gt;
    return baza;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void zatvoriBazu(sqlite3 *baza) {&lt;br /&gt;
    int kod = sqlite3_close(baza);&lt;br /&gt;
    if (kod != SQLITE_OK) {&lt;br /&gt;
        throw std::string(&amp;quot;Kod pri zatvaranju: &amp;quot;) + std::to_string(kod);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void pripremi(sqlite3 *baza, const char *sql, sqlite3_stmt *&amp;amp;stmt) {&lt;br /&gt;
    int kod = sqlite3_prepare(baza, sql, -1, &amp;amp;stmt, nullptr);&lt;br /&gt;
    if (kod != SQLITE_OK) {&lt;br /&gt;
        std::string greska = std::string(&amp;quot;Greška pri pripremanju upita: &amp;quot;) + sqlite3_errmsg(baza);&lt;br /&gt;
        sqlite3_finalize(stmt);&lt;br /&gt;
        throw greska;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void izvrsiBezParametara(sqlite3 *baza, const char *sql, int (*callback)(void *, int, char **, char **) = nullptr) {&lt;br /&gt;
    char *errmsg = nullptr;&lt;br /&gt;
    int kod = sqlite3_exec(baza, sql, callback, nullptr, &amp;amp;errmsg);&lt;br /&gt;
    if (kod != SQLITE_OK) {&lt;br /&gt;
        std::string greska = std::string(&amp;quot;Greška pri izvršavanju: &amp;quot;) + errmsg;&lt;br /&gt;
        sqlite3_free(errmsg);&lt;br /&gt;
        throw greska;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void proknjiziUplatu(sqlite3 *baza) {&lt;br /&gt;
    const char *sql = &amp;quot;INSERT INTO Uplata (IdSta, Osnov) VALUES (?, &amp;#039;Uplata&amp;#039;)&amp;quot;;&lt;br /&gt;
    sqlite3_stmt *stmt = nullptr;&lt;br /&gt;
    int kod;&lt;br /&gt;
    pripremi(baza, sql, stmt);&lt;br /&gt;
    sqlite3_bind_int(stmt, 1, sqlite3_last_insert_rowid(baza));&lt;br /&gt;
    kod = sqlite3_step(stmt);&lt;br /&gt;
    if (kod != SQLITE_DONE) {&lt;br /&gt;
        std::string greska = std::string(&amp;quot;Greška pri proknjižavanju uplate: &amp;quot;) + sqlite3_errmsg(baza);&lt;br /&gt;
        sqlite3_finalize(stmt);&lt;br /&gt;
        throw greska;&lt;br /&gt;
    }&lt;br /&gt;
    sqlite3_finalize(stmt);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void proknjiziStavku(sqlite3 *baza, int iznos, int idFil, int idRac) {&lt;br /&gt;
    const char *sql = &amp;quot;INSERT INTO Stavka (RedBroj, Datum, Vreme, Iznos, IdFil, IdRac) &amp;quot;&lt;br /&gt;
        &amp;quot;SELECT COALESCE(MAX(S.RedBroj), 0) + 1, DATE(), TIME(), ?, ?, ? &amp;quot;&lt;br /&gt;
        &amp;quot;FROM Stavka S &amp;quot;&lt;br /&gt;
        &amp;quot;WHERE S.IdRac = ?&amp;quot;;&lt;br /&gt;
    sqlite3_stmt *stmt = nullptr;&lt;br /&gt;
    int kod;&lt;br /&gt;
    pripremi(baza, sql, stmt);&lt;br /&gt;
    sqlite3_bind_int(stmt, 1, iznos);&lt;br /&gt;
    sqlite3_bind_int(stmt, 2, idFil);&lt;br /&gt;
    sqlite3_bind_int(stmt, 3, idRac);&lt;br /&gt;
    sqlite3_bind_int(stmt, 4, idRac);&lt;br /&gt;
    izvrsiBezParametara(baza, &amp;quot;BEGIN TRANSACTION&amp;quot;);&lt;br /&gt;
    kod = sqlite3_step(stmt);&lt;br /&gt;
    if (kod != SQLITE_DONE) {&lt;br /&gt;
        std::string greska = std::string(&amp;quot;Greška pri proknjižavanju stavke: &amp;quot;) + sqlite3_errmsg(baza);&lt;br /&gt;
        sqlite3_finalize(stmt);&lt;br /&gt;
        throw greska;&lt;br /&gt;
    }&lt;br /&gt;
    sqlite3_finalize(stmt);&lt;br /&gt;
    proknjiziUplatu(baza);&lt;br /&gt;
    if (azurirajRacun(baza, idRac, iznos)) {&lt;br /&gt;
        std::cout &amp;lt;&amp;lt; &amp;quot;Račun promenio status u aktivan. &amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    izvrsiBezParametara(baza, &amp;quot;COMMIT TRANSACTION&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
bool azurirajRacun(sqlite3 *baza, int idRac, int novIznos) {&lt;br /&gt;
    const char *sql1 = &amp;quot;SELECT Status, Stanje, DozvMinus FROM Racun&amp;quot;&lt;br /&gt;
        &amp;quot;WHERE IdRac = ?&amp;quot;;&lt;br /&gt;
    const char *sql2 = &amp;quot;UPDATE Racun &amp;quot;&lt;br /&gt;
        &amp;quot;SET Status = ?1&amp;quot;&lt;br /&gt;
        &amp;quot;BrojStavki = (SELECT MAX(IdSta) FROM Stavka WHERE IdRac = ?2),&amp;quot;&lt;br /&gt;
        &amp;quot;Stanje = ?3&amp;quot;&lt;br /&gt;
        &amp;quot;WHERE IdRac = ?2&amp;quot;;&lt;br /&gt;
    sqlite3_stmt *stmt = nullptr;&lt;br /&gt;
    int kod;&lt;br /&gt;
    pripremi(baza, sql1, stmt);&lt;br /&gt;
    sqlite3_bind_int(stmt,1,idRac);&lt;br /&gt;
    kod = sqlite3_step(stmt);&lt;br /&gt;
    if (kod != SQLITE_ROW) {&lt;br /&gt;
        std::string greska = std::string(&amp;quot;Greška pri ažuriranju računa: &amp;quot;) + sqlite3_errmsg(baza);&lt;br /&gt;
        sqlite3_finalize(stmt);&lt;br /&gt;
        throw greska;&lt;br /&gt;
    }&lt;br /&gt;
    int staroStanje = sqlite3_column_int(stmt,1);&lt;br /&gt;
    int dMinus = sqlite3_column_int(stmt,2);&lt;br /&gt;
    const char *status = (const char*)sqlite3_column_text(stmt,0);&lt;br /&gt;
    sqlite3_finalize(stmt);&lt;br /&gt;
&lt;br /&gt;
    stmt = nullptr;&lt;br /&gt;
    pripremi(baza, sql2, stmt);&lt;br /&gt;
    sqlite3_bind_text(stmt, 1, (staroStanje + novIznos &amp;gt; dMinus) ? &amp;quot;A&amp;quot; : status, 1, nullptr);&lt;br /&gt;
    sqlite3_bind_int(stmt, 2, idRac);&lt;br /&gt;
    sqlite3_bind_int(stmt, 3, staroStanje + novIznos);&lt;br /&gt;
    kod = sqlite3_step(stmt);&lt;br /&gt;
    if (kod != SQLITE_DONE) {&lt;br /&gt;
        std::string greska = std::string(&amp;quot;Greška pri ažuriranju računa: &amp;quot;) + sqlite3_errmsg(baza);&lt;br /&gt;
        sqlite3_finalize(stmt);&lt;br /&gt;
        throw greska;&lt;br /&gt;
    }&lt;br /&gt;
    sqlite3_finalize(stmt);&lt;br /&gt;
    return staroStanje + novIznos &amp;gt; dMinus;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int main(void) {&lt;br /&gt;
    try {&lt;br /&gt;
        sqlite3 *baza = otvoriBazu(&amp;quot;Banka.db&amp;quot;);&lt;br /&gt;
        int idRac, idFil, iznos;&lt;br /&gt;
        std::cout &amp;lt;&amp;lt; &amp;quot;Unesi ID računa: &amp;quot;;&lt;br /&gt;
        std::cin &amp;gt;&amp;gt; idRac;&lt;br /&gt;
        std::cout &amp;lt;&amp;lt; &amp;quot;Unesi ID filijale: &amp;quot;;&lt;br /&gt;
        std::cin &amp;gt;&amp;gt; idFil;&lt;br /&gt;
        std::cout &amp;lt;&amp;lt; &amp;quot;Unesi iznos: &amp;quot; ;&lt;br /&gt;
        std::cin &amp;gt;&amp;gt; iznos;&lt;br /&gt;
        proknjiziStavku(baza, iznos, idFil, idRac);&lt;br /&gt;
        std::cout &amp;lt;&amp;lt; &amp;quot;Uspešno procesirana uplata. &amp;quot;;&lt;br /&gt;
        zatvoriBazu(baza);&lt;br /&gt;
    }&lt;br /&gt;
    catch (std::string &amp;amp;greska) {&lt;br /&gt;
        izvrsiBezParametara(baza, &amp;quot;ROLLBACK TRANSACTION&amp;quot;);&lt;br /&gt;
        std::cout &amp;lt;&amp;lt; &amp;quot;Desila se greška.&amp;quot; &amp;lt;&amp;lt; std::endl &amp;lt;&amp;lt; greska &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
        return EXIT_FAILURE;&lt;br /&gt;
    }&lt;br /&gt;
    return EXIT_SUCCESS;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Категорија:Базе података 1]]&lt;/div&gt;</summary>
		<author><name>TopOfKeks</name></author>
	</entry>
</feed>