Published on

  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • CGI: Perl (Server side) Php (Server side) JavaScript (Server or Client side) Cold Fusion ASP ((Visual) Basic) LabVIEW Regular expressions Databases (Microsoft Access, MySQL; normalization) DB management (within windows (Access), Web (MySQL & Access 2k)) Interfacing HTML (post & get methods, cookies) Scripts (server side) Security UVa ITC classes for these programs General advice: Think through & organize db well before implementing when defining tables, set default values
  • MySQL tools:
  • database-driven_webpages.ppt

    1. 1. UVa ITC Research Computing Support Fall, 2002 Presented by the Research Computing Support Group David Drake, Kathy Gerber, Ed Hall, Tim F. Jost Tolson <ul><li>Overview of Research Hardware, Software, Support & Storage: Tuesday, September 10, 3:30 PM </li></ul><ul><li>Statistical Software – Thursday, September 12, 3:30 PM </li></ul><ul><li>Mathematical & Visualization Software – Tuesday, September 17, 3:30 PM </li></ul><ul><li>High Performance Computing – Thursday, September 19, 3:30 PM </li></ul><ul><li>FEMLAB Seminar: Multiphysics Modeling – Friday, Sept. 27 at 10:00 AM </li></ul><ul><li>Introduction to IDL – Wednesday, October 9 at Noon </li></ul><ul><li>Database-Based Webpages – Wednesday, October 23 at 3 pm </li></ul><ul><li>Maple 8 – Wednesday, November 20 at 3 pm </li></ul>
    2. 2. Database-Driven Webpages <ul><li>By: David Drake </li></ul><ul><li>Research Computing Support Center </li></ul><ul><li>Phone: 243-8800 || Fax: 243-8765 </li></ul><ul><li>E-Mail: [email_address] </li></ul><ul><li>http://www. itc .Virginia. edu /researchers </li></ul>
    3. 3. Databases and the Web <ul><li>Databases in the Abstract </li></ul><ul><li>Creating Databases using Relational DataBase Management Systems (RDBMSs) </li></ul><ul><li>Databases and Web Interfaces </li></ul>
    4. 4. I. Databases in the Abstract <ul><li>Definition </li></ul><ul><li>Normalization </li></ul><ul><li>Structure </li></ul><ul><li>Language </li></ul>
    5. 5. I. A. Definition <ul><li>A database is an organized collection of data whose content must be quickly and easily </li></ul><ul><ul><li>Accessed </li></ul></ul><ul><ul><li>Managed </li></ul></ul><ul><ul><li>Updated </li></ul></ul><ul><li>A relational database is one whose data are split up into tables , sometimes called relations </li></ul>
    6. 6. <ul><li>First Normal Form ( 1NF ) </li></ul><ul><ul><li>All attributes are single valued & non-repeating </li></ul></ul><ul><li>Second Normal Form ( 2NF ) </li></ul><ul><ul><li>Must be 1NF & must have primary key </li></ul></ul><ul><ul><li>Each non-primary key attribute must be functionally dependent on primary key </li></ul></ul><ul><li>Third Normal form ( 3NF ) </li></ul><ul><ul><li>Must be 2NF </li></ul></ul><ul><ul><li>Each non-primary key attribute must be dependent only on primary key </li></ul></ul>I. B. Normalization (read logical organization)
    7. 7. I. C. 1. Tables (Relations) <ul><li>Each column constitutes an attribute </li></ul><ul><li>Each row constitutes a record or tuple </li></ul>Attribute 2 (column 2) Record 2 (tuple 2) Record 1 (tuple 1) Attribute 1 (column 1)
    8. 8. <ul><li>Primary </li></ul><ul><ul><li>An attribute or group of attributes which uniquely identifies each record in a table </li></ul></ul><ul><ul><li>May not be a Null value </li></ul></ul><ul><li>Foreign </li></ul><ul><ul><li>used primarily for enforcing referential integrity, but also for establishing relationships between the two tables </li></ul></ul>I. C. 2. Keys
    9. 9. <ul><li>One-to-one (1-to-1) </li></ul><ul><li>One-to-many (1-to-M or 1-to-  ) </li></ul><ul><li>Many-to-Many (M-to-M or  -to-  ) </li></ul>I. C. 3. Relationships
    10. 10. I. D. Structured Query Language (SQL) <ul><li>Pronounce “Sequel” or “Ess Que Ell” </li></ul><ul><li>Industry standard language of (Relational) Databases </li></ul><ul><li>Allows for complete </li></ul><ul><ul><li>Table Creation, Deletion, Editing </li></ul></ul><ul><ul><li>Data extraction (Queries) </li></ul></ul><ul><ul><li>Database management & administration </li></ul></ul>
    11. 11. II. Creating Databases using RDBMSs <ul><li>Microsoft Access </li></ul><ul><ul><li>Creating Tables </li></ul></ul><ul><ul><li>Entering, Importing, Editing, & Viewing Data </li></ul></ul><ul><ul><li>Defining Relationships </li></ul></ul><ul><ul><li>Constructing Queries </li></ul></ul><ul><li>MySQL … ( Documentation ) </li></ul><ul><ul><li>Where to put it (servers at UVa) </li></ul></ul><ul><ul><li>Ditto MS Access </li></ul></ul><ul><li>Others </li></ul><ul><ul><li>mSQL, PostGreSQL, Oracle, DB2, Informix, Sybase, Empress, Adabas (available with StarOffice), …. </li></ul></ul>
    12. 12. III. Databases and Web Interfaces (What you need to get started) <ul><li>Requirements for a Database Web Interface </li></ul><ul><li>Where to Put Your Database and Scripts </li></ul><ul><li>Server-Side Scripting Languages </li></ul><ul><ul><li>ASP </li></ul></ul><ul><ul><li>Cold Fusion </li></ul></ul><ul><ul><li>Perl </li></ul></ul><ul><ul><li>PHP </li></ul></ul>
    13. 13. III. A. Requirements for a Database Web Interface <ul><li>Your database (Access, MySQL) </li></ul><ul><li>A Web server with appropriate RDBMS </li></ul><ul><li>A way of connecting the two (Common Gateway Interface [CGI] scripts and SQL) </li></ul><ul><li>Security concerns </li></ul>
    14. 14. III. B. Where to Put Your Database and Scripts <ul><li>Academic side of UVa </li></ul><ul><ul><li>Access </li></ul></ul><ul><ul><ul><li>ESERVICES es-web1 ( </li></ul></ul></ul><ul><ul><li>MySQL </li></ul></ul><ul><ul><ul><li>MySQL server ( dbm1. itc . virginia . edu ) </li></ul></ul></ul><ul><ul><ul><li>Home directory (www.people – accessible through blue.unix), faculty, curry, avery, minerva (, jm.acs ( </li></ul></ul></ul><ul><li>Medical side of UVa </li></ul><ul><ul><li>See the UVa Health System’s Web Development Center </li></ul></ul>
    15. 15. Active Server Pages (ASP) <ul><li>When a browser calls an ASP document, the ASP Server reads the .asp document and </li></ul><ul><ul><li>Substitutes appropriate files for the (server-side) include statements </li></ul></ul><ul><ul><li>Runs the ASP code (see the VBScript and JScript Tutorial and Language References as well as the ASP Guide ) </li></ul></ul><ul><ul><li>Returns the resulting HTML code to the browser </li></ul></ul><ul><li>Example ( code , copy of database ) </li></ul>
    16. 16. ASP Key Points (1) <ul><li>ASP code enclosed in: <% VBScript code %> </li></ul><ul><li>Everything outside is HTML </li></ul><ul><li>The result of the combined HTML and ASP code must be a “standard” HTML document, e.g.: </li></ul><ul><ul><li><!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Final//EN&quot;> <html> <head> <title>Miracle Drug Study</title> <meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;> <meta name=&quot;Description&quot; content=&quot;&quot;><meta name=&quot;Keywords&quot; content=&quot;&quot;> <link rel=STYLESHEET type=&quot;text/css&quot; href=&quot;&quot;> </head> <body> </body> </html> </li></ul></ul>
    17. 17. ASP Key Points (2) <ul><li>Connect with database: </li></ul><ul><ul><li>Create connection object: </li></ul></ul><ul><ul><ul><li>set conn = Server.CreateObject(&quot;ADODB.Connection&quot;) </li></ul></ul></ul><ul><ul><li>Open connection: </li></ul></ul><ul><ul><ul><li>;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=f:webdatabase escompstudy.mdb&quot;) </li></ul></ul></ul><ul><li>Submit a (read-only) Query: </li></ul><ul><ul><li>Generate SQL statement: </li></ul></ul><ul><ul><ul><li>SQL = &quot;SELECT FirstName, LastName, DOB, Gender FROM Patients WHERE Gender = '&quot; & Gender & &quot;' ORDER BY FirstName DESC&quot; </li></ul></ul></ul><ul><ul><ul><li>set Patients = conn.execute(SQL) </li></ul></ul></ul>
    18. 18. ASP Key Points (3) <ul><li>Move through the data records: </li></ul><ul><ul><li>do while NOT Patients.eof Name = Patients(0) & &quot; &quot; & Patients(1) Patients.MoveNext loop </li></ul></ul><ul><li>Add to or edit table: </li></ul><ul><ul><li>Create and open Record Set object: </li></ul></ul><ul><ul><ul><li>set RS = Server.CreateObject(&quot;ADODB.Recordset&quot;) RS.Open “ table name &quot;, conn, , adLockOptimistic, adCmdTable (where adLockOptimistic = 3, adCmdTable = 2) </li></ul></ul></ul>
    19. 19. ASP Key Points (4) <ul><li>Add to or edit table (continued): </li></ul><ul><ul><li>Create new record, Edit, & Update: </li></ul></ul><ul><ul><ul><li>RS.AddNew RS(“Dosage”) = 200 RS.Update </li></ul></ul></ul><ul><ul><li>Or Find desired record, Edit, & Update : </li></ul></ul><ul><ul><ul><li>do while NOT RS.eof if RS(“ID”) = 7 then RS(“Dosage”) = 200 RS.Update else RS.MoveNext end if loop </li></ul></ul></ul>
    20. 20. ASP Key Points (5) <ul><li>Clean up (free server resources) when done: </li></ul><ul><ul><li>Queries: </li></ul></ul><ul><ul><ul><li>Patients.Close set Patients = nothing </li></ul></ul></ul><ul><ul><li>Record Sets: </li></ul></ul><ul><ul><ul><li>RS.Close set RS = nothing </li></ul></ul></ul><ul><ul><li>The Connection: </li></ul></ul><ul><ul><ul><li>conn.close set conn = nothing </li></ul></ul></ul>
    21. 21. ASP Security <ul><li>Apart from various Internet Information Services (IIS – Window’s Web service) security holes (for viruses and worms), security is quite good. </li></ul><ul><li>Use http s :// … if you want to protect content over the internet – this provides Secure Socket Layer (SSL) security </li></ul>
    22. 22. ASP Resources <ul><li>ITC-Training Workshops </li></ul><ul><ul><li>ASP Introduction </li></ul></ul><ul><li>Microsoft’s </li></ul><ul><ul><li>ASP Guide </li></ul></ul><ul><ul><li>VBScript and JScript Language References </li></ul></ul><ul><li>ITC-Desktop’s examples </li></ul><ul><li>WebMonkey’s tutorial </li></ul><ul><li>Beginning ASP Databases by Kauffman (Wrox) </li></ul><ul><li>Professional Active Server Pages 3.0 by Homer (Wrox) </li></ul>
    23. 23. ColdFusion <ul><li>Easy-to-learn Server-Side Scripting Language: CFML, or Cold Fusion Markup Language, is embedded in HTML code </li></ul><ul><li>CF code is enclosed in or by CF tags: </li></ul><ul><ul><li><CF tagname CF code > </li></ul></ul><ul><ul><li><Cf tagname > CF Code </Cf tagname > </li></ul></ul><ul><li>Documents must end in .cfm </li></ul><ul><li>ColdFusion is Case In sensitive </li></ul><ul><li>Example ( code , copy of database ) </li></ul>
    24. 24. ColdFusion Key Points (1) <ul><li>All #variables# are enclosed in # signs </li></ul><ul><li>HTML output which includes of CF variables must be surrounded by CF output tags; e.g.: </li></ul><ul><ul><li><CFset height = “tall”> <CFoutput> The <B>#height#</B> boy fell. <CFoutput> </li></ul></ul>
    25. 25. ColdFusion Key Points (1) <ul><li>Connect with database and run query simultaneously: </li></ul><ul><ul><li><CFQUERY Name=&quot;Patients&quot; dbtype=&quot;dynamic&quot; connectstring=&quot;#DBdriver# #DBfile#&quot;> SELECT ID, FirstName, LastName FROM Patients ORDER BY FirstName </CFQUERY> </li></ul></ul><ul><li>Where the variables are defined beforehand: </li></ul><ul><ul><li><CFset Dbdriver = &quot;Driver={MICROSOFT ACCESS DRIVER (*.mdb)}; UID=admin; PWD=; dbq=&quot;> </li></ul></ul><ul><ul><li><CFset Dbfile = &quot;f:webdatabase escompstudy.mdb&quot;> </li></ul></ul>
    26. 26. ColdFusion Key Points (2) <ul><li>Access Query Results </li></ul><ul><ul><li><SELECT name=&quot;PatientID&quot;> <CFoutput QUERY=&quot;Patients&quot;> <OPTION value=#ID#>#FirstName# #LastName# </CFoutput> </SELECT> </li></ul></ul><ul><li>Insert Data from a Form </li></ul><ul><ul><li>If a HTML form submits variables to be inserted, do so directly using CFinsert: </li></ul></ul><ul><ul><ul><li><CFinsert tablename=&quot;Treatment&quot; dbtype=&quot;dynamic&quot; connectstring=&quot;#DBdriver# #DBfile#&quot;> </li></ul></ul></ul><ul><ul><li>All variables in the form object (e.g. Form.var1) that match attributes in the table are inserted into the table automatically </li></ul></ul>
    27. 27. ColdFusion Key Points (3) <ul><li>Insert Data using Cfquery (SQL): </li></ul><ul><ul><li><CFquery name=&quot;Treatment&quot; dbtype=&quot;dynamic&quot; connectstring=&quot;#DBdriver# #DBfile#&quot;> INSERT into Treatment VALUES (#PatientID#, #EventID#, Now(), #Dosage(mg)#, #Severity#, #Time#) </CFquery> </li></ul></ul><ul><li>Other Data editing features also available </li></ul><ul><ul><li>see Macromedia’s documentation webpage (find the ColdFusion Markup Language Reference and Quick Reference pdf files at the bottom of the documentation webpage) </li></ul></ul>
    28. 28. Cold Fusion Resources <ul><li>ITC-Training Workshops </li></ul><ul><ul><li>Cold Fusion Introduction </li></ul></ul><ul><li>Allaire/Macromedia’s Documentation Web page </li></ul><ul><ul><li>Developing CF Applications </li></ul></ul><ul><ul><li>CFML Reference </li></ul></ul><ul><ul><li>CFML Quick Reference </li></ul></ul><ul><li>ITC-Desktop’s examples </li></ul><ul><li>WebMonkey’s tutorial </li></ul><ul><li>Security links page </li></ul><ul><li>Programming Cold Fusion by Brooks-Bilson (O’Reilly) </li></ul><ul><li>Cold Fusion 5 Web Applications Construction Kit (4 th Ed.) by Forta (Macromedia Press) </li></ul>
    29. 29. Practical Extraction and Report Language ( Perl ) <ul><li>Ubiquitous </li></ul><ul><ul><li>Originally designed to be a better general purpose tool than a Unix shell, it has grown and spread to be supported from Windows to Macintosh to VMS. </li></ul></ul><ul><li>Powerful but Cryptic </li></ul><ul><li>Example ( code ) </li></ul>
    30. 30. Perl Key Points (1) <ul><li>The file itself must end in “.cgi” or “.pl” </li></ul><ul><li>File must have “other” read and execute permission (chmod o+rx filename .pl) </li></ul><ul><li>First line must specify the location of the Perl engine (The DBI module will not work for “#!/usr/local/bin /perl[5]” – see below): </li></ul><ul><ul><li>#!/uva/bin/perl -w </li></ul></ul><ul><li>First printed line must be the following if you want its response to go to a browser: </li></ul><ul><ul><li>print &quot;Content-type: text/html &quot;; </li></ul></ul>
    31. 31. Perl Key Points (2) <ul><li>Modules </li></ul><ul><li>You *must* use the DBI module which allows you to interface with the database (see DBI link 1 & DBI link 2 ) </li></ul><ul><ul><li>use DBI; </li></ul></ul><ul><li>You can & should also make use of the CGI module , esp. for parameter passing </li></ul><ul><ul><li>use CGI; </li></ul></ul>
    32. 32. Perl Key Points (3) <ul><li>Set the usual parameters: </li></ul><ul><ul><li>my $hostname = &quot;;; my $username = &quot;dld5s&quot;; # &quot;my&quot; defines a local variable my $password = “…&quot;; # fill in my $database = $username . &quot;_study&quot;; # = dld5s_study my $data_source = &quot;DBI:mysql:$database:$hostname&quot;; </li></ul></ul><ul><li>Connect to the database: </li></ul><ul><ul><li>my $dbh = DBI->connect($data_source, $username, $password) or die &quot;Can't connect to $data_source: $DBI::errstr &quot;; </li></ul></ul>
    33. 33. Perl Key Points (4) <ul><li>Define the SQL statement and execute </li></ul><ul><ul><li>my $SQL = &quot;SELECT FirstName, LastName, DOB, Gender FROM Patients WHERE Gender = '$Gender' ORDER BY FirstName DESC&quot;; my $sth = $dbh->prepare($SQL) or die &quot;Unable to prepare $SQL: dbh->errstr &quot;; $sth->execute or die &quot;Unable to execute query: $dbh->errstr &quot;; </li></ul></ul><ul><li>Clean up </li></ul><ul><ul><li>$sth->finish; $dbh->disconnect; </li></ul></ul>
    34. 34. Perl Security <ul><li>Perl/MySQL can be made secure apart from one serious flaw as implemented at UVa: </li></ul><ul><ul><li>Because web files must be readable by the world (unix permissions), anyone with an account on the server where you run the php code can see the code, including your MySQL $password! </li></ul></ul><ul><ul><li>A couple of exceptions to this flaw are as follows: </li></ul></ul><ul><ul><ul><li>If you secure your server so that there are no other users on it </li></ul></ul></ul><ul><ul><ul><li>(It may ** be possible to compile Perl scripts into binary executables using perlcc. Then you must hide or remove your source code containing the MySQL password) </li></ul></ul></ul><ul><ul><ul><li>One other possible poor to fair workaround: use .htaccess to password protect your php directory (limited access) </li></ul></ul></ul><ul><ul><li>See the passwords link , security links page </li></ul></ul>
    35. 35. Perl Resources <ul><li>ITC-Training Workshops </li></ul><ul><ul><li>Perl Programming Introduction </li></ul></ul><ul><ul><li>Perl Programming for the Web </li></ul></ul><ul><li>Perl Documentation (UVa currently has 5.6, but 5.8 exists) </li></ul><ul><ul><li>Overview , Built-in functions , Data types , Regular expressions , … </li></ul></ul><ul><ul><li>Modules : DBI(1) , CGI </li></ul></ul><ul><li>WebMonkey’s Tutorial , etc. </li></ul><ul><li>MySQL and PERL for the Web by DuBois (New Riders) </li></ul><ul><li>Learning Perl by Schwartz & Christiansen (O’Reilly) </li></ul><ul><li>Programming Perl by Wall, Orwant, & Christiansen (O’Reilly) </li></ul><ul><li>Programming the Perl DBI: Database Programming with Perl by Descartes, Bunce, & Mui (Editor) (O’Reilly) </li></ul>
    36. 36. PHP: Hypertext Preprocessor ( PHP ) <ul><li>HTML embedding scripting language (see the PHP online manual </li></ul><ul><li>When a browser calls a PHP document, the Server reads the PHP document and </li></ul><ul><ul><li>Runs the PHP code </li></ul></ul><ul><ul><li>Returns the resulting HTML code to the browser </li></ul></ul><ul><li>Example ( code ) </li></ul>
    37. 37. PHP Key Points (1) <ul><li>Filename must end in .php or .phtml </li></ul><ul><li>File must have “other” read permission (chmod o+r filename .phtml) </li></ul><ul><li>PHP code enclosed in <?php PHP code ?> or <? PHP code ?> </li></ul><ul><li>Everything outside is HTML </li></ul><ul><li>Output is (generally) to a browser requiring standard HTML </li></ul>
    38. 38. PHP Key Points (2) <ul><li>Connecting with RDBMS and editing, adding, and deleting databases therein are all done through PHP functions </li></ul><ul><li>Connect with MySQL RDBMS </li></ul><ul><ul><li>mysql_connect($hostName, $userName, $password) or die(&quot;Unable to connect to host $hostName&quot;); </li></ul></ul><ul><li>Connect with database </li></ul><ul><ul><li>mysql_select_db($dbName) or die(&quot;Unable to select database $dbName&quot;); </li></ul></ul>
    39. 39. PHP Key Points (3) <ul><li>Queries: Nearly all table interaction and management is done through queries: </li></ul><ul><li>Basic information searches </li></ul><ul><ul><li>$SQL = &quot;SELECT FirstName, LastName, DOB, Gender FROM Patients WHERE Gender = '$Gender‘ ORDER BY FirstName DESC&quot;; $Patients = mysql_query($SQL); </li></ul></ul><ul><li>Editing, adding, and deleting records and tables </li></ul><ul><ul><li>$SQL = &quot;INSERT INTO Patients (FirstName, LastName) VALUES('$firstName', '$lastName')&quot;; $Patients = mysql_query($SQL); </li></ul></ul>
    40. 40. PHP Key Points (4) <ul><li>Looping through and extracting results </li></ul><ul><ul><li>$numPatients = mysql_numrows($Patients); </li></ul></ul><ul><ul><li>For ($I-0; $I<$numPatients; $I++) { $lastName = mysql_result($Patients, $I, “LastName”); … } </li></ul></ul><ul><li>Cleaning up: close the database connection </li></ul><ul><ul><li>mysql_close(); </li></ul></ul>
    41. 41. PHP/MySQL Security <ul><li>The same problems as PHP occur with Perl if you run it as a Perl or CGI script. </li></ul><ul><ul><li>See the passwords link </li></ul></ul>
    42. 42. PHP Resources <ul><li>ITC-Training Workshops </li></ul><ul><ul><li>PHP and MySQL </li></ul></ul><ul><li>PHP Documentation </li></ul><ul><li>ITC-Desktop’s examples </li></ul><ul><li>PHP’s Tutorial </li></ul><ul><li>WebMonkey’s Tutorial </li></ul><ul><li>PHP and MySQL Web Development by Welling & Thomson (SAMS) </li></ul><ul><li>Beginning PHP4 by Blan, Choi, et. al (Wrox) </li></ul>
    43. 43. (Other) Books <ul><li>Beginning ASP Databases by Kauffman (Wrox) </li></ul><ul><li>Professional Active Server Pages 3.0 by Homer (Wrox) </li></ul><ul><li>Programming Cold Fusion by Brooks-Bilson (O’reilly) </li></ul><ul><li>Cold Fusion 5 Web Applications Construction Kit (4 th Ed.) by Forta (Macromedia Press) </li></ul><ul><li>MySQL by DuBois (New Riders) </li></ul><ul><li>MySQL and PERL for the Web by DuBois (New Riders) </li></ul><ul><li>MySQL & mSQL byYarger, Reese, & King </li></ul><ul><li>PHP and MySQL Web Development by Welling & Thomson (SAMS) </li></ul><ul><li>Beginning PHP4 by Blan, Choi, et. al (Wrox) </li></ul><ul><li>Learning Perl by Schwartz & Christiansen (O’Reilly) </li></ul><ul><li>Programming Perl by Wall, Orwant, & Christiansen (O’Reilly) </li></ul><ul><li>Programming the Perl DBI: Database Programming with Perl by Descartes, Bunce, & Mui (Editor) (O’Reilly) </li></ul><ul><li>SQL-99 Complete, Really by Gulutzan & Pelzer (R&D Books) </li></ul>
    44. 44. Java Server Pages <ul><li>Script language like ASP, Cold Fusion, PHP </li></ul><ul><li>Write once for all platforms </li></ul>
    45. 45. Java Key Points (1) <ul><li>Download the MySQL driver from sourceforge .net </li></ul><ul><li>Java-MySQL examples </li></ul><ul><ul><li> </li></ul></ul>