For our next project we will be creating a website that will be linked to a database that holds data. An entity relationship diagram is a data model that is used to describe the relationships between each entity.
The relationships you can have in an ERD are as follows:
One to One
For example, in the diagram below for each product there is only one supplier and conversely for each supplier there is only one product.
One to Many
For example, in the diagram below it is stating that each product has many (more than one) different suppliers.
After our ERD lecture I was then asked to create a ERD following this criteria:
Create an ERD for a recipe book which would store data to allow:
* recipe book contributors to store their personal data (relevant to a cookbook application)
* where all contributors are optionally able to create 1 or many recipes
* where each recipe has a:
* description (including cooking instructions)
* where each recipe has 1 or many photos
* where each photo is accompanied by a short description
Remember to link the entities as appropriate (using foreign keys).
Below is my Entity Relationship Diagram
The relationships between each entity are:
Member has One to Many relationship with Recipe
Recipe has One to Many relationship with Photo