Creating a website – Part 9

MySQL Database Setup We have our user table set up but there is an issue with one of the columns. Can you guess what it is? It’s theĀ username. With theĀ user_id being the primary key we will always get a new unique row helped by the Auto_Increment option we set to it. However this does not … Read more

Creating a website – Part 8

Database Setup We now have Xampp installed and can create the database. This is done in phpMyAdmin and can be reached by typing: http://localhost/phpmyadmin/ into the address bar of a blank browser tab. You will be asked to enter your username and password. The default for these is ‘root’ (without quotation marks). This will log … Read more

Creating a website – Part 7

Database Setup In Part 6 we created an Entity Relationship Diagram for our database, including a junction table to link the ‘keyword’ table to the ‘photo’ table. Now it is time to set up the database so we will be able to use it when we begin the coding. The first thing we want to … Read more

Creating a website – Part 6

Database Design So far we have designed two tables, created the relationship between them, and designed an ERD (Entity Relationship Diagram). Let’s look at that again: I mentioned that we would be looking into the ‘keywords’ column. So what problem do we have here? In its current design we could have a photo with multiple … Read more

Creating a website – Part 5

Database Design Previously we created our tables and I said we would look at a graphical representation – also called an Entity Relationship Diagram (ERD) – which will help us visualise the lists for our table columns. This is extremely helpful because it can show if a relationship (the connection between tables) has any errors. … Read more

Creating a website – Part 4

Database Design I previously talked about creating lists for what we require for our site and how messy our initial lists were. Before I get into improving these, I would recommend reading the link below. It covers database normalisation which is a method to organise your databases – making them simpler to use, improving the … Read more