Skip to main content
Engineering LibreTexts

7.1: Introduction and Background

  • Page ID
    93671
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    Mapping an Entity Relationship (ER) model gives a good overview of the design of a  system with the goal of making the system easier to understand at a technical level. The ER diagrams can be mapped to a relation schema, which means we can clearly display the relationship between its members. The database schema is a structure that describes in a formal language the association of data as a blueprint of how the database can be constructed. 

    To understand this process, we will review below what an ER model is. An ER model is used to illustrate the logical interpretation of the system and consists of three components: Entity, Entity Type and Entity Set. 

    Entity can refer to a person, a concept, an object, a virtual file, or it can represent an idea that can be quantified, such as a company, a job, or a document. An entity consists of an Entity Type and everything that consists of an entity type is called an Entity Set. The example below will clarify the power of design a schema showcasing an entity type, “Car,” and an entity set consisting of all cars. 


    Screenshot 2023-03-20 at 10.07.41 AM.png
    Figure \(\PageIndex{1}\): An Entity Set of All Cars. ("Module_3: Mapping ER to Schema, Normalization" by Dr Sarah NorthAffordable Learning Georgia is licensed under CC BY 4.0)

    The next important step in understanding the mapping is an Attribute. Attributes are properties which define the entity type. For example, a person may have the attributes name, date of birth, and address. The attribute in an ER diagram is represented by an oval. 


    Screenshot 2023-03-20 at 10.07.54 AM.png
    Figure \(\PageIndex{1}\): Attribute in an ER Diagram. ("Module_3: Mapping ER to Schema, Normalization" by Dr Sarah NorthAffordable Learning Georgia is licensed under CC BY 4.0)

    The attribute that uniquely identifies each entity is called a Key Attribute and is represented by an oval with underlining. A key attribute can be “ID,” which identifies each entity by a unique number. 


    Screenshot 2023-03-20 at 10.08.02 AM.png
    Figure \(\PageIndex{1}\): Key Attribute in an ER Diagram. ("Module_3: Mapping ER to Schema, Normalization" by Dr Sarah NorthAffordable Learning Georgia is licensed under CC BY 4.0)

    For complex designs, there are multiple different types of attributes: Composite Attributes, consisting of many individual attributes, Multivalued Attributes, consisting more than one value, and Derived Attributes, which are derived from other attributes as the name suggests. 

    Between entities, there are relationships. A relationship has a type and can be part of a sets. The latter consists of one, two or many relationship types: unary, binary or N-ary. 


    Screenshot 2023-03-20 at 10.25.27 AM.png
    Figure \(\PageIndex{1}\): Multiple Different Types of Attributes. ("Module_3: Mapping ER to Schema, Normalization" by Dr Sarah NorthAffordable Learning Georgia is licensed under CC BY 4.0)

    Relationship Type: 


    Screenshot 2023-03-20 at 10.25.41 AM.png
    Figure \(\PageIndex{1}\): Relationship Type. ("Module_3: Mapping ER to Schema, Normalization" by Dr Sarah NorthAffordable Learning Georgia is licensed under CC BY 4.0)

    Relationship Set: 


    Screenshot 2023-03-20 at 10.25.54 AM.png
    Figure \(\PageIndex{1}\): Relationship Set. ("Module_3: Mapping ER to Schema, Normalization" by Dr Sarah NorthAffordable Learning Georgia is licensed under CC BY 4.0)

    Unary, Binary Relationship: 


    Screenshot 2023-03-20 at 10.26.05 AM.png
    Figure \(\PageIndex{1}\): Unary, Binary Relationship ("Module_3: Mapping ER to Schema, Normalization" by Dr Sarah NorthAffordable Learning Georgia is licensed under CC BY 4.0)

    An ER diagram can also have a Weak Entity. A weak entity is an entity type for which a key attribute can’t be defined. A company can store information of dependents (Parents, Children, Spouse) of an Employee but the dependents don’t exist without the Employee; we call this entity a weak entity. 


    Screenshot 2023-03-20 at 10.36.12 AM.png
    Figure \(\PageIndex{1}\): Weak Entity. ("Module_3: Mapping ER to Schema, Normalization" by Dr Sarah NorthAffordable Learning Georgia is licensed under CC BY 4.0)

    7.1: Introduction and Background is shared under a not declared license and was authored, remixed, and/or curated by LibreTexts.

    • Was this article helpful?