I have now created the database structure that I sketched on paper, in phpmyadmin, although I had to make some changes. Because of my limited PHP knowledge, there are some limitations on the project, and so some fields had to be removed. The same two tables as I initially planned were created, ‘User’ and ‘Holiday’.
The ‘User’ table remained the same as the initial plan, as it was a fairly basic table to begin with:
(‘User’ table showing fields: user_id, user_name, user_password, user_city, date_joined, user_forename, user_surname, user_dob)
The ‘Holiday’ table had some changes made to it. I didn’t have the time to create a tagging system, so ‘holiday_tags’ was removed. I was also unable to allow users to upload a picture, as we don’t yet have permissions to do this, so ‘holiday_picture’ was removed. Otherwise, the design of the ‘Holiday’ table remained the same:
(‘Holiday’ table showing fields: holiday_id, holiday_location, holiday_description, holiday_rating, holiday_user)
Both the ‘User’ and ‘Holiday’ tables required a key field, to allow each entry to be uniquely identified. These were the ‘user_id’ and ‘holiday_id’ respectively. The values in these fields are generated automatically as an entry is added.
At this stage in the project both tables appear to be working correctly, and are communicating with the database so hopefully I am finished working on them, but changes may have to be made as the project progresses.