Saturday 7 May 2016

Week 10

We learnt about the Server Side Script which is MySQL. SQL is a standard language for accessing databases.
To build a web site that shows data from a database, you will need:

  • An RDBMS database program (i.e. MS Access, SQL Server, MySQL)
  • To use a server-side scripting language, like PHP or ASP
  • To use SQL to get the data you want
  • To use HTML / CSS
Some of The Most Important SQL Commands:
Data Manipulation Language
  • SELECT - extracts data from a database
  • UPDATE - updates data in a database
  • DELETE - deletes data from a database
  • INSERT INTO - inserts new data into a database
Data Definition Language
  • CREATE TABLE - creates a new table
  • ALTER TABLE - modifies a table
  • DROP TABLE - deletes a table
  • CREATE INDEX - creates an index (search key)
  • DROP INDEX - deletes an index 
Advantages of using database to store web data:
  • faster access
  • better concurrent access
  • easier changes to data and scripts
  • increased security
Accesing MySQL via PHP
  1. Make a connection to the MySQL database server.
  2. Select the database within MySQL that you want to work with.
  3. Issue an SQL statement/ create the query.
  4. If you are issuing a SELECT statement, iterate through the result set and extract each record.


There is no class for the lab session as Thursday is a holiday.
 

No comments:

Post a Comment