Database – Entity Relationship Diagrams

An entity is a piece of data-an object or concept about which data is stored.

http://www.webopedia.com/TERM/E/entity_relationship_diagram.html

In relation to our new project and the databases we will be creating, an important part of it is being able to understand ERD (entity relationship diagrams). This looks at relationships within a database and looks at how you can make a link using certain foreign keys. The specific focus is on using information systems and how we can create these for our chosen group project as we are currently using php myadmin, to collect our own set of data. This can be useful when we are looking at what sort of entity relationship we need to create between each category, for example in a cookbook, the relationship between the recipe and the feedback could be classed as a relationship of one to many, as they will share the same relationship with the recipe entity as they are giving feedback on this specific recipe.

There are three types of relationships between entities

1. One-to-One

2. One-to-Many

3. Many-to-Many

Above: Examples of entity relationships 

http://www.webopedia.com/TERM/E/entity_relationship_diagram.html

The task

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:
*   title
*   contributor
*   description (including cooking instructions)
*   where each recipe has 1 or many photos
*   where each photo is accompanied by a short description
erm copy

Above: My ERD for a cookbook 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s