Making Query Coding in SQL Easier by Implementing the SQL Divide Keyword

Author(s):  
Eric Draken ◽  
Shang Gao ◽  
Reda Alhajj

Relational Algebra (RA) and structured query language (SQL) are supposed to have a bijective relationship by having the same expressive power. That is, each operation in SQL can be mapped to one RA equivalent and vice versa. Actually, this is an essential fact because in commercial database management systems, every SQL query is translated into equivalent RA expression, which is optimized and executed to produce the required output. However, RA has an explicit relational division symbol (÷), whereas SQL does not have a corresponding explicit division keyword. Division is implemented using a combination of four core operations, namely cross product, difference, selection, and projection. In fact, to implement relational division in SQL requires convoluted queries with multiple nested select statements and set operations. Explicit division in relational algebra is possible when the divisor is static; however, a dynamic divisor forces the coding of the query to follow the explicit expression using the four core operators. On the other hand, SQL does not provide any flexibility for expressing division when the divisor is static. Thus, the work described in this chapter is intended to provide SQL expression equivalent to explicit relational algebra division (with static divisor). In other words, the goal is to implement a SQL query rewriter in Java which takes as input a divide grammar and rewrites it to an efficient query using current SQL keywords. The developed approach could be adapted as front-end or wrapper to existing SQL query system.Users will be able to express explicit division in SQL which will be translated into an equivalent expression that involves only the standard SQL keywords and structure. This will turn SQL into more attractive for specifying queries involving explicit division.

2007 ◽  
Vol 01 (01) ◽  
pp. 11-28 ◽  
Author(s):  
PHILLIP C.-Y. SHEU ◽  
ATSUSHI KITAZAWA

One of the most important pieces of a database management system is its query language and the underlying algebra. This paper describes the query language of SemanticObjects, a development framework for object relational applications, and its associated object relational algebra. The paper also describes a semantic software engineering methodology that streamlines the development of object relational applications based on SemanticObjects.


2020 ◽  
Vol 10 (6) ◽  
pp. 6521-6525
Author(s):  
B. Nethravathi ◽  
G. Amitha ◽  
A. Saruka ◽  
T. P. Bharath ◽  
S. Suyagya

SQL (Structured Query Language) is a structured language for specialized purposes used to communicate with the data stored in a database management system. It uses dynamic and sophisticated query commands for processing and controlling data in a database, which can become an obstacle for users with no previous experience. In order to address this constraint, we have analyzed the existing models in Natural Language Processing, which convert a native-language query into an SQL query. Thus, any novice user can use the SQL program and eliminate the need to generate any complex queries. This work is a detailed survey of the existing literature.


1993 ◽  
Vol 22 (434) ◽  
Author(s):  
Kim Skak Larsen

<p>The subject of this Ph.D. thesis is the design and implementation of database languages. The thesis consists of five articles:</p><p> </p><dl> <dt> [1] </dt><dd> Joan F. Boyar and Kim S. Larsen. Efficient Rebalancing of Chromatic Search Trees. In O. Nurmi and E. Ukkonen, eds., <em> LNCS 621: Algorithm Theory -- SWAT'92 </em>, pp. 151-164. Springer-Verlag, 1992. </dd><dt> [2] </dt><dd> Kim S. Larsen. On Aggregation and Computation on Domain Values. PB-414, Computer Science Department, Aarhus University, 1992. </dd><dt> [3] </dt><dd> Kim S. Larsen. Strategies for Expression Evaluation Using Sort-Merge Algorithms. PB-415, Computer Science Department, Aarhus University, 1992. </dd><dt> [4] </dt><dd> Kim S. Larsen and Michael I. Schwartzbach. Injectivity of Unary Queries With Computation on Domain Values. Computer Science Department, Aarhus University, 1992. Revised version of PB-311. </dd><dt> [5] </dt><dd> Kim S. Larsen, Michael I. Schwartzbach and Erik M. Schmidt. A New Formalism for Relational Algebra. <em> IPL </em>, 41(3):163-168, 1992. </dd></dl> <p>and this survey paper. In [5], a new query language design is proposed. The expressive power of the language is determined in [2] and all reasonable extensions are considered. In [3, 4], we focus on the optimization issue of avoiding unnecessary sorting of relations. The results in these papers are directly applicable to any algebra-based query language. In addition to the query language part, a database system also has to offer update facilities. The theory of standard tuple based updates is quite well developed in the sequential case. In [1], we discuss a new concurrent implementation of balanced search trees for that purpose.</p><p>This survey paper describes the results of the papers which form the thesis, and relates these results to each other and to the area in a broader sense than is customary in the introductions of individual papers. The paper is intended to be read in combination with the papers on which it is based.</p>


2021 ◽  
Vol 178 (1-2) ◽  
pp. 59-76
Author(s):  
Emmanuel Filiot ◽  
Pierre-Alain Reynier

Copyless streaming string transducers (copyless SST) have been introduced by R. Alur and P. Černý in 2010 as a one-way deterministic automata model to define transductions of finite strings. Copyless SST extend deterministic finite state automata with a set of variables in which to store intermediate output strings, and those variables can be combined and updated all along the run, in a linear manner, i.e., no variable content can be copied on transitions. It is known that copyless SST capture exactly the class of MSO-definable string-to-string transductions, and are as expressive as deterministic two-way transducers. They enjoy good algorithmic properties. Most notably, they have decidable equivalence problem (in PSpace). On the other hand, HDT0L systems have been introduced for a while, the most prominent result being the decidability of the equivalence problem. In this paper, we propose a semantics of HDT0L systems in terms of transductions, and use it to study the class of deterministic copyful SST. Our contributions are as follows: (i)HDT0L systems and total deterministic copyful SST have the same expressive power, (ii)the equivalence problem for deterministic copyful SST and the equivalence problem for HDT0L systems are inter-reducible, in quadratic time. As a consequence, equivalence of deterministic SST is decidable, (iii)the functionality of non-deterministic copyful SST is decidable, (iv)determining whether a non-deterministic copyful SST can be transformed into an equivalent non-deterministic copyless SST is decidable in polynomial time.


2020 ◽  
Vol 4 (1) ◽  
pp. 8-13
Author(s):  
Zulkifli ◽  
Samsir

Kemanan website akses jaringan internet  merupakan hal yang perlu diperhatikan sangat serius. Serangan yang diakibatkan oleh sql injection mampu membobol sistem pertahanan website yang kita miliki jika tidak dilengkapai dengan pengamanan yang kuat.  Mengingat website ini dapat diakses secara luas, maka dinilai perlu memperhatikan keamanan website. Terdapat beberapa cara yang dapat digunakan untuk melakukan pengujian terhadap kemanan website, salah satunya adalah dengan melakukan SQL Injection. SQL injection adalah kerentanan yang terjadi ketika penyerang memiliki kemampuan untuk mempengaruhi Structured Query Language (SQL) query yang melewati suatu aplikasi ke database back-end. Dengan diadakannya penelitian ini, diharapkan dapat diperoleh kelemahan dari website. Kelemahan tersebut akan dianalisa sehingga memperoleh solusi kedepan guna pengembangan website yang lebih aman.


Author(s):  
Thomas Hainey ◽  
Mario Soflano ◽  
Thomas M. Connolly

The literature suggests that every learner has a particular Learning Style (LS) and it is beneficial for the teacher and the learning approach to adapt to and accommodate these differences. The traditional classroom fails to motivate some learners and to maintain their engagement level during learning, possibly because of lack of interactivity. Computer games on the other hand seem to be able to engage participants for prolonged periods of time and motivate them to replay the game repeatedly. Some educationalists consider games as a potential platform to support learning and the term Games-Based Learning (GBL) has been introduced into the curriculum to reflect this approach. While many GBL applications have been developed, there is still a lack of empirical evidence to support its validity. Furthermore, there are very few adaptive GBL applications developed and adaptive GBL frameworks proposed. Another issue with GBL is that games engage the learners differently compared to traditional teaching approaches or eLearning and learning styles may differ inside and outside of the game. For the purpose of this research, a game with three game modes was developed. The modes were 1) non-adaptivity mode, 2) a mode that customises the game according to the learner’s LS identified by a LS questionnaire, and 3) a mode with an in-game adaptive system based on a newly developed framework that can automatically adapt content according to the learner’s interactions with the game. GBL has been used to teach various disciplines; however, this research focuses on teaching Structured Query Language (SQL) at Higher Education (HE). A Randomised Controlled Trial (RCT) was conducted with 30 students for each of the above game modes and another 30 students in a control group who learned SQL using a traditional paper-based approach. The results show that the game developed, regardless of mode, produced better learning outcomes than those who learned from a textbook. Particularly for adaptive GBL, learning effectiveness was identified to be higher while the learning duration was shorter compared to the other modes of the game.


Author(s):  
Sonali Tidke

MongoDB is a NoSQL type of database management system which does not adhere to the commonly used relational database management model. MongoDB is used for horizontal scaling across a large number of servers which may have tens, hundreds or even thousands of servers. This horizontal scaling is performed using sharding. Sharding is a database partitioning technique which partitions large database into smaller parts which are easy to manage and faster to access. There are hundreds of NoSQL databases available in the market. But each NoSQL product is different in terms of features, implementations and behavior. NoSQL and RDBMS solve different set of problems and have different requirements. MongoDB has a powerful query language which extends SQL to JSON enabling developers to take benefit of power of SQL and flexibility of JSON. Along with support for select/from/where type of queries, MongoDB supports aggregation, sorting, joins as well as nested array and collections. To improve query performance, indexes and many more features are also available.


2019 ◽  
pp. 128-153
Author(s):  
Stephen Yablo

The philosopher Hilary Putnam uses model theory to cast doubt on our ability to engage semantically with an objective world. The role of mathematics for him is to prove this pessimistic conclusion. The present chapter, on the other hand, explores how models can help us to engage semantically with the objective world. Mathematics functions here as an analogy. Among their many other accomplishments, numbers boost the language’s expressive power; they give us access to recondite physical facts. Models, among their many other accomplishments, do the same thing. This is the analogy this chapter attempts to develop.


Sign in / Sign up

Export Citation Format

Share Document