Lab Exercises
Welcome to the lab exercises repo!
Here you'll find all the example code which accompanies weeks 1-10 of Data, Networks & the Web. The example code is for a music store app, so you will need to adapt it for whatever app you're developing. Remember to comment the code to show your understanding.
Topic finder
Here's a reminder of the topics covered in each lab session. Please note, topics may be subject to change if a lab has not yet occurred.
Lab 1: Setting up your development environment (6/7 Oct)
- creating a project repo
- cloning your repo to IGOR and/or locally
- mounting IGOR (if applicable)
Lab 2: Introduction to relational databases and SQL (13/14 Oct)
- Designing a schema
- Defining a schema in SQL (TABLE CREATE)
- Inserting data (INSERT INTO)
- Basic querying (SELECT)
Lab 3: SQL sequel! (Advanced querying) (20/21 Oct)
- Sorting (ORDER BY)
- Table joins
- Aggregate functions
- Comparison operators
Lab 4: Security and integrity! (27/28 Oct)
- Data normalisation
- Backup/restore
Lab 5: Using PHP to interact with a MySQL database (10/11 Nov)
- mysqli API
- Displaying data
Lab 6: Basic Application Design (17/18 Nov)
- Code organisation ('separation of concerns')
- Single Point of Entry (SPOE)
- Creating and changing 'views'
- Passing parameters in GET
Lab 7: Form handling and data manipulation (24/25 Nov)
- POST method
- Basic data sanitization methods
Lab 8: Implementing transactions & read locking in PHP (1/2 Dec)
- Transaction & read locking examples
Lab 9: Introduction to MongoDB (non-assessed) (8/9 Dec)
- Document structure
- Creating a collection
- MongoDB CRUD operations