In last weeks seminars we looked into how databases functions through the Entity Relation Model (ERM). An ERM is a diagram that represents the relationships between entities which create the backbone for any database. Entities are (Rouse), “the equivalent of grammatical nouns, such as employees, departments, products, or networks. An entity can be defined by means of its properties, called attributes”.
We also looked into how our databases, PHP and HTML will all link together to display the website. Below is good demonstration of how each component of our website works alongside each other and without one they would all fail.
Going away from our seminars Simon told us to produce our own ERM model for a recipe book. Even though we were told to make our ERM of recipe book I wanted to put my own twist on it. I thought it would be interesting to have my ERM of one of my early ideas so therefore have based my ERM on my holiday idea of posting where you’ve been in the world.
The first category is member and is made of largest amount of data as it must store the vast amount of information that a single user may have. Each of these pieces of data are entities and will be unique to the user. Data such as username, email and password will be essential to the user accessing their account and therefore being able to post on the site. The username along with the avatar will be further useful when differentiating user from user.
The photo and video categories contains certain data about each specific photo and video that is posted on the website. The entities will also be used to identify the image and video, such as photo_ID, filename, description and date stamp. Certain entities from each category need to be linked together so for instance an image can be tracked back a user. The way this is done is through a foreign key. Photo_member_ID is an example of a foreign key I have used. The job of this is to link the member to the image.
The holiday category is the holiday itself. What the user may say about the holiday, for example holiday_text. I also have to add three foreign keys which will link the ERM together. One aspect I added that maybe slightly different to a recipe book ERM is the ‘holiday_video_ID’. In a recipe book website a video may not be necessary but my idea for the holiday posting videos will be core part in the website.
SearchSQLServer,. ‘What Is Entity-Relationship Model (ERM Or ER Model)? – Definition From Whatis.Com’. N.p., 2015. Web. 16 Feb. 2015.