Switch branches/tags
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
gf-grammars changed a couple of things rendered invalid by the backward incompati… Jan 11, 2017
grammars added countries example with SQL target grammar Apr 5, 2017
webapp
www QConv web interface: minor fixes Mar 1, 2018
.ghci Add .ghci to allow ghci to find generated source files Jan 25, 2018
.gitignore Makefile: put BNFC generated files in subdirectory "generated" Jan 24, 2018
Algebra.hs
AlgebraTree.hs join with condition translated to algebra Mar 22, 2018
Converter.hs
Design.hs fixed the foreign key tuple problem Feb 9, 2018
Fundep.hs
KeywordRelAlgebra.bnf reducing the use of parentheses in algebra Feb 19, 2016
Makefile
MinSQL.bnf restructured MinSQL, old one saved as v1, new compiler SQLCompiler to… Feb 13, 2016
MinSQL.hs Move some MinSQL functions from QConv.hs to a new module MinSQL.hs Jan 18, 2018
Natural.hs
OldToXML.hs
OptimizeAlgebra.hs
PrintXPath.hs
QConv.hs error message on unknown attributes in relation Feb 2, 2018
QConvCGI.hs QConv web interface: transfer XML from SQL page to XML & XPath page Mar 1, 2018
README updated README Oct 27, 2017
RelAlgebra.bnf join with condition translated to algebra Mar 22, 2018
Relation.hs added joins, let expressions, sorting direction, distinct aggregation… Feb 19, 2016
Relation2XML.hs
SQLCompiler.hs join with condition translated to algebra Mar 22, 2018
Setup.hs
ValidateXML.hs
Viewer.hs Use xdg-open to view files on linux Feb 9, 2016
XML.bnf changed a couple of things rendered invalid by the backward incompati… Jan 11, 2017
XPath.hs query-converter/XPath.hs: add function parseXPath Mar 1, 2018
alg-example.png query converter Feb 26, 2015
countries.sql dependent type checking à la Coquand ; not finished, eval broken Feb 27, 2016
countries.tsv tab-separated table of country data from Geonames Feb 1, 2016
course.sql some fixes of aggregations used in projections and conditions Feb 14, 2016
dict.xml
edu.txt added possibility of more than one support for weak entities Jan 26, 2016
er-example.png fixed typo in edu.txt Mar 4, 2015
fd-ex.txt fundeps and keys shown in qconv Mar 6, 2015
index.html better example Feb 26, 2015
mvd-ex.txt MVD example cleaned Mar 10, 2015
mvd1-ex.txt MVD examples Mar 10, 2015
qconv.cabal
v1MinSQL.bnf restructured MinSQL, old one saved as v1, new compiler SQLCompiler to… Feb 13, 2016
xpath-test.txt some fixes in XPath condition matching; still not complete Mar 7, 2016
xpath_Makefile Makefile for xpath Mar 3, 2015

README

Query Converter

(c) Aarne Ranta 2015-2017 under the BSD License

A simple converter for SQL, relational algebra, E-R diagrams, functional dependencies, normal forms, 
database schemas, XML, and some natural language.

To unpack the binary: do this in a terminal in the directory where you have the .gz file:

  gunzip qconv-mac.gz
  mv qconv-mac qconv

or 

  gunzip qconv-linux.gz
  mv qconv-linux qconv

To run:

  ./qconv

To compile from source:

  make

Facilities:

- convert SQL queries to relational algebra expressions
- convert simple text scripts to E-R diagrams and database schemas
- build and use databases in SQL via relational algebra
- convert relational database to XML

Examples:

- edu.txt    -- E-R design: try with 'd edu.txt'
- fd-ex.txt  -- functional dependencies, try with 'f fd-ex.txt' or 'n fd-ex.txt'
- course.sql -- SQL script: try with 'i course.sql'

These examples, together with qconv sources, can be found from

  https://github.com/GrammaticalFramework/gf-contrib/tree/master/query-converter/

Other programs needed:

- pdflatex  -- to display algebra formulas
- graphviz  -- to display E-R diagrams

and possibly:

- ghc       -- to compile sconv from source

ToDo:

- many features of SQL: types, constraints, updates, deletes...
- natural language generation and parsing (rudiments included)
- fix bugs


More documentation included in course notes:

http://www.cse.chalmers.se/edu/year/2017/course/TDA357/VT2017/notes/db-notes.pdf

Older but shorter documentation:

  http://www.grammaticalframework.org/~aarne/query-converter/database-maths.pdf