- Notifications
You must be signed in to change notification settings - Fork0
RQL (Rule Query Language) is a framework that allows users to mine dependencies on top of relational databases
License
lias-laboratory/rql
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
RQL (Rule Query Language) is a framework that allows the user to mine dependencies such as association rules, functional dependencies, order dependencies, etc.
This project includes a Web interface to write SQL or RQL queries on top of a local DBMS, and browse generated rules.
You can read more about RQL using the following resources:
- RQL: A Query Language for Rule Discovery in Databases, a TCS paper, 2017.
- RQL: An SQL-like Query Language for Discovering Meaningful Rules, an ICDM demo, 2014.
- Query Rewriting for Rule Mining in Databases, an LML workshop paper, 2013.
- Armstrong-compliant Logical Query Languages, an LID workshop paper, 2011.
- Docker (that's all)
RQL building and deployment have been tested on:
- macOS Sonoma x86 and ARM (with Docker Desktop),
- Ubuntu 20.04.6 LTS
- Debian 12.5
- Raspberry Pi 5 with Pi OS Lite (64-bit)
In fact, any operating system that supportsDocker should be able to build RQL.
The RQL front-end requires an x86 architecture.Its Docker container can be run on an emulated environment.On Linux ARM (e.g. Raspberry Pi), consider installing QEMU.
$docker compose build
- Create all containers
$docker compose up -d
- Initialize the database
$dockerexec -i rql_db psql -U postgres< db_init.sql
- Open thehttp://localhost/rql URL with your favorite web browser.
To log in, the default account has credentials admin/adminadmin.
The following example is based on a sample employee table. It can be created from the RQL main query form, which supports both SQL and RQL queries.
CREATETABLEemp ( empnoINT, lastnameVARCHAR(20), workdeptVARCHAR(3), jobVARCHAR(20), educlevelINT, genderCHAR, salINT, bonusINT, commINT, mgrnoINT);INSERT INTO EMPVALUES (10,'SPEN','C01','FINANCE',18,'F',52750,500,4220,20);INSERT INTO EMPVALUES (20,'THOMP',NULL,'MANAGER',18,'M',41250,800,3300,NULL);INSERT INTO EMPVALUES (30,'KWAN',NULL,'FINANCE',20,'F',38250,500,3060,10);INSERT INTO EMPVALUES (50,'GEYER',NULL,'MANAGER',16,'M',40175,700,3214,20);INSERT INTO EMPVALUES (60,'STERN','D21','SALE',14,'M',32250,500,2580,30);INSERT INTO EMPVALUES (70,'PULASKI','D21','SALE',16,'F',36170,700,2893,100);INSERT INTO EMPVALUES (90,'HENDER','D21','SALE',17,'F',29750,500,2380,10);INSERT INTO EMPVALUES (100,'SPEN','C01','FINANCE',18,'M',26150,800,2092,20);
RQL can then be used to identify dependencies within the data. For instance, the following query identifies functional dependencies.
FINDRULESOVER empno, lastname, workdept, job, educlevel, gender, sal, bonus, comm, mgrnoSCOPE t1, t2 empCONDITION ON A IS t1.A = t2.A
New user accounts must be added manually.
$dockerexec -i rql_db psql -U postgres -d rql
INSERT INTO users (username, firstname, lastname, hashpassword, isadmin)VALUES('jdoe','Jane','Doe','<bcrypt hashed password>', FALSE);
RQL uses the original version of bcrypt hashing with 12 rounds.Therefore, hashed passwords should be of the form:$2a$12$...
.
An example of such password is provided at the end of thedb_init.sql
file.
RQL has been partially funded by:
- LIRIS, INSA Lyon and the French National Research Agency (ANR), as part of the DAG project
- CNRS, as part of the Mastodons PetaSky, QualiSky and QDoSSI projects
- LIAS, ISAE-ENSMA and the MIRES research federation
- Mickael Baron, LIAS, ISAE-ENSMA
- Nicolas Buisson, LIRIS, INSA Lyon
- Brice Chardin, LIAS, ISAE-ENSMA
- Emmanuel Coquery, LIRIS, Université Claude Bernard Lyon 1
- Benjamin Gouriou, LIMOS, ISIMA
- Marie Pailloux, LIMOS, ISIMA
- Jean-Marc Petit, LIRIS, INSA Lyon
- Bilal Rezkellah, LIAS, ISAE-ENSMA
If you use RQL in a scientific publication, please reference the following work:
Chardin, B., Coquery, E., Pailloux, M., & Petit, J.-M. (2017). RQL: A Query Language for Rule Discovery in Databases. Theoretical Computer Science, 658, 357-374.
@article{rql2017,title={RQL: A Query Language for Rule Discovery in Databases},author={Chardin, Brice and Coquery, Emmanuel and Pailloux, Marie and Petit, Jean-Marc},journal={Theoretical Computer Science},volume={658},pages={357--374},year={2017},publisher={Elsevier},}
About
RQL (Rule Query Language) is a framework that allows users to mine dependencies on top of relational databases