From ec924ab5000e28dc911afdc907d08a17f1687353 Mon Sep 17 00:00:00 2001 From: Pedro Date: Mon, 17 Nov 2014 22:13:29 +0100 Subject: [PATCH] minor changes to frontend --- frontend-hyrise/index.html | 2 +- frontend-hyrise/run_server.sh | 10 +++++++++- frontend-hyrise/sample-queries.sql | 12 +++++++----- frontend-hyrise/style.css | 20 +++++++++----------- 4 files changed, 26 insertions(+), 18 deletions(-) diff --git a/frontend-hyrise/index.html b/frontend-hyrise/index.html index ba2a279..87f0514 100644 --- a/frontend-hyrise/index.html +++ b/frontend-hyrise/index.html @@ -31,7 +31,7 @@
- +
diff --git a/frontend-hyrise/run_server.sh b/frontend-hyrise/run_server.sh index b0b4362..02d1ca9 100755 --- a/frontend-hyrise/run_server.sh +++ b/frontend-hyrise/run_server.sh @@ -1,2 +1,10 @@ #!/bin/sh -python -m SimpleHTTPServer 10101 \ No newline at end of file + +# Default Port +PORT="10101" + +if [ $# -gt 0 ]; then + PORT=$1 +fi + +python -m SimpleHTTPServer ${PORT} \ No newline at end of file diff --git a/frontend-hyrise/sample-queries.sql b/frontend-hyrise/sample-queries.sql index 62203fa..ad70789 100644 --- a/frontend-hyrise/sample-queries.sql +++ b/frontend-hyrise/sample-queries.sql @@ -3,13 +3,15 @@ CREATE TABLE IF NOT EXISTS students FROM TBL FILE 'test/students.tbl'; CREATE TABLE IF NOT EXISTS test FROM TBL FILE 'test/lin_xxs.tbl'; CREATE TABLE IF NOT EXISTS companies FROM TBL FILE 'test/tables/companies.tbl'; CREATE TABLE IF NOT EXISTS employees FROM TBL FILE 'test/tables/employees.tbl'; -# SELECT (1) -SELECT * FROM students; -# SELECT (2) +# SELECT +SELECT * FROM students WHERE grade <= 2.0; +# SUB-SELECT SELECT name, city, grade FROM (SELECT * FROM students WHERE city = 'Potsdam') t1 WHERE grade <= 1.5 OR grade >= 3.5; # GROUP SELECT city, AVG(grade) AS average|, MIN(grade) AS best, MAX(grade) AS worst FROM students GROUP BY city; # UNION SELECT * FROM students WHERE grade = 1.3 UNION SELECT * FROM students WHERE grade = 3.7; -# JOIN -SELECT * FROM companies JOIN employees ON company_id = employee_company_id \ No newline at end of file +# SIMPLE JOIN +SELECT * FROM companies JOIN employees ON company_id = employee_company_id; +# HASH JOIN +SELECT * FROM companies HASH JOIN employees ON company_id = employee_company_id; \ No newline at end of file diff --git a/frontend-hyrise/style.css b/frontend-hyrise/style.css index 5d7589a..d5888a0 100644 --- a/frontend-hyrise/style.css +++ b/frontend-hyrise/style.css @@ -7,19 +7,17 @@ div { margin: auto; } -.content { - width: 90%; - margin: auto; - margin-top: 10px; -} - button { margin-left: 1px; margin-right: 1px; } -/* -#resultTable td { - border: 1px solid #333; - padding: 10px; -}*/ \ No newline at end of file +table { + font-size: 14px; +} + +.content { + width: 90%; + margin: auto; + margin-top: 10px; +} \ No newline at end of file