Week 02: Back End Web Development (PHP, SQL + phpMyAdmin)
Class Task and Information
- Lesson 01:
- Students are to create an individual file for each of the following tutorials. Remember to use internal comments and developer principles.
- Lesson 02:
- The final part of PHP programming for year 10:
- Tutorial 01: Working with Functions
- Tutorial 02: Build a FizzBuzz program
- Programming Task:
- Write a PHP program to display the times tables from 1 to 12 for a specified number. e.g. 5:
- 1 x 5 = 5
- 2 x 5 = 10
- 3 x 5 = 15 etc
- Lesson 03: INTRODUCTION TO mySQL
- Working with Database Schema
- Create-Read-Update-Destroy (CRUD)
- Querying SQL databases
- To Connect to phpMyAdmin: http://172.18.0.2XX/phpmyadmin
User name: admin
- Vocabulary and knowledge tutorial:
- SQL - introduction to phpMyAdmin
- What is Data?
- Different types of Data within a database (Text, Numbers, Date/Time, Boolean etc)
- Primary and Foreign keys
- Table Naming conventions tblStudents
- The difference between System Analysis, Database Engineer, Database Programmer and tester.
- Database table structure (Fields, Records, Data)
- Lesson 04: Database Abstraction
- Database analysis:
- All buy and sell websites on the internet (dynamic databases) use a database to store and generate data sets of information for users.
- Databases hold data that has been ordered and categorized by their entity (Students, Car, Sport, Geniality ...) and then broken into fields to classify the data and give it an appropriate data type.
- This data is turned into information when a data set is gathered, sorted, ordered and given meaning to create information.
- Queries written in SQL enable the database to return datasets as information for the end user.
- Task 1: Make a list of 5 buy and sell websites on the internet that you suspect to have a database of products behind the front-end. Some example (you can not use these ones)
- Task 2: Research and make a list of all the different types of fields that are used in each of your researched databases :
- Start with one database and record the possible field name, data type and one piece of sample data
product_name: varchar 25, Merida CycloCross 400 (2018)
- For the remaining databases, check the possible field lengths and only add the missing fields not yet identified in the first one.
- Task 03: Create a Data Dictionary (SQL database criteria) for one of the following:
- Uniform shop
- Tuck Shop
- Sports equipment sales
- School supplies for teachers
- Remember to use appropriate field names and conventions.
- Hand in a printed version of the document as well as email the solutions to Mr Marsden.
Readings / Homework
- Ensure all programming tasks are complete
- Complete all set work and review tutorials for major test at the end of term.
- Reminder that the test will be Wednesday Week 5 (6th of Nov) Lesson 2