Entity Relationship Models

Relationship Diagram

ERD or Entity Relationship Models are used to show the relationship between entities with a database. This is a basic version of some that can be created for databases, but mine is just to demonstrate a ERD for a online recipe book. There only need to be 4 categories , member, recipe, photo and comment, but you can extend a lot from these to make it more developed.

Within each categories there a PK’s (Primary Key) and FK’s (Foreign Keys). In each one of the categories there needs to be a primary key so that you can link it within another category as a foreign key. That is why you will normally do the ID of each section as the primary key, because a ID number is never repeated where as a name can be.

The arrows between each section show the relationship between each category, if the end has 3 lines coming off it means many, but the single line means one, so its one to many. For example for every recipe there will be one order but that owner may have many recipes

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s