DBMS Concepts

DBMS Tutorial Components of DBMS. Applications of DBMS The difference between file system and DBMS. Types of DBMS DBMS Architecture DBMS Schema Three Schema Architecture. DBMS Languages.

DBMS ER Model

ER model: Entity Relationship Diagram (ERD) Components of ER Model. DBMS Generalization, Specialization and Aggregation.

DBMS Relational Model

Codd’s rule of DBMS Relational DBMS concepts Relational Integrity Constraints DBMS keys Convert ER model into Relational model Difference between DBMS and RDBMS Relational Algebra DBMS Joins

DBMS Normalization

Functional Dependency Inference Rules Multivalued Dependency Normalization in DBMS: 1NF, 2NF, 3NF, BCNF and 4NF

DBMS Transaction

What is Transaction? States of transaction ACID Properties in DBMS Concurrent execution and its problems DBMS schedule DBMS Serializability Conflict Serializability View Serializability Deadlock in DBMS Concurrency control Protocols

Difference

Difference between DFD and ERD

Misc

Advantages of DBMS Disadvantages of DBMS Data Models in DBMS Relational Algebra in DBMS Cardinality in DBMS Entity in DBMS Attributes in DBMS Data Independence in DBMS Primary Key in DBMS Foreign Key in DBMS Candidate Key in DBMS Super Key in DBMS Aggregation in DBMS Hashing in DBMS Generalization in DBMS Specialization in DBMS View in DBMS File Organization in DBMS What Is A Cloud Database What Is A Database Levels Of Locking In DBMS What is RDBMS Fragmentation in Distributed DBMS What is Advanced Database Management System Data Abstraction in DBMS Checkpoint In DBMS B Tree in DBMS BCNF in DBMS Advantages of Threaded Binary Tree in DBMS Advantages of Database Management System in DBMS Enforcing Integrity Constraints in DBMS B-Tree Insertion in DBMS B+ Tree in DBMS Advantages of B-Tree in DBMS Types of Data Abstraction in DBMS Levels of Abstraction in DBMS 3- Tier Architecture in DBMS Anomalies in Database Management System Atomicity in Database Management System Characteristics of DBMS DBMS Examples Difference between Relational and Non-Relational Databases Domain Constraints in DBMS Entity and Entity set in DBMS ER Diagram for Banking System in DBMS ER Diagram for Company Database in DBMS ER Diagram for School Management System in DBMS ER Diagram for Student Management System in DBMS ER Diagram for University Database in DBMS ER Diagram of Company Database in DBMS Er Diagram Symbols and Notations in DBMS How to draw ER-Diagram in DBMS Integrity Constraints in DBMS Red-Black Tree Deletion in DBMS Red-Black Tree Properties in DBMS Red-Black Tree Visualization in DBMS Redundancy in Database Management System Secondary Key in DBMS Structure of DBMS 2-Tier Architecture in DBMS Advantages and Disadvantages of Binary Search Tree Closure of Functional Dependency in DBMS Consistency in Database Management System Durability in Database Management System ER Diagram for Bank Management System in DBMS ER Diagram for College Management System in DBMS ER Diagram for Hotel Management System in DBMS ER Diagram for Online Shopping ER Diagram for Railway Reservation System ER Diagram for Student Management System in DBMS Isolation in DBMS Lossless Join and Dependency Preserving Decomposition in DBMS Non-Key Attributes in DBMS Data Security Requirements in DBMS DBMS functions and Components What is Homogeneous Database? DBMS Functions and Components Advantages and Disadvantages of Distributed Database

Components of an ER Diagram

An ER Diagram consists of the following components:

  1. Entity
  2. Attributes
  3. Relationships
Components of an ER Diagram

1. Entity

An entity may be an object, place, person, or an event which stores data in the database. In an entity-relationship diagram, an entity is represented by a rectangle. Student, course, manager, employee, patient, etc. are examples of an entity.

Components of an ER Diagram

Entity type: An entity type is a collection or a set of entities having some common attributes. In a database, each entity type is described by a name and list of attributes.

Components of an ER Diagram

Entity set: It is a set (or collection) of entities of the same type which share the similar properties, or attributes.

For example,the group of people who are lecturers in a university can be de?ned as an entity set lecturer. Similarly, the entity set of students might represent the group of all students in the university.

Components of an ER Diagram

An entity can be characterized into two types:

  1. Strong entity: This type of entity has a primary key attribute which uniquely identifies each record in a table. In the ER diagram, a strong entity is usually represented by a single rectangle.
  2. Weak entity:An entity does not have a primary key attribute and depends on another strong entity via foreign key attribute. In the ER diagram, a weak entity is usually represented by a double rectangle.

2. Attributes: An attribute in an Entity-Relationship Model describes the properties or characteristics of an entity. It is represented by an oval or ellipse shape in the ER diagram. Every oval shape represents one attribute and is directly connected to its entity which is in the rectangle in shape.

For example, employee_id, employe_name, Gender, employee_age, Salary, and Mobile no. are the attributes which define entity type Employee.

Components of an ER Diagram

In the ER model, an attribute can be characterized into the following types:

  1. Simple attribute: An attribute which contains an atomic value and cannot be divided further is called a simple attribute.For example, Gender and Salary of a person. It is also represented by an oval.
Components of an ER Diagram
  • Key attribute: An attribute which can uniquely identify an entity in an entity set is called a key attribute. It represents a primary key in the ER diagram. In an Entity-Relationship diagram, the key attribute is denoted by an oval with an underlying line. For example, employee_id will be unique for each employee.
Components of an ER Diagram
  • Composite attribute:An attribute which is a combination of two or more simple attributes is called a composite attribute. In an Entity-Relationship diagram, it is represented by an ellipse, and that ellipse comprises of other ellipses.For example, the Name attribute of an employee entity type consists of First name, Second name, and Last name.
Components of an ER Diagram
  • Derived attribute: An attribute which can be derived from other attributes is called a derived attribute. In an entity-relationship diagram, these attributes are represented by a dashed oval shape. For example, employee_age is a derived attribute as it changes over time and can be derived from another attribute DOB (Date of birth).
Components of an ER Diagram
  • Multi-valued attribute: An attribute which contains more than one value for a given entity. For example, an employee can have more than one mobile number and email address.
Components of an ER Diagram

3. Relationship

A relationship in Entity-Relationship Model is used to describe the relation between two or more entities. It is represented by a diamond shape in the ER diagram. For example, student study in college, employee works in a department. Here, ‘study in’ and ‘works in’ are the relationships.

Degree of Relationship

A relationship where a number of different entity set participate is called as degree of a relationship.

Degree of relationship can be categorized into the following types:

  1. Unary Relationship
  2. Binary Relationship
  3. Ternary Relationship
  4. n-ary Relationship
  1. Unary Relationship: A relationship where a single entity set participates is called as a unary relationship. For example, In a company, an employee manages or supervises another employee.
Components of an ER Diagram
  • Binary Relationship: When two entity set participates in a relationship is called a binary relationship.

It is further categorized into four types:

  1. One-to-One Relationship: When one entity from an entity set A is associated with another entity of entity set B and vice versa. Such type of relationship is called one to one relationship.
Components of an ER Diagram
Components of an ER Diagram
  1. One-to-Many Relationship:When one entity from an entity set A is associated or linked with multiple entities of entity set B, then it is called a one-to-many relationship.
Components of an ER Diagram
  1. Many-to-One Relationship: When more than one entities from an entity set A is associated with one entity of entity set B, then it is called a many-to-one relationship.
Components of an ER Diagram
  1. Many-to-Many Relationship: When more than one entity from an entity set A is associated with many entity of an entity set B. Such types of relationship are called a many-to-many relationship.
Components of an ER Diagram

c) Ternary Relationship: When three entity set participates in a relationship, is called a ternary relationship.

Components of an ER Diagram

d) n-ary Relationship: When more than three entity set involves in a relationship is called an n-ary relationship.