<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.3 20210610//EN" "JATS-journalpublishing1-3.dtd">
<article article-type="research-article" dtd-version="1.3" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xml:lang="ru"><front><journal-meta><journal-id journal-id-type="publisher-id">mais</journal-id><journal-title-group><journal-title xml:lang="ru">Моделирование и анализ информационных систем</journal-title><trans-title-group xml:lang="en"><trans-title>Modeling and Analysis of Information Systems</trans-title></trans-title-group></journal-title-group><issn pub-type="ppub">1818-1015</issn><issn pub-type="epub">2313-5417</issn><publisher><publisher-name>Yaroslavl State University</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.18255/1818-1015-2015-2-248-258</article-id><article-id custom-type="elpub" pub-id-type="custom">mais-244</article-id><article-categories><subj-group subj-group-type="heading"><subject>Research Article</subject></subj-group><subj-group subj-group-type="section-heading" xml:lang="ru"><subject>Оригинальные статьи</subject></subj-group><subj-group subj-group-type="section-heading" xml:lang="en"><subject>Articles</subject></subj-group></article-categories><title-group><article-title>Кэширование запросов к реляционной базе данных с использованием областей истинности</article-title><trans-title-group xml:lang="en"><trans-title>Truth Space Method for Caching Database Queries</trans-title></trans-title-group></title-group><contrib-group><contrib contrib-type="author" corresp="yes"><name-alternatives><name name-style="eastern" xml:lang="ru"><surname>Мосин</surname><given-names>Сергей Владимирович</given-names></name><name name-style="western" xml:lang="en"><surname>Mosin</surname><given-names>S. V.</given-names></name></name-alternatives><bio xml:lang="ru"><p>Омский филиал, аспирант, 644043, Россия, г. Омск, ул. Певцова, 13</p></bio><bio xml:lang="en"><p>аспирант, Pevtsova str., 13, Omsk, 644043, Russia</p></bio><email xlink:type="simple">svmosin@gmail.com</email><xref ref-type="aff" rid="aff-1"/></contrib><contrib contrib-type="author" corresp="yes"><name-alternatives><name name-style="eastern" xml:lang="ru"><surname>Зыкин</surname><given-names>Сергей Владимирович</given-names></name><name name-style="western" xml:lang="en"><surname>Zykin</surname><given-names>S. V.</given-names></name></name-alternatives><bio xml:lang="ru"><p>Омский филиал, д-р техн. наук, профессор, 644043, Россия, г. Омск, ул. Певцова, 13</p></bio><bio xml:lang="en"><p>д-р техн. наук, профессор, Pevtsova str., 13, Omsk, 644043, Russia</p></bio><email xlink:type="simple">szykin@mail.ru</email><xref ref-type="aff" rid="aff-2"/></contrib></contrib-group><aff-alternatives id="aff-1"><aff xml:lang="ru"><institution>Федеральное государственне бюджетное учреждение науки Институт математики им. С.Л. Соболева Сибирского отделения Российской академии наук</institution><country>Россия</country></aff><aff xml:lang="en"><institution>Sobolev Institute of Mathematics of the Siberian Branch of the Russian Academy of Sciences</institution><country>Russian Federation</country></aff></aff-alternatives><aff-alternatives id="aff-2"><aff xml:lang="ru"><institution>Федеральное государственне бюджетное учреждение науки Институт математики&#13;
им. С.Л. Соболева Сибирского отделения Российской академии наук</institution><country>Россия</country></aff><aff xml:lang="en"><institution>Sobolev Institute of Mathematics of the Siberian Branch of the Russian Academy of Sciences</institution><country>Russian Federation</country></aff></aff-alternatives><pub-date pub-type="collection"><year>2015</year></pub-date><pub-date pub-type="epub"><day>20</day><month>04</month><year>2015</year></pub-date><volume>22</volume><issue>2</issue><fpage>248</fpage><lpage>258</lpage><permissions><copyright-statement>Copyright &amp;#x00A9; Мосин С.В., Зыкин С.В., 2015</copyright-statement><copyright-year>2015</copyright-year><copyright-holder xml:lang="ru">Мосин С.В., Зыкин С.В.</copyright-holder><copyright-holder xml:lang="en">Mosin S.V., Zykin S.V.</copyright-holder><license xml:lang="ru" license-type="creative-commons-attribution" xlink:href="https://creativecommons.org/licenses/by/4.0/" xlink:type="simple"><license-p>Данная работа распространяется под лицензией Creative Commons Attribution 4.0.</license-p></license><license xml:lang="en" license-type="creative-commons-attribution" xlink:href="https://creativecommons.org/licenses/by/4.0/" xlink:type="simple"><license-p>This work is licensed under a Creative Commons Attribution 4.0 License.</license-p></license></permissions><self-uri xlink:href="https://www.mais-journal.ru/jour/article/view/244">https://www.mais-journal.ru/jour/article/view/244</self-uri><abstract><p>В данной статье предлагается новый метод кэширования запросов к реляционной базе данных для систем с центральным сервером и распределенными клиентами. Данные загружаются в клиентский кэш, основываясь на запросах, выполненных на сервере БД. Каждому запросу ставится в соответствие таблица – результат выполнения запроса. Эти запросы имеют специальный вид, называемый "универсальный реляционный запрос", основанный на трех базисных операциях реляционной алгеб- ры: селекции, проекции, естественном соединении (natural join). Следует отметить, что такая форма запроса наиболее близка к естественному языку и большинство запросов может быть записано в этом виде. Кроме того, эта форма записи позволяет анализировать корректность запроса, проверяя свойство соединения без потери информации (СБПИ). Последовательные запросы могут исполняться на клиенте, используя кэш, если удастся определить, что результаты искомого запроса полностью содержатся в кэше. Для осуществления такой проверки анализируются области истинности логических ограничений искомого запроса и запросов, результаты которых уже содержатся в кэше. Требуемые операции могут быть проведены аналитически, без необходимости дополнительных запросов к базе банных. Предложенный метод может быть использован для определения недостающих в кэше данных и последующего запроса только на эти данные. Для этого также используются аналитические вычисления, что является принципиальным отличием данной статьи от существующих технологий. Для этой цели в статье представлено четыре теоремы. В первой и третьей теореме получены условия, позволяющие определить наличие необходимых данных, а во второй и четвертой получены условия вычисления данных только с использованием кэша. Проблема актуализации данных не затрагивается в этой статье. Однако она может быть решена путем учета запросов на сервере и обновлении данных при помощи триггеров. Статья публикуется в авторской редакции.</p></abstract><trans-abstract xml:lang="en"><p>We propose a new method of client-side data caching for relational databases with a central server and distant clients. Data are loaded into the client cache based on queries executed on the server. Every query has the corresponding DB table – the result of the query execution. These queries have a special form called "universal relational query" based on three fundamental Relational Algebra operations: selection, projection and natural join. We have to mention that such a form is the closest one to the natural language and the majority of database search queries can be expressed in this way. Besides, this form allows us to analyze query correctness by checking lossless join property. A subsequent query may be executed in a client’s local cache if we can determine that the query result is entirely contained in the cache. For this we compare truth spaces of the logical restrictions in a new user’s query and the results of the queries execution in the cache. Such a comparison can be performed analytically , without need in additional Database queries. This method may be used to define lacking data in the cache and execute the query on the server only for these data. To do this the analytical approach is also used, what distinguishes our paper from the existing technologies. We propose four theorems for testing the required conditions. The first and the third theorems conditions allow us to define the existence of required data in cache. The second and the fourth theorems state conditions to execute queries with cache only. The problem of cache data actualizations is not discussed in this paper. However, it can be solved by cataloging queries on the server and their serving by triggers in background mode. The article is published in the author’s wording.</p></trans-abstract><kwd-group xml:lang="ru"><kwd>реляционная база данных</kwd><kwd>кэш</kwd><kwd>область истинности</kwd></kwd-group><kwd-group xml:lang="en"><kwd>ational databases</kwd><kwd>caching</kwd><kwd>truth space</kwd></kwd-group></article-meta></front><back><ref-list><title>References</title><ref id="cit1"><label>1</label><citation-alternatives><mixed-citation xml:lang="ru">Zykin S., Poluyanov A., “Multidimensional data building using intermediate representations”, Administration problems, 5 (2013), 54–59.</mixed-citation><mixed-citation xml:lang="en">Zykin S., Poluyanov A., “Multidimensional data building using intermediate representations”, Administration problems, 5 (2013), 54–59.</mixed-citation></citation-alternatives></ref><ref id="cit2"><label>2</label><citation-alternatives><mixed-citation xml:lang="ru">Owens J. D. et al., “A survey of general-purpose computation on graphics hardware”, Computer Graphics Forum, 26, 2007, 80–113, http://www.blackwellsynergy.com/doi/pdf/10.1111/j.1467-8659.2007.01012.x.</mixed-citation><mixed-citation xml:lang="en">Owens J. D. et al., “A survey of general-purpose computation on graphics hardware”, Computer Graphics Forum, 26, 2007, 80–113, http://www.blackwellsynergy.com/doi/pdf/10.1111/j.1467-8659.2007.01012.x.</mixed-citation></citation-alternatives></ref><ref id="cit3"><label>3</label><citation-alternatives><mixed-citation xml:lang="ru">Bakkum P., Skadron K., “Accelerating sql database operations on a gpu with cuda”, GPGPU, ACM, 425 (2010), 94–103, http://dblp.unitrier.de/db/conf/asplos/gpgpu2010.html.</mixed-citation><mixed-citation xml:lang="en">Bakkum P., Skadron K., “Accelerating sql database operations on a gpu with cuda”, GPGPU, ACM, 425 (2010), 94–103, http://dblp.unitrier.de/db/conf/asplos/gpgpu2010.html.</mixed-citation></citation-alternatives></ref><ref id="cit4"><label>4</label><citation-alternatives><mixed-citation xml:lang="ru">Govindaraju N. K. et al., “Fast computation of database operations using graphics processors”, SIGMOD Conference, ACM, 2004, 215–226, http://dblp.unitrier.de/db/conf/sigmod/sigmod2004.html.</mixed-citation><mixed-citation xml:lang="en">Govindaraju N. K. et al., “Fast computation of database operations using graphics processors”, SIGMOD Conference, ACM, 2004, 215–226, http://dblp.unitrier.de/db/conf/sigmod/sigmod2004.html.</mixed-citation></citation-alternatives></ref><ref id="cit5"><label>5</label><citation-alternatives><mixed-citation xml:lang="ru">He B. et al., “Relational joins on graphics processors”, ACM, 2008, 511–524, http://dblp.uni-trier.de/db/conf/sigmod/sigmod2008.html.</mixed-citation><mixed-citation xml:lang="en">He B. et al., “Relational joins on graphics processors”, ACM, 2008, 511–524, http://dblp.uni-trier.de/db/conf/sigmod/sigmod2008.html.</mixed-citation></citation-alternatives></ref><ref id="cit6"><label>6</label><citation-alternatives><mixed-citation xml:lang="ru">Park C.-S., Kim M.-H., Lee Y.-J., “Usability-based caching of query results in olap systems”, Journal of Systems and Software, 68:2 (2003), 103–119.</mixed-citation><mixed-citation xml:lang="en">Park C.-S., Kim M.-H., Lee Y.-J., “Usability-based caching of query results in olap systems”, Journal of Systems and Software, 68:2 (2003), 103–119.</mixed-citation></citation-alternatives></ref><ref id="cit7"><label>7</label><citation-alternatives><mixed-citation xml:lang="ru">Baralis E., Paraboschi S., Teniente E., “Materialized views selection in a multidimensional database”, Proceedings of the 23rd International Conference on Very Large Data Bases, VLDB ’97, Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 1997, 156–165,</mixed-citation><mixed-citation xml:lang="en">Baralis E., Paraboschi S., Teniente E., “Materialized views selection in a multidimensional database”, Proceedings of the 23rd International Conference on Very Large Data Bases, VLDB ’97, Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 1997, 156–165,</mixed-citation></citation-alternatives></ref><ref id="cit8"><label>8</label><citation-alternatives><mixed-citation xml:lang="ru">http://dl.acm.org/citation.cfm?id=645923.671019.</mixed-citation><mixed-citation xml:lang="en">http://dl.acm.org/citation.cfm?id=645923.671019.</mixed-citation></citation-alternatives></ref><ref id="cit9"><label>9</label><citation-alternatives><mixed-citation xml:lang="ru">Kalnis P., Papadias D., “Proxy-server architectures for olap.”, ACM, 2001, 367–378.</mixed-citation><mixed-citation xml:lang="en">Kalnis P., Papadias D., “Proxy-server architectures for olap.”, ACM, 2001, 367–378.</mixed-citation></citation-alternatives></ref><ref id="cit10"><label>10</label><citation-alternatives><mixed-citation xml:lang="ru">Afrati F. N., Li C., Mitra P., “Rewriting queries using views in the presence of arithmetic comparisons”, Theor. Comput. Sci., 368:1–2 (2006), 88–123.</mixed-citation><mixed-citation xml:lang="en">Afrati F. N., Li C., Mitra P., “Rewriting queries using views in the presence of arithmetic comparisons”, Theor. Comput. Sci., 368:1–2 (2006), 88–123.</mixed-citation></citation-alternatives></ref><ref id="cit11"><label>11</label><citation-alternatives><mixed-citation xml:lang="ru">Watanabe Y., Kitagawa H., “Query result caching for multiple eventdriven continuous queries”, Inf. Syst., 35:1 (2010), 94–110, http://dblp.unitrier.de/db/journals/is/is35.html#WatanabeK10.</mixed-citation><mixed-citation xml:lang="en">Watanabe Y., Kitagawa H., “Query result caching for multiple eventdriven continuous queries”, Inf. Syst., 35:1 (2010), 94–110, http://dblp.unitrier.de/db/journals/is/is35.html#WatanabeK10.</mixed-citation></citation-alternatives></ref><ref id="cit12"><label>12</label><citation-alternatives><mixed-citation xml:lang="ru">Yates D. J. et al., “Data quality and query cost in pervasive sensing systems”, IEEE Computer Society, 2008, 195–205, http://dblp.unitrier.de/db/conf/percom/percom2008.html#YatesNKS08.</mixed-citation><mixed-citation xml:lang="en">Yates D. J. et al., “Data quality and query cost in pervasive sensing systems”, IEEE Computer Society, 2008, 195–205, http://dblp.unitrier.de/db/conf/percom/percom2008.html#YatesNKS08.</mixed-citation></citation-alternatives></ref><ref id="cit13"><label>13</label><citation-alternatives><mixed-citation xml:lang="ru">Andrade H. et al., “Active semantic caching to optimize multidimensional data analysis in parallel and distributed environments”, Parallel Computing, 33:7–8 (2007), 497–520,</mixed-citation><mixed-citation xml:lang="en">Andrade H. et al., “Active semantic caching to optimize multidimensional data analysis in parallel and distributed environments”, Parallel Computing, 33:7–8 (2007), 497–520,</mixed-citation></citation-alternatives></ref><ref id="cit14"><label>14</label><citation-alternatives><mixed-citation xml:lang="ru">http://dblp.uni-trier.de/db/journals/pc/pc33.html#AndradeKSS07.</mixed-citation><mixed-citation xml:lang="en">http://dblp.uni-trier.de/db/journals/pc/pc33.html#AndradeKSS07.</mixed-citation></citation-alternatives></ref><ref id="cit15"><label>15</label><citation-alternatives><mixed-citation xml:lang="ru">Mershad K.W., Artail H., “Codisc: Collaborative and distributed semantic caching for maximizing cache effectiveness in wireless networks”, J. Parallel Distrib. Comput., 71:3 (2011), 495–511, http://dblp.uni-trier.de/db/journals/jpdc/jpdc71.html#MershadA11.</mixed-citation><mixed-citation xml:lang="en">Mershad K.W., Artail H., “Codisc: Collaborative and distributed semantic caching for maximizing cache effectiveness in wireless networks”, J. Parallel Distrib. Comput., 71:3 (2011), 495–511, http://dblp.uni-trier.de/db/journals/jpdc/jpdc71.html#MershadA11.</mixed-citation></citation-alternatives></ref><ref id="cit16"><label>16</label><citation-alternatives><mixed-citation xml:lang="ru">Noor Abbani H. A., “Protecting data flow anonymity in mobile ad hoc networks that employ cooperative caching”, Ad Hoc Networks, 26 (2015), 69–87.</mixed-citation><mixed-citation xml:lang="en">Noor Abbani H. A., “Protecting data flow anonymity in mobile ad hoc networks that employ cooperative caching”, Ad Hoc Networks, 26 (2015), 69–87.</mixed-citation></citation-alternatives></ref><ref id="cit17"><label>17</label><citation-alternatives><mixed-citation xml:lang="ru">Tansel Dokeroglu A. C., Ali Bayir Murat, “Robust heuristic algorithms for exploiting the common tasks of relational cloud database queries”, Applied Soft Computing.</mixed-citation><mixed-citation xml:lang="en">Tansel Dokeroglu A. C., Ali Bayir Murat, “Robust heuristic algorithms for exploiting the common tasks of relational cloud database queries”, Applied Soft Computing.</mixed-citation></citation-alternatives></ref><ref id="cit18"><label>18</label><citation-alternatives><mixed-citation xml:lang="ru">Beran P. P. et al., “A multi-staged blackboard query optimization framework for worldspanning distributed database resources”, ICCS, 4, Procedia Computer Science (2011), 156–165, http://dblp.uni-trier.de/db/journals/procedia/procedia4.html#BeranMSV11.</mixed-citation><mixed-citation xml:lang="en">Beran P. P. et al., “A multi-staged blackboard query optimization framework for worldspanning distributed database resources”, ICCS, 4, Procedia Computer Science (2011), 156–165, http://dblp.uni-trier.de/db/journals/procedia/procedia4.html#BeranMSV11.</mixed-citation></citation-alternatives></ref><ref id="cit19"><label>19</label><citation-alternatives><mixed-citation xml:lang="ru">Meij E. et al., “Mapping queries to the linking open data cloud: A case study using dbpedia”, J. Web Sem., 9:4 (2011), 418–433, http://dblp.unitrier.de/db/journals/ws/ws9.html#MeijBHHR11.</mixed-citation><mixed-citation xml:lang="en">Meij E. et al., “Mapping queries to the linking open data cloud: A case study using dbpedia”, J. Web Sem., 9:4 (2011), 418–433, http://dblp.unitrier.de/db/journals/ws/ws9.html#MeijBHHR11.</mixed-citation></citation-alternatives></ref><ref id="cit20"><label>20</label><citation-alternatives><mixed-citation xml:lang="ru">Aranda C. B. et al., “Federating queries in sparql 1.1: Syntax, semantics and evaluation”, J. Web Sem., 18:1 (2013), 1–17, http://dblp.unitrier.de/db/journals/ws/ws18.html#ArandaACP13.</mixed-citation><mixed-citation xml:lang="en">Aranda C. B. et al., “Federating queries in sparql 1.1: Syntax, semantics and evaluation”, J. Web Sem., 18:1 (2013), 1–17, http://dblp.unitrier.de/db/journals/ws/ws18.html#ArandaACP13.</mixed-citation></citation-alternatives></ref><ref id="cit21"><label>21</label><citation-alternatives><mixed-citation xml:lang="ru">Keller A. M., Basu J., “A predicate-based caching scheme for client-server database architectures”, VLDB J., 5:1 (1996), 35–47.</mixed-citation><mixed-citation xml:lang="en">Keller A. M., Basu J., “A predicate-based caching scheme for client-server database architectures”, VLDB J., 5:1 (1996), 35–47.</mixed-citation></citation-alternatives></ref><ref id="cit22"><label>22</label><citation-alternatives><mixed-citation xml:lang="ru">Shim J., Scheuermann P., Vingralek R., “Dynamic caching of query results for decision support systems”, SSDBM, 1999, 254–263.</mixed-citation><mixed-citation xml:lang="en">Shim J., Scheuermann P., Vingralek R., “Dynamic caching of query results for decision support systems”, SSDBM, 1999, 254–263.</mixed-citation></citation-alternatives></ref></ref-list><fn-group><fn fn-type="conflict"><p>The authors declare that there are no conflicts of interest present.</p></fn></fn-group></back></article>
