13.07.2015 Views

D4: Tutorial on MoWeS and phpMyAdmin - Homepages.stca.herts ...

D4: Tutorial on MoWeS and phpMyAdmin - Homepages.stca.herts ...

D4: Tutorial on MoWeS and phpMyAdmin - Homepages.stca.herts ...

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<str<strong>on</strong>g>D4</str<strong>on</strong>g>: <str<strong>on</strong>g>Tutorial</str<strong>on</strong>g> <strong>on</strong> <strong>MoWeS</strong> <strong>and</strong> <strong>phpMyAdmin</strong>In this tutorial, you will be asked to learn how to:• Download, “install” <strong>and</strong> launch the <strong>MoWeS</strong>platform• create, import <strong>and</strong> export a database into your<strong>MoWeS</strong> based mySql database• use <strong>phpMyAdmin</strong>You should then start exploring the functi<strong>on</strong>alfeatures of the VF1 PHP developmentframework.1


Downloading <strong>and</strong> launching <strong>MoWeS</strong>• Download the <strong>MoWeS</strong> from the following URL:http://homepages.<strong>stca</strong>.<strong>herts</strong>.ac.uk/~comqvv/wos_csitde.zip• Unzip the archive into your own UH drive (U://) or withinyour memory stick (D:, or E:, etc.)• You should obtain a folder called “wos_csitde”, whichincludes:• Launch the .exe filewos_csitde2


Access the <strong>MoWeS</strong> via your browser• The <str<strong>on</strong>g>D4</str<strong>on</strong>g> submissi<strong>on</strong> will be evaluated against Firefox.• If Firefox it is not installed <strong>on</strong> your lab machine, youshould download <strong>and</strong> install a portable versi<strong>on</strong> of thisbrowser (called Mozilla Firefox, Portable Editi<strong>on</strong>) withinyour UH drive, or within your memory stick: you c<strong>and</strong>ownload it from:http://portableapps.com/apps/internet/firefox_portablefirefox_portable• For development purposes, you might want to c<strong>on</strong>siderinstalling <strong>on</strong> Firefox a special “add-<strong>on</strong>”, Web Developer:https://add<strong>on</strong>s.mozilla.org/en-US/firefox/add<strong>on</strong>/webdeveloper/3


<strong>phpMyAdmin</strong>: Step 1Launch <strong>MoWeS</strong>, open Firefox <strong>and</strong> go to:http://localhost:8080/phpmyadminGet into your airplaneticket database (by clicking <strong>on</strong> themenu <strong>on</strong> the left of <strong>phpMyAdmin</strong> main page)You should find several tables:Airline, locati<strong>on</strong>, flight, etc.These tables are used by the case study applicati<strong>on</strong> (anairplane ticket booking management system) developedby using the VF1 PHP development framework.You should use these tables <strong>and</strong> the applicati<strong>on</strong> as a“knowledge repository” in order to develop your DMS-Papplicati<strong>on</strong> for the <str<strong>on</strong>g>D4</str<strong>on</strong>g> assignment.4


<strong>phpMyAdmin</strong>: view of the airplaneticket db5


<strong>phpMyAdmin</strong>: Step 2Get back to <strong>phpMyAdmin</strong> main page (click <strong>on</strong> the smallhome ic<strong>on</strong> <strong>on</strong> the top left side) <strong>and</strong> create a newdatabase: call it “cw0910”Now open a new tab <strong>on</strong> Firefox, <strong>and</strong> download the SQL filefor importing the a database fromhttp://homepages.<strong>stca</strong>.<strong>herts</strong>.ac.uk/~comqvv/csitde/d4/cw0910.sqlFirefox will display the SQL code.You should just save it by right-clicking <strong>and</strong> select the “SavePage As...” opti<strong>on</strong>, <strong>and</strong> save the cw0910.sql file into anew folder called cw0910, say atU:\wos_csitde\www\cw0910\6


Firefox view for downloading <strong>and</strong> saving thecw0910.sql file7


<strong>phpMyAdmin</strong>: Step 3Now go back to your Firefox tab displaying your<strong>phpMyAdmin</strong>, click <strong>on</strong> the Import link <strong>and</strong>...8


<strong>phpMyAdmin</strong>: Step 4Import the SQL text file you have saved 2 steps ago...Just click Go, after you Open the file9


<strong>phpMyAdmin</strong>: Step 5 (well d<strong>on</strong>e!)If everything has g<strong>on</strong>e as expected, you should now have fourtables within your cw0910 database.These tables are tobe fully analysed <strong>and</strong>understood.Can you spot anyforeign key?Can you rec<strong>on</strong>structthe ERD behind thisdatabase?10


POST TUTORIAL: Step 6 (for your <str<strong>on</strong>g>D4</str<strong>on</strong>g>development exercise)• You can add new data <strong>on</strong> the four tables (not in the “venue”table, though)• Should anything go wr<strong>on</strong>g, you could delete the four tables<strong>and</strong> re-import them again, at your c<strong>on</strong>venience, always bydownloading the file from:http://homepages.<strong>stca</strong>.<strong>herts</strong>.ac.uk/~comqvv/csitde/d4/cw0910.sql• Actually, you should start adding new data by using<strong>phpMyAdmin</strong> now.11


POST TUTORIAL: Step 7First, c<strong>on</strong>sider the following data-model:Yes, this is the ERD behind the cw0910 database!Sec<strong>on</strong>d, try to underst<strong>and</strong> how it has been implemented.You need to c<strong>on</strong>sider what venues have been listed.Create a scheme, by means of which you start analysingthe data included in the four tables.12


POST TUTORIAL: Step 8Write some SQL queries to in order to answer the questi<strong>on</strong>sbelow. Use the “SQL” tag in <strong>phpMyAdmin</strong> to execute yourqueries.1) Who is going toplay judo?2) Where are thejudo match to beheld?3) Are all judoathletes playingin the samedates?13


VF1Although VF1 has been included within your <strong>MoWeS</strong>platform, you could always get the latest versi<strong>on</strong> of thespecimen applicati<strong>on</strong> from:http://homepages.<strong>stca</strong>.<strong>herts</strong>.ac.uk/~comqvv/vf114


Familiarize with VF1Open the specimen applicati<strong>on</strong> with Firefox, at:http://localhost:8080/vf1_applicati<strong>on</strong>/• Add new ailrines,• edit existing flights,• search for existing locati<strong>on</strong>s• Explore how the many-to-many relati<strong>on</strong>ship has beenimplemented both <strong>on</strong> the database <strong>and</strong> within the GUI.• Try to get to the code!15


The VF1 applicati<strong>on</strong> (a screenshot)16


References• <strong>phpMyAdmin</strong>: http://www.phpmyadmin.net/• VF1: http://homepages.<strong>stca</strong>.<strong>herts</strong>.ac.uk/~comqvv/vf1• Lectures <strong>and</strong> tutorial notes <strong>on</strong> Studynet• The <str<strong>on</strong>g>D4</str<strong>on</strong>g> official support web-page:http://homepages.<strong>stca</strong>.<strong>herts</strong>.ac.uk/~comqvv/csitde/d4.html17

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!