Tuesday, 26 April 2011

M366 TMA01 Results

I received my results for M366 TMA01 and scored a great 93% which I am really chuffed with. This easily felt like the hardest assignment that I have had to complete in my degree so far, and it took me a lot of time to complete. I was honestly thinking this is going to be a fail and was nervous when the results e-mail came through but it looks as though the hard work paid off.

I submitted M359 TMA02 this evening which has been pretty tricky in itself, in particular the problematic Q3 B) iii) which had a discussion well over 50 posts deep in the course forum with what looks like only 1 person so far claiming they have managed to solve it. It surrounds relational algebra and I'll confess now I didn't solve it, I put down all my working to get to the different relations I thought would help answer the question, but ultimately it is worth 6 marks out of 100 and I invested many many hours into it to no avail. If I can scrape a couple of marks from what I managed to jot down I will be pleased, but I'm somewhat comforted by not being the only person in this position.

Hopefully the results aren't too hideous!

Monday, 25 April 2011

M359 SQL Anywhere and Interactive SQL in Windows 7 Java Errors

The Open University provides course software to load and manipulate databases, their choice of program is SQL Anywhere and when trying to query anything using Windows 7 the version used just dumps huge stack traces.

This seems to be a common problem for a lot of Windows 7 users, here are the instructions for getting it to work for anyone who comes across this issue on future presentations.

You need to run the programs in compatability mode. To do this Go start > programs > m359 > right click on the "Start M359 Server" shortcut and click properties.

choose the compatability tab then check the "run this program in compatability mode" checkbox, select windows vista service pack 2.

under privilege level at the bottom, check "run this program as an administrator".

Do the same for the Interactive SQL shortcut in the same location. Once done, close down the server, fire it up again manually and it should all work.

M359 Relational Algebra Checker RAEval

Fellow student Nick E has developed a relational algebra checker in Java which can be used to prove your relational algebra and ensure that it is generating the results you can expect. This is an awesome piece of software that I think should be noted for future students who will be studying M359 as it will help massively come TMA time and during study/revision.

Here is Nick's original post to the course forums.

Relational Algebra Interpreter
Attachment Screenshot.png
I've written an interpreter that can work with relational algebra.

The idea is that it is easier to get the hang of relational algebra if you can play around and experiment with the different operators. I looked at some of my solutions and though 'if only I could just run this to see if it works'.

The interpreter handles select, project, join, divide , rename, union, difference, intersection, alias and times.

The main limitation is that you cannot create a relation within the interpreter - you have to load it in from a CSV file. But then you can create new relations from it.

For example,

rela := load "/home/nick/my-rela.csv"

Then:

select rela where a > 2

project rela over a, b, c

project (select rela where a > 2 or b <= 5) over a, b It also handles assignment, so: relb := project rela over a, b, c Which creates a new relation called relb. Loads more examples in the documentation along with some example CSV files and how to make your own. Hint: in the interpreter use to get a newline (for long expressions) and use to evaluate.

The project is written in Java and has a re-usable class called Relation that does all the work. It's free for anyone that wants to use it.

You can download the executable jar file and/or source code at:

http://code.google.com/p/relational-algebra/

The interpreter itself is a JAR file called "raeval.jar" and is available under the downloads tab. To run it you need the Java Runtime Environment that is also available free. I have had it up and running on Windows, Mac and Ubuntu Linux.

There are some (really) basic instructions there too.

Note: this is beta software. I've tested all of the functionality but there probably are some bugs left. Contact me from the project home if you spot them. But please be gentle, because this has been an obsession...

Sunday, 10 April 2011

M359 TMA01 and the year so far

Well its been a long time since I last got around to updating the blog so I thought that it would be important to take a little bit of time to write down how the year has gone so far.

I'm currently studying M359 Relational Database Theory and Design and M366 Natural and Artificial Intelligence. Its fair to say that the workload of these courses has definitely made me have to raise my ame a bit to fit everything in alongside work and social commitments.

M366 has a particularly heavy workload with lots of theory which I found myself re-reading and expanding upon further through online and offline resources. It feels like everytime I turn a page another intruiging concept or idea is dropped on me and I have to go and explore it further to make sure I am understanding it fully or just to find out that bit more. It's an extremely interesting course, but it is definitely taking up more time than any other 30 credit module that I have studied to date. I am currently working through the first TMA which is due during the middle of next week so hopefully it all goes well.

The first TMA for M359 was due during the end of March and I scored 80% which I am quite pleased with. Databases have never been something I have invested much time in learning before, getting by with what I have picked up as I have worked with them over the years. It is nice to actually sit down and go back to the beginning and truly understand how databases have evolved and how we have reached the relational database models that are so common today, but also where we seem to be going in the future. The course is covering the fundementals but also more advanced concepts and I hope that by the end of it my patchy DB experience will be much more well rounded. Watch this space ...