LogiQL and SQL

Halpin, Terry and Rugaber, Spencer (2015) LogiQL and SQL. In: LogiQL: A Query Language for Smart Databases. Taylor & Francis Group, pp. 289-301. ISBN 9781482244939

[img]
Preview
Text
18_ft.pdf

Download (168kB) | Preview

Abstract

SQL is a standard language used for defining, manipulating, and querying relational databases. This appendix provides a brief discussion of how basic queries conveyed in SQL may be expressed in LogiQL. Consider the following relational database, which includes two relational tables (Tables H.1 and H.2) describing countries in 2011. The country table lists the ISO two-letter code, name, and population of various countries. For discussion purposes, the population of Finland (5,396,292) is omitted simply to illustrate SQL’s use of a null value to indicate that a data value is missing (e.g., because it is unknown or inapplicable). To save space, only a small number of countries are included. For those countries that have presidents, the president table lists the name, country, gender, and birth year of those presidents. Australia, Canada, and the United Kingdom have prime ministers instead of presidents, so they are not included in the president table. Throughout the database, countries are standardly identified by their country codes. The entries in the first two columns of the tables are necessarily unique, so each of these columns is a candidate key for its table. The country table has countryCode as its primary key and countryName as an alternate key.

Item Type: Book Section
Subjects: Q Science > QA Mathematics > QA76 Computer software
Divisions: Faculty of Engineering, Science and Mathematics > School of IT
Depositing User: Unnamed user with email masilah.mansor@newinti.edu.my
Date Deposited: 20 Jun 2016 02:34
Last Modified: 20 Jun 2016 02:34
URI: http://eprints.intimal.edu.my/id/eprint/339

Actions (login required)

View Item View Item