How then do we actually draw an E/R diagram using all of the symbols, etc. The following are the steps you follow to draw your diagram:
1. Go to your list of business functions/entities - select the first business function and select the first entity
2. Draw the entity on a piece of paper (as a rectangle) and put the name of your entity in the rectangle (for instance if your first business function is SALES- you select your first Entity - EMPLOYEE)
3. now take your next entity in that business function and draw it as a rectangle and put the name of the entity inside (entity PRODUCT) - if you don't have any more entities in that particular business function, go to the next business function and get the entity there. YOU DO NOT REDRAW AN ENTITY THAT IS ALREADY DRAWN!! For instance - EMPLOYEE will only be drawn ONCE even though it will appear in several of your business functions!!
4. Look at the last entity that you've drawn and see if that entity is related in any way to all of the other entities you have drawn (for instance, is EMPLOYEE related to PRODUCT??) Yes - a product is sold by an employee. You would draw your straight line between the two entities and name your line - you can put in our example either "is sold by" or "sells" - a PRODUCT is "sold by" an EMPLOYEE, or an EMPLOYEE "sells" a PRODUCT. Remember - your Entities are NOUNS and your relationships are VERBS. You do this for each entity on your diagram you have already drawn.
5. Repeat steps 3-4 until there are no more entities form your list of business functions
You now have the first part of your E/R diagram drawn - all entities and relationships. You now go to the next steps
6. You add the cardinalities now - take one of your entities that you have drawn that has a relationship to another entity - such as EMPLOYEE and PRODUCT. You determine the degree of relationship by applying the following statement: Given one instance of an entity A (whatever that entity maybe) - how many instances of entity B (the other entity in the relationship) MUST or COULD I have. Remember - MUST means mandatory, and COULD means optional. Given one instance of EMPLOYEE, how many instances of PRODUCT MUST or COULD I have?? First - does every EMPLOYEE instances sell or handle PRODUCT? Actually - no, you have several employees that never deal with PRODUCT. SO - this isn't a MANDATORY relationship but an OPTIONAL one. Given a particular EMPLOYEE instance who does have relationships with PRODUCT (for instance, a salesman who is an employee) - how many instances of PRODUCT would I have - one or many?? I would hope that a salesman would sell "many" instances of PRODUCT. So your cardinality between EMPLOYEE and PRODUCT (directional from EMPLOYEE to PRODUCT) is many optional relationships (drawn as the circle with the less than symbol). The symbols are drawn next to the PRODUCT entity. Now you reverse the direction. Given one instance of a particular PRODUCT - how many EMPLOYEE instances may or could I have?? Well, since this is an individual instance of a particular PRODUCT - it would only have one EMPLOYEE selling it. So, we would have a MANDATORY ONE relationship between PRODUCT and EMPLOYEE (drawn next to EMPLOYEE).
7. You repeat the cardinality process with ALL of your entities that you have drawn!!
8. Your final step is to go back and add your Attributes into each rectangle (Entity).
You have completed your E/R Diagram!!