Difference between revisions of "SQLZOO:About"

From SQLZOO
Jump to: navigation, search
 
(12 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
SQLZoo includes tutorials and reference to support people learning SQL.
 
SQLZoo includes tutorials and reference to support people learning SQL.
It features:
+
 
 +
It is based on MediaWiki and it allows users to change the content.
 +
http://www.mediawiki.org/wiki/Help:Editing_pages shows how to edit pages in "standard" media wiki.
 +
*Only users with the '''teacher''' role can edit pages.
 +
**Any teachers who can help with fixing errors or creating content are most welcome
 +
**Send an email (ideally from an educational address) to qa-sqlzoo@gmail.com and tell us your user name - we can add that role so that you can edit.
 +
 
 +
SQLZoo features:
 
*Interactive access to several SQL engines
 
*Interactive access to several SQL engines
 
*Sample databases
 
*Sample databases
Line 6: Line 13:
 
*Instant feedback on the success of the student's attempts
 
*Instant feedback on the success of the student's attempts
 
==Format==
 
==Format==
 +
SQLZoo includes a number of extensions to normal Wiki text:
 +
*class='qu'
 +
**A div with class <code>qu</code> is interpreted as an interactive question.
 +
**A <code>div.qu</code> element should include a <code>source.def</code> element
 +
***This contains the default text that the user sees.
 +
***Sometime this is a useful hint and is close to the correct answer.
 +
***It may be empty - but users often click without changing the text before even looking at it
 +
**A <code>div.qu</code> element may include a <code>source.ans</code> element
 +
***This contains the correct SQL.
 +
***This is hidden from the user (but not well hidden)
 +
***The user's result is compared with the answers result and a score is calculated
 
Here is an example of a question:
 
Here is an example of a question:
 
+
<pre><nowiki>
==Warming up==
+
==Warming up==
&lt;div class='qu'>
+
<div class='qu'>
[[Read the notes about this table.]] Observe the result of running a simple SQL command.
+
[[Read the notes about this table.]] Observe the result of running a simple SQL command.
&lt;source lang='sql' class='def'>
+
<source lang='sql' class='def'>
SELECT name, region, population FROM bbc
+
SELECT name, region, population FROM bbc
&lt;/source>
+
</source>
&lt;source lang='sql' class='ans'>
+
<source lang='sql' class='ans'>
SELECT name, region, population FROM bbc
+
SELECT name, region, population FROM bbc
&lt;/source>
+
</source>
&lt;/div>
+
</div>
 
+
</nowiki></pre>
 
And here is how that looks when rendered...
 
And here is how that looks when rendered...
 +
 
==Warming up==
 
==Warming up==
 
<div class='qu'>
 
<div class='qu'>
Line 31: Line 50:
 
</div>
 
</div>
  
 +
==StartAt==
 +
You can include a ***startAt*** span at the top of the page. This will ensure that question numbering starts at the specified value.
 +
<pre>
 +
<nowiki>
 +
<span id=startAt class=params>6</span>
 +
</nowiki>
 +
</pre>
 +
 +
==respectorder==
 +
Most questions do not respect order - a querry is considered correct even if the order of the student's work differs from the correct answer.
 +
You can over-ride that rule by insisting that the question respects order. Place this invisible tag in your qu tag.
 +
<pre>
 +
<nowiki>
 +
<span class='params respectorder'></span>
 +
</nowiki>
 +
</pre>
 +
 +
==Hints==
 +
You can include a hint. The title will be shown, if the user clicks on the text the body will be revealed:
 +
<div class='hint' title='Clicik here to see the hint'>Now the hint has been revealed</div>
 +
<pre>
 +
<nowiki>
 +
<div class='hint' title='Click here to see the hint'>Now the hint has been revealed</div>
 +
</nowiki>
 +
</pre>
 +
==Clear Results==
 +
<pre>
 +
<nowiki>
 +
<div class="lsclear">Clear your results</div>
 +
</nowiki>
 +
</pre>
 +
<div class="lsclear">Clear your results</div>
 +
 +
==Setting up AWS server==
 +
*Start with Amazon Linux - pick a paravirtual one from the bottom of the list of AMI - the ones at the top
 +
*Use classic network
 +
*Log in as ec2-user
 +
sudo su
 +
yum install httpd
 +
scp -C andrew@146.176.166.2:sqlzoo-source.tar ~
 +
mv ~/public_html/sqlzoo /var/www/html
 +
yum install mysql-server
 +
/etc/init.d/mysqld start
 +
/usr/bin/mysqladmin -u root password 'topsecret'
 +
scp andrew@146.176.166.2:sqlzoo_wiki.sql.gz ~
 +
scp andrew@146.176.166.2:gisq.sql.gz ~
 +
 +
yum install php
 +
yum install php-pear
 +
yum install php-mysql
 +
/etc/init.d/httpd restart
 +
 +
mysql...
 +
create database gisq;
 +
grant all on gisq.* to gisq@localhost identified by 'brazil';
 +
grant select on gisq.* to scott identified by 'tiger';
 +
create database scott;
 +
use scott
 +
grant all on scott.* to scott identified by 'tiger';
  
 
{{Languages}}
 
{{Languages}}

Latest revision as of 13:30, 30 July 2015

SQLZoo includes tutorials and reference to support people learning SQL.

It is based on MediaWiki and it allows users to change the content. http://www.mediawiki.org/wiki/Help:Editing_pages shows how to edit pages in "standard" media wiki.

  • Only users with the teacher role can edit pages.
    • Any teachers who can help with fixing errors or creating content are most welcome
    • Send an email (ideally from an educational address) to qa-sqlzoo@gmail.com and tell us your user name - we can add that role so that you can edit.

SQLZoo features:

  • Interactive access to several SQL engines
  • Sample databases
  • Practical exercise
  • Instant feedback on the success of the student's attempts

Format

SQLZoo includes a number of extensions to normal Wiki text:

  • class='qu'
    • A div with class qu is interpreted as an interactive question.
    • A div.qu element should include a source.def element
      • This contains the default text that the user sees.
      • Sometime this is a useful hint and is close to the correct answer.
      • It may be empty - but users often click without changing the text before even looking at it
    • A div.qu element may include a source.ans element
      • This contains the correct SQL.
      • This is hidden from the user (but not well hidden)
      • The user's result is compared with the answers result and a score is calculated

Here is an example of a question:

==Warming up==
<div class='qu'>
[[Read the notes about this table.]] Observe the result of running a simple SQL command.
<source lang='sql' class='def'>
SELECT name, region, population FROM bbc
</source>
<source lang='sql' class='ans'>
SELECT name, region, population FROM bbc
</source>
</div>

And here is how that looks when rendered...

Warming up

Read the notes about this table. Observe the result of running a simple SQL command.

SELECT name, region, population FROM bbc
SELECT name, region, population FROM bbc

StartAt

You can include a ***startAt*** span at the top of the page. This will ensure that question numbering starts at the specified value.


<span id=startAt class=params>6</span>

respectorder

Most questions do not respect order - a querry is considered correct even if the order of the student's work differs from the correct answer. You can over-ride that rule by insisting that the question respects order. Place this invisible tag in your qu tag.


<span class='params respectorder'></span>

Hints

You can include a hint. The title will be shown, if the user clicks on the text the body will be revealed:

Now the hint has been revealed

<div class='hint' title='Click here to see the hint'>Now the hint has been revealed</div>

Clear Results


<div class="lsclear">Clear your results</div>

Clear your results

Setting up AWS server

  • Start with Amazon Linux - pick a paravirtual one from the bottom of the list of AMI - the ones at the top
  • Use classic network
  • Log in as ec2-user
sudo su
yum install httpd
scp -C andrew@146.176.166.2:sqlzoo-source.tar ~
mv ~/public_html/sqlzoo /var/www/html
yum install mysql-server
/etc/init.d/mysqld start
/usr/bin/mysqladmin -u root password 'topsecret'
scp andrew@146.176.166.2:sqlzoo_wiki.sql.gz ~
scp andrew@146.176.166.2:gisq.sql.gz ~
yum install php
yum install php-pear
yum install php-mysql
/etc/init.d/httpd restart

mysql...

create database gisq;
grant all on gisq.* to gisq@localhost identified by 'brazil';
grant select on gisq.* to scott identified by 'tiger';
create database scott;
use scott
grant all on scott.* to scott identified by 'tiger';
Language: English  • Deutsch