Online SQL exercises for National 5

  • pliddle34
    Participant

    Hi

    I’ve made a web-based tools for testing out pupils against the N5 SQL stuff.
    Please have a go and let me know what you think.
    It ONLY covers stuff in N5. I have another three or four exercises to finish that would let students retry concepts but wanted to see if it was useful and made sense before spending any more time on it.

    The website is here: http://national5computing.co.uk/sql/

    I’d appreciate any thoughts and feedback – please feel free to use it with your students at the moment – I won’t edit the live website.

    It stores diagnostic scores as they go so if people are interested I will build something to send that to the teacher/student at the end.

    Paul Gardner
    Participant

    Hi Peter,

    that’s a great tool. It caught all my typos, my guessing at syntax and misreading of instructions. It also allowed me to use alternative valid constructs, e.g.

    field = “value” OR field = “anothervalue”

    OR

    field in (“value”, “anothervalue”)

    Being able to switch between SQL and the table views works well. I’ll be using this with my pupils soon I think!

    Thanks

    Paul

    pliddle34
    Participant

    Hi
    Thanks for the info – v useful.
    It uses the result rather than the query to determine success – which gives smart pupils a view workarounds but only if they know the criteria in the first place 🙂

    Probably hackable by a smart pupil who knows javascript mind you!

    Coinneach Combe
    Participant

    Thanks so much for writing and sharing Peter, I’ve only worked through level one at this stage and it looks great.

    cheers

    Coinneach

    Sheena Stainthorpe
    Participant

    thanks for this, it looks very useful.

    James Brennan
    Participant

    Had a wee go of this and found it worked fantastically! Think I’ll try it with my Higher class today as an example of database-driven web languages.

    Grant Kirk
    Participant

    Hi there,

    Tried to look at your sql material but was blocked!

    Category : suspicious

    Will have a look from home.

     

    Cheers

     

    Grant Kirk
    Participant

    Just had a quick look at the site from my laptop – works well and would go down a treat with my S4 class I’m sure. Now if I can only get round the blocking…

    Thanks for sharing the resource!

    Grant Kirk
    Participant

    On task 7 of Exercise 2 : <span style=”background-color: #f5f5f5; font-family: ‘Helvetica Neue’, Helvetica, Arial, sans-serif; font-size: 14px;”>Show all records for companies founded after the 1st of January 1991 (Think carefully – what format is the date stored?)</span>

    the following statement gets a message that the SQL is correct but the solution’s wrong.

    SELECT * from Companies WHERE DateFounded >1991-01-01;

    Format looks ok – any ideas?

     

     

    Cheers Grant

    David Muir
    Participant

    This looks great. Thanks for all your hard work. One minor quibble: SQA examples always show a semi-colon at the end of SQL Queries.

    And in the “probably more trouble than it is worth” category: it would be great if you caould save progress, or at least jump to a leter section. (As far as I can see, you have to start from the begining every time… but I may be missing something obvious.)

    Bottom line though, I love this resource!

    pliddle34
    Participant

    Hi

    thanks for the feedback.

    David, I agree. Need to change a few things to get that to work but it would be good to be able to skip ahead and back. As for the semi-colon, I noticed that in the documents – it can be done with a simple check but not sure I want to invalidate a valid statement because of that… there doesn’t appear to be a mark given in coursework, but then it’s not specified if a mark would be lost either. Indeed, at N5, is it worth implying that there’s a terminating value, which suggests multiple statements, if avoidable? I don’t know.

    Grant, this site uses SQLite, which needs quotations for dates. This might be a slight issue when describing to pupils though if I am right, quotation marks round dates should work for other implementations of SQL.

    When I get time I’ll make a better set of tutorials. It would be easy for anyone to create them as it just needs an SQLite DB file and a set of questions.

    Iain Purdie
    Participant

    Same as another poster, our work blocks the site (“Parked Sites”). I’ll get that resolved – David obviously looked at it from home!

    chalove
    Keymaster

    Hi Peter,

    This is a really good resource for making SQL accessible at N5 level. Well done!

    Charlie

    christine_schofield
    Participant

    Hi Peter

    Using your online SQL materials, (which the kids love) we seem to be stuck at Exercise 3 Task 4.
    SELECT * FROM Club WHERE Personaltrainer =”True” ORDER BY RoomsforHire Desc

    It asks for ‘rooms available’. It says the SQL is correct but the solution is wrong, can you please help.

    Thanks

    Christine

    Iain Purdie
    Participant

    Christine – the “TRUE” is case sensitive:

    select * from club where personaltrainer=”TRUE” order by roomsforhire desc

Viewing 15 posts - 1 through 15 (of 30 total)

You must be logged in to reply to this topic.