Reading:  

Introduction to database management systems


Entity Relation Model Basic Concept

The Conceptual view of a database is represented by ER model. It allows to define a representation of real world concepts at logical level.ER model has no facilities to describe machine-related aspects. 

In ER model logical structure of data is captured by indicating grouping of data

Into entities. The ER model also supports a top-down approach by which detail can be

given in successive stages.

Entity

An entity is something which is described in a database by storing its data, it may be a concrete entity a conceptual entity. It is real-world object or concept (e.g., student, employee, course, department, or event)

Attributes

An attribute describes a property associated with entities. Attribute will have a

Name and a Value for each entity. (e.g., age, height, color). Some of Attribute types are: 

  • Simple attribute − they are atomic values, which cannot be divided further. For example, a Customer phone number is an atomic value of 10 digits. 
  • Composite attribute − Composite attributes are made of more than one simple attribute. For example, a Customer complete name will have first_name and last_name. 
  • Derived attribute − Derived attributes are the ones that do not exist in physical databases, but their values are derived from other attributes present in database. For example, a Customer age can be derived from data_of_birth. 
  • 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 Customer can multiple phone number, email_address, etc.

 

Entity-Set and Keys

Key is a collection of attributes that uniquely identifies an entity among entity set.

 

  • 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 candidate keys chosen by database designer to uniquely identify entity set.

 

Relationship

A relationship relates two or more distinct entities with a specific meaning.

For example, EMPLOYEE Smith works on ProductX PROJECT 

Relationships of the same type are grouped or typed into a relationship type.

For example, the WORKS_ON relationship defines a relation to PROJECTs on which EMPLOYEEs work on.

 

Relationship Set

The relationship is core aspect of a relational database. The different type of Relationship are:

  • 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 one relation

  • 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.

    one to many relationship

  • Many to One : More than one entities from entity set A can be associated with at most one entity of entity set B, however an entity from entity set B can be associated with more than one entity from entity set A.

    many to one relation

Description

This free tutorial covers the basics of database management system to help you with your understanding on the topic, Please note that this tutorial assumes that either you are a beginner or just want to brush up your understanding on DBMS

Tutorial covers the topics below

  • What is DBMS?
  • Architecture
  • Data Models
  • Data Schemas
  • Data Independence
  • Entity-Relation Model Basic Concept
  • Entity-Relation Diagram Representation
  • Generalization, Aggregation
  • Codd's 12 Rules
  • Relational Data Model
  • Relational Algebra
  • Structured Query Language
  • Normalization
  • Database Joins
  • Storage System
  • Indexing
  • Hashing
  • Transaction
  • Concurrency Control and Deadlock
  • Data Backup and Recovery

 



Audience

Absolute beginners or students who wish to brush up their understanding on DBMSes

Author: Subject Coach
Added on: 16th Sep 2015

You must be logged in as Student to ask a Question.

None just yet!