In this weeks seminar we were introduced to Entity Relationship Modelling (ERM), a way of planning tables to be created and the relationships between them. This is a very important step in regards to creating a database, as it is important to plan ahead. If the tables were created without a plan, then many changes would have to be made to them, so planning ahead saves a lot of time in creating a database. ERM involves deciding on important entities, as well as what attributes each entity will hold. An entity is a distinct thing which has data stored about it, and an attribute is a piece of data about an entity.
For homework we were tasked with creating an ERM for a cookbook website, where recipe book contributors can store their personal data (relevant to a cookbook application), and where all contributors are optionally able to create 1 or many recipes. Within this each recipe has a title, contributor and description, as well as at least one photo, and each photo is accompanied by a description. Below you can see my entities (in capitals) each followed by the attributes I think each one should hold.
This is then converted into an ERM, showing the relationship between each entity in my database. The crows foot indicates many, whereas a single line indicates one, so for example each contributor can make many recipes, but each recipe can only be contributed by one person.
This is obviously a very simple ERM, as in a larger database it would be much more complex, with many more entities, but I believe this has solved the problem presented to us.