Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Understanding Entities, Attributes, and Relationships in Database Design, Schemes and Mind Maps of Database Management Systems (DBMS)

An overview of Entity Relationship Model (ERM) and its components, including entities, attributes, relationships, and their visual representation in Entity Relationship Diagrams (ERDs). Learn about different types of entities, attributes, and relationships, such as weak entities, simple and composite attributes, and cardinality. Understand the importance of keys and primary keys in identifying entities.

Typology: Schemes and Mind Maps

2017/2018

Uploaded on 09/11/2022

neha-yarrapothu
neha-yarrapothu ๐Ÿ‡ฎ๐Ÿ‡ณ

5 documents

1 / 39

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Entity Relationship Model
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27

Partial preview of the text

Download Understanding Entities, Attributes, and Relationships in Database Design and more Schemes and Mind Maps Database Management Systems (DBMS) in PDF only on Docsity!

Entity Relationship Model

Entity Relationship Model

  • (^) An Entity Relationship Diagram (ERD) is a visual representation of different data using conventions that describe how these data are related to each other.
  • (^) For example, the elements writer, novel, and consumer may be described using ER diagrams this way: The elements inside rectangles are called entities while the items inside diamonds denote the relationships between entities.

Weak Entity

  • (^) A weak entity is an entity that depends on the existence of another entity.
  • (^) In more technical terms it can defined as an entity that cannot be identified by its own attributes.
  • (^) It uses a foreign key combined with its attributed to form the primary key.
  • (^) An entity like order item is a good example for this.
    • (^) The order item will be meaningless without an order so it depends on the existence of order.

Attributes

  • (^) Entities are represented by means of their properties ,

called attributes.

  • (^) All attributes have values.
  • (^) For example, a student entity may have name, class,

and age as attributes.

  • (^) There exists a domain or range of values that can be

assigned to attributes.

  • (^) For example, a student's name cannot be a numeric

value. It has to be alphabetic. A student's age cannot

be negative , etc.

Types of Attributes (contd.,)

  • (^) Derived attribute โˆ’ Derived attributes are the attributes that do not exist in the physical database, but their values are derived from other attributes present in the database.
  • (^) For example, average_salary in a department should not be saved directly in the database, instead it can be derived.
  • (^) For another example, age can be derived from data_of_birth.
  • (^) For example for a circle the area can be derived from the radius.

Types of Attributes (contd.,)

  • (^) Single-value attribute โˆ’ Single-value attributes contain single value. For example โˆ’ Social_Security_Number.
  • (^) Multi-value attribute โˆ’ Multi-value attributes may contain more than one values. For example, a person can have more than one phone number, email_address, etc.
  • (^) For example a teacher entity can have multiple subject values.

Entity-Set and Keys

  • (^) Key is an attribute or collection of attributes that uniquely identifies an entity among entity set.
  • (^) For example, the roll_number of a student makes him/her identifiable among students.
  • (^) Super Key โˆ’ A set of attributes (one or more) that collectively identifies an entity in an entity set.
  • (^) Candidate Key โˆ’ A minimal super key is called a candidate key. An entity set may have more than one candidate key.
  • (^) Primary Key โˆ’ A primary key is one of the candidate keys chosen by the database designer to uniquely identify the entity set.

Relationship

  • (^) The association among entities is called a relationship.
  • (^) For example, an employee works_at a department, a student enrolls in a course.
  • (^) Here, Works_at and Enrolls are called relationships.
  • (^) For example, the entity โ€œ carpenter โ€ may be related to the entity โ€œ table โ€ by the relationship โ€œbuildsโ€ or โ€œmakes โ€. Relationships are represented by diamond shapes and are labeled using verbs.

Mapping Cardinalities

  • (^) Cardinality defines the number of entities in one entity set, which can be associated with the number of entities of other set via relationship set.
  • (^) One-to-one โˆ’ One entity from entity set A can be associated with at most one entity of entity set B and vice versa.
  • (^) One-to-many โˆ’ One entity from entity set A can be associated with more than one entities of entity set B however an entity from entity set B, can be associated with at most one entity.
  • Many-to-many โˆ’ One entity from A can be associated with more than one entity from B and vice versa.

ER Diagram Representation

  • (^) Let us now learn how the ER Model is represented by means of an ER diagram.
  • (^) Any object, for example, entities, attributes of an entity, relationship sets, and attributes of relationship sets, can be represented with the help of an ER diagram.

Attributes

  • (^) Attributes are the properties of entities. Attributes are

represented by means of ellipses.

  • (^) Every ellipse represents one attribute and is directly

connected to its entity (rectangle).

  • If the attributes are composite , they are further divided in a tree like structure. Every node is then connected to its attribute. That is, composite attributes are represented by ellipses that are connected with an ellipse.