Monday, February 28, 2005

A Special Mention

I just wanted to make a very special mention to my lovely financee Donna, who is supporting me 110% in my studies. Without her support it would be impossible for me to study and maintain this blog site. So from the bottom of my heart Donna,

THANK YOU FOR YOUR KIND AND LOVING SUPPORT

Jayson
xxx

TT380 : Week 4 - Summary Notes

Okay it's now week 4 of the course and it's time to read hours 9 to 14 of the MySQL course book. So what are these 6 hours about?

  • Hour 9 - Populating your database tables.
  • Hour 10 - Selecting data from your tables.
  • Hour 11 - Advanced usage of SELECT statements.
  • Hour 12 - Modifying and deleting data.
  • Hour 13 - More about DELETE.
  • Hour 14 - Modifying table structure.

Hour 9 Populating your Database Tables
In this hour we will learn how to insert data into out database tables using a variety of methods.

The INSERT command
This MySQL command is the first that we will use to insert data into our database tables. To use this command we need to be in MySQL monitor. So open up a connection to your database and login as normal.

A detailed account has already been written for using this command, and can be accessed via the following link, click here.

It should be noted that although you do not need to specify the names of the column within your table when using the INSERT command. However if you don't then you must ensure that each field within your table has an entry in your INSERT statement even if its empty or is going to use the default value. For example surpose you have a table called employees and you want to add a new record. The employees table has the following fields;

employee_id, employee_startdate, employee_moddate, firstname, lastname, nickname

You are wanting to add the following data into a new record in this table:

James Hummersknott, start date: today. James does not have a nickname. The moddate is obviously also going to be today as thats when you lasted modified the record and the employee_id is your primary key and therefore auto increments.

The command we would use to insert this data is as follows:
INSERT INTO employees
(employee_id, employee_startdate, employee_moddate,
firstname, lastname, nickname)

VALUES
('0', now(), now(), 'James', 'Hummersknott', '')
;

Alternatively if we wanted to simplifiy this and reduce the amount of typing we could use:

INSERT INTO employees
VALUES
('0', now(), now(), 'James', 'Hummersknott', '')
;


The LOAD DATA INFILE method


This is the second method of importing data into your database and again this has been documenetd previously, click here to view the detail blog entry about how to use the LOAD DATA method.


Using mysqlimport

This is our 3rd method of importing data into our database. the mysqlimport must be run from a command prompt and uses a plain text file that contains the data that you want inserting. This command has various switches that you can alter to suit you own personal needs. The following is the basic summary of the syntax that is used for this method of data insertion:
mysqlimport [options] databasename textfile

Okay let's look at that command, the first bit is calling the mysqlimport function. Then we have the chance to enter any options that we wish to use, common options here are:

-L to use a local file
--fields-enclosed-by
--fields-escaped-by
--fields-terminated-by

I have only used 3 of these along with a couple of other ones when I perform my own data insertion using this method. This is the complete command syntax that I used to successfull insert some data from a text file:
mysqlimport -L -v -u jg3723 -pmypassword
--fields-terminated-by=::: --fields-enclosed-by=\"
jg3723 master_name.txt

This successfully entered the contents of master_name.txt into my database called jg3723. It should be noted that this method of data insertion will import the data into the table of the same name as the text file, so in the case of the above example it inserted the data into a table called master_name.

My master_name.txt file consisted of the following data:

"0":::now():::now():::"Jayson":::"Doe"
"0":::now():::now():::"Donna":::"Smith"
"0":::now():::now():::"Tabitha":::"Carr"
"0":::now():::now():::"Naomi":::"Bell"

Hour 10
- Selecting data from your tables
Still to be documeneted - sorry!

Hour 11 - Advanced usage of SELECT statements
Still to be documeneted - sorry!

Hour 12 - Modifying and deleting data
Still to be documeneted - sorry!

Hour 13 - More about DELETE
Still to be documeneted - sorry!

Hour 14 - Modifying table structure
Still to be documeneted - sorry!

My Conclusion
Well that's the end of this particular blog entry and I hope that some of the information is of help to you. Please feel free to comment, all questions will be answered to the best of my ability.

All the best Jayson

Importing data into your TTCFM database

This blog will hopefully help those of you that are experiencing problems when trying to upload/import data into the various tables of your database that is located on the OU server. I have tested each of the methods listed here. The data was successfully uploaded and imported into the relevant tables, with no records being skipped and no warning.

Please Note: That if you are using these methods on your own local installation you may well get warnings, I currently have a local setup using the version of MySQL that was distributed on the Certificate of Web Application Development CD-ROM, namely version 4.0.17 and after numerous hours of testing it appears that for some reason, unbeknown to me at present warnings are given when I used the methods detailed in this blog entry. But hey this is for the OU server, and thats the main concern at the moment afterall.


Using the INSERT method
Okay this is the exact procedure that I used to perform this data insert. Using SSH secure shell open a terminal window to the OU server. Change to your web directory using the following command syntax:
cd web
Log into the MySQL monitor using the following syntax, changing the jg3723 to your OU username:
mysql -u jg3723 -p
When prompted enter you OU PI number remember letters should be in CAPITALS. Select the database to be used, in this case it should be the same name as you OU username, using this command syntax:
USE jg3723;
Now its time to write the INSERT statement, for test purposes you could use the following, which is what I entered:
INSERT INTO master_name
VALUES ('',now(),now(),'Amanda','Gurney');
Hopefully, you should see the following message after pressing the ENTER key.
Query OK, 1 row affected (0.00 sec)
Well that's the INSERT method successfull used, so it's now onto the LOAD DATA method next.

Using the LOAD DATA Method

With this method I pre wrote a DDL script and a plain text file that contained the data to be imported, these two files were then uploaded to my OU web directory If you would like to use my DDL script and data file click here to down load them.

Hopefully you will still have your SSH terminal window open and logged into your MySQL database. If not please connect and login to your database again.

You now need to change the DDL file to point to your own database; using Notepad open the loaddata.sql file and change the first line so it reads the name of your database. Then save the file and close it.

Now upload the DDL script and data file to your OU web directory. To check that they are there use the following syntax:
ls
Hopefully you will see the a list similar to mine below:
[jg3723@ttcfm web]$ ls
all_names.cfm createtables.sql loaddata.sql mytidy.sql
contactDB.sql eca master_name.txt
[jg3723@ttcfm web]$
Okay the files are there so let's import the data. This is done by using the following syntax:
source loaddata.sql
Hopefully you will see the following messages displayed after pressing the ENTER key.
Reading table information for completion of table and column names

You can turn off this feature to get a quicker startup with -A


Database changed

Query OK, 4 rows affected (0.00 sec)

Records: 4 Deleted: 0 Skipped: 0 Warnings: 0

My Conclusion
Well that's the end of my LOAD DATA and INSERT summary, you should now be able to alter the various commands and files to import any data that you wish to insert into your database. Have fun!

All the best Jayson

8th Kyu - Kamishin Ryu

In order to undertake my 8th Kyu grading I required a minimum of 44 hours traning and was required to demonstate the following to an acceptable high standard:

Kamae
Fudo Dachi
Sanchin Dachi
Zenkutsu Dachi

Uchi Waza
Chudan Tsuki

Keri Waza
Kin Geri

Uke Waza
Jodan Uke

Kata
Taikyoku sona Ich

Kumite
Not required

Renzoku Waza
Mae Geri Gyaku Tsuki

Personal Satisfaction and Acheivement
I was pleased to accept this grade in July 2004. I say please because I feel that if I did not want to accept the belt, grade and responsibilty I could have declined the grade/belt when it was offered to me by my Sensei.

What responsibility I hear you say.
Well okay maybe at this low grade it may look to on-lookers that you have none, but in reality you do. You have the responsibility to yourself, your sensei and others to continue to demonstrate the levels of standard that have been achived by yourself whilst grading. Admitted, once one progresses up throught the grades, more responsiblity is emposes on you, but I feel that at all levels you have a responsibility to demonstate those techniques that you have been accessed on to to all newcomers. Doing this as an early stage, I feel will make you a better dan grade once you achieve that level of experience.

Martial Arts

Another blog entry that is away from the subject of OU courses, but one that is close to my heart. I have always been keen on all forms of martial arts since an early age. As a child I tried various styles of Karate and even Judo, but like most children I did not stick at it, which I deeply regret now! So any youngers that read this who are training in any style of marital arts - my advise to you is STICK AT IT!

In March 2003, I located a Karate Dojo that interested me. I found a suitable Dojo that was situated in Darlington, County Durham. They offered a good choice of classes, 2 styles of Karate, Kick-Boxing and Kobudo. I promptly joined the club and started training in Kamishin-Ryu karate several times a week and also Kobudo once a month. Due to my OU commitments I have had to stop attending Kobudo, classes but plan to start up again.


So what is Kamashin-Ryu karate?
Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum.

My Sensei's
Sensei Phil Snewin
Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum.

Official Website: kamishin ryu karate do

Sensei Fred Bateman
Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum.

Official Website: kodokan martial arts

What is Kobudo?
Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum.

My Sensei

Sensei Fred Bateman
Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum.

My Kamishin-Ryu Gradings
Although obtaining a blackbelt is one of my life long ambitions, I have decided that this should not be the main aim of my martial arts training. Continuous training, personal develpment and commitment to training will I am certain leaded me to my life long ambition. But unlike some people, training and development and learning will not stop there, to me that will be the start of my next level of marital arts training.

All the best Jayson

A Little More About Me

I thought I would include a little section devoted to me. This section is where I am going to publish information relating directly to me. It's probably not going to be that interesting but I thought it would make a change from all the course related material that is going to be published here.

1970
On the 24th January 1970 I was born to my parents, Susan Water and Barry Gurney in Chelsea, London.

1986
I left secondary school with only my Certificate of Secondary Education qualifications (8 in total) and I decided that it was a case of going to 6th Form to try and get a few General Certificate of Secondary Education under my belt.

1987
I left 6th Form with a few better grades for some of my Certificates of Secondary Education (9 in total), newly aquired General Certificate of Secondary Education (3 in total) plus a couple of other qualifications; one by the Royal Society of Arts and a newly form qualification which I was one of the first in the county to take, namely a Certificate of Pre-Vocational Education.

1988
4 th January 1988, I waved good-bye to my mum at the train station in my home town of Ashford and set off on my journey to join the Royal Corps of Transport, whos training depot was based in sunny Aldershot.
After completing my basic military training I embarked on trade training where I gained my Heavy Goods Vehicle License. It was then time to join my first active unit, 66 Squadron Royal Corps of Transport, based in Tidworth, Hampshire. After a few month at the unit it was time to head of to Germany for a NATO training exercise, which unbeknown to me was going to be the changing point of my military career. After just 3 days in Germany, I substained a serious injury to my spine, which took several hospitals and doctors many hours to decide what needed to be done.

1990
Finally, the British Military decided that I needed a spinal fusion which they performed on my in the March. After spending some time off to recover, it was time for intense rehabilitation, which lasted several months. I was unhappy at this as it meant I was unable to go to Cyprus with the main unit, instead I was left behind on reserve party duties. Things turnt out ok in the end as when I returned to my unit I was promoted to Lance Corporal.

1991 - 1993
Various posting around the UK, and in January 1993 I was medically discharged from the Army.
1994 - 1997
Time spent recoverying form ongoing medical problems realting to my spinal injury. Mid 1997, I went to college to gain qualifications in Information Technology and started to do some teacher training related courses.

1988
Gained an NVQ Level 3 in Implementing IT Solutions and part of my NVQ Level 4 TDLB. Started work as an on-site maintenance engineer.

1999
After careful consideration, I started my own IT consultancy company and my first major client was Orange PCS. Went to Germany and Italy to do consultancy work for two International Telecom companies.

2000
Started work for an International Internet hosting company - Senior Network Administrator and Project Manager. Designed and implemented a corporate wide Microsoft messaging platform. Obtained Microsoft certification status.

2003
Started to study with the Open University, with the aim of gaining various IT and Computing qualifications whilst on-route to acheiving a BSc Honours degree.
2004
Obtained 8th & 7th Kyu in Kamishin Ryu Karate. Reunited with my father after 28 years at Darlington Railway Station. Meet my 3 sisters, Elizabeth, Nicola and Lauren for teh first time in December 2004. Also meet about 35-40 other relatives from my fathers side of the family.