1 / 10

By: Marisha Richards

ENTITY-RELATIONSHIP DIAGRAM. By: Marisha Richards. Introduction. An entity-relationship (ER) diagram is a specialized graphic that illustrates the interrelationships between entities in a database.

braden
Download Presentation

By: Marisha Richards

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ENTITY-RELATIONSHIPDIAGRAM By: Marisha Richards

  2. Introduction • An entity-relationship (ER) diagram is a specialized graphic that illustrates the interrelationships between entities in a database. • An Entity Relationship Diagram (ERD) is a snapshot of data structures. ERDs show entities in a database and relationships between tables within that database.

  3. Introduction Cont’d • It is essential to have one of these if you want to create a good database design. The patterns help focus on how the database actually works with all of the interactions and data flows, although another useful tool is a Data Flow Diagram (DFD) which more directly describes this.

  4. ERD Symbols • ER diagrams often use symbols to represent three different types of information. Boxes are commonly used to represent entities. Diamonds are normally used to represent relationships and ovals are used to represent attributes.

  5. Entity • An entity is an object or concept about which you want to store information.

  6. Attributes • A attribute is the unique, distinguishing characteristic of the entity. For example, an employee's social security number might be the employee's key attribute.

  7. Relationships • Relationships illustrate how two entities share information in the database structure.

  8. One-to-One Relationship • In a one-to-one relationship, each row in one database table is linked to one and only one other row in another table. In a one-to-one relationship between Table A and Table B, each row in Table A is linked to another row in Table B. The number of rows in Table A must equal the number of rows in Table B. • An example of one-to-one relationship would be a car runs on one engine

  9. One-to-Many Relationship • In a one-to-many relationship, each row in the related to table can be related to many rows in the relating table. This allows frequently used information to be saved only once in a table and referenced many times in all other tables. • An example of one-to-many relationship is a mother giving birth to triplets.

  10. Many-to-Many Relationship • In a many-to-many relationship, a row in table A can have many matching rows in table B, and vice versa. You create such a relationship by defining a third table, called a junction table, whose primary key consists of the foreign keys from both table A and table B.

More Related