0% found this document useful (0 votes)
91 views21 pages

Lesson 6 2

Uploaded by

jhegs tindugan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
91 views21 pages

Lesson 6 2

Uploaded by

jhegs tindugan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

DBMS vs RDBMS: Difference between DBMS and RDBMS

In this guide, you will learn the difference between DBMS (Database Management System) and RDBMS
(Relational Database Management System).

What is a DBMS (Database Management System)?


Database management system is nothing but a software that maintains the data on a system. It allows the user
to perform various operations on the data such as read, write, update etc. DBMS typically maintains the data on
the system in a form of file.

What is a RDBMS (Relational Database Management System)?


RDBMS stores the data in form of tables, these tables are interconnected to each other which helps in identifying
the relation between the data stored in different tables. It stores the data efficiently and the operations on the
data stored in RDBMS are faster compared to the traditional file based data management system.
Difference between DBMS vs RDBMS
DBMS RDBMS

Data is stored in a files. Data is stored in a tables.

RDBMS supports normalization of tables, which reduces the

DBMS doesn’t support Normalization. data redundancy and avoid the database from multiple

anomalies.

RDBMS allows to set permissions on tables, which prevents


DBMS doesn’t have a proper security of the
unauthorised access. It also allows constraints to be set which
database.
make sure which data can be entered into the table.

In DBMS, data is stored in files so the data stored in In RDBMS, data is stored in tables and tables can have a
DBMS RDBMS

different file is isolated and there is no relationship with other tables. This helps in identifying

relation between the data stored in different files. the relationship between data stored in different tables.

DBMS doesn’t support distributed database. RDBMS supports distributed database.

Data redundancy is an issue in DBMS. RDBMS removes data redundancy using normalization.

DBMS is suitable for small organization where data


RDBMS is suitable for large organisations where the size of
size is small and there is no need to scale the data in
the data is huge.
future.
DBMS RDBMS

It support single user. It supports multiple users.

Software and hardware requirements are high since the size of


Software and hardware requirements are low.
the data is big.

DBMS examples are: XML, MS Access etc. RDBMS examples are: IBM Db2, Oracle, MySQL etc.
DBMS – Three Level Architecture
In the previous tutorial we have seen the DBMS architecture – one-tier, two-tier and three-tier. In this guide, we
will discuss the three level DBMS architecture in detail.

DBMS Three Level Architecture Diagram


This architecture has three levels:
1. External level
2. Conceptual level
3. Internal level
1. External level
It is also called view level. The reason this level is called “view” is because several users can view their desired
data from this level which is internally fetched from database with the help of conceptual and internal level
mapping.

The user doesn’t need to know the database schema details such as data structure, table definition etc. user is
only concerned about data which is what returned back to the view level after it has been fetched from database
(present at the internal level).

External level is the “top level” of the Three Level DBMS Architecture.

2. Conceptual level
It is also called logical level. The whole design of the database such as relationship among data, schema of data
etc. are described in this level.

Database constraints and security are also implemented in this level of architecture. This level is maintained by
DBA (database administrator).

3. Internal level
This level is also known as physical level. This level describes how the data is actually stored in the storage
devices. This level is also responsible for allocating space to the data. This is the lowest level of the
architecture.
Database Applications – DBMS
In this guide, you will learn the various DBMS applications. These applications help you understand the use of
DBMS in various fields.

DBMS applications
Applications where we use Database Management Systems are:

• Telecom: There is a database to keeps track of the information regarding calls made, network usage,
customer details etc. Without the database systems it is hard to maintain that huge amount of data
that keeps updating every millisecond.
• Industry: Where it is a manufacturing unit, warehouse or distribution centre, each one needs a
database to keep the records of ins and outs. For example distribution centre should keep a track of
the product units that supplied into the centre as well as the products that got delivered out from the
distribution centre on each day; this is where DBMS comes into picture.
• Banking System: For storing customer info, tracking day to day credit and debit transactions,
generating bank statements etc. All this work has been done with the help of Database management
systems. Also, banking system needs security of data as the data is sensitive, this is efficiently taken
care by the DBMS systems.
• Sales: To store customer information, production information and invoice details. Using DBMS, you
can track, manage and generate historical data to analyse the sales data.
• Airlines: To travel though airlines, we make early reservations, this reservation information along with
flight schedule is stored in database. This is where the real-time update of data is necessary as a
flight seat reserved for one passenger should not be allocated to another passenger, this is easily
handled by the DBMS systems as the data updates are in real time and fast.
• Education sector: Database systems are frequently used in schools and colleges to store and
retrieve the data regarding student details, staff details, course details, exam details, payroll data,
attendance details, fees details etc. There is a large amount of inter-related data that needs to be
stored and retrieved in an efficient manner.
• Online shopping: You must be aware of the online shopping websites such as Amazon, Flipkart etc.
These sites store the product information, your addresses and preferences, credit details and provide
you the relevant list of products based on your query. All this involves a Database management
system. Along with managing the vast catalogue of items, there is a need to secure the user
private information such as bank & card details. All this is taken care of by database management
systems.

Data models in DBMS


BY CHAITANYA SINGH | FILED UNDER: DBMS

Data Model is a logical structure of Database. It describes the design of database to reflect entities, attributes,
relationship among data, constrains etc.

Types of Data Models


There are several types of data models in DBMS. We will cover them in detail in separate articles(Links to those
separate tutorials are already provided below). In this guide, we will just see a basic overview of types of models.

Object based logical Models – Describe data at the conceptual and view levels.

1. E-R Model
2. Object oriented Model

Record based logical Models – Like Object based model, they also describe data at the conceptual and view
levels. These models specify logical structure of database with records, fields and attributes.
1. Relational Model
2. Hierarchical Model
3. Network Model – Network Model is same as hierarchical model except that it has graph-like
structure rather than a tree-based structure. Unlike hierarchical model, this model allows each record
to have more than one parent record.

Physical Data Models – These models describe data at the lowest level of abstraction.

Entity Relationship Diagram – ER Diagram in DBMS


BY CHAITANYA SINGH | FILED UNDER: DBMS

An Entity–relationship model (ER model) describes the structure of a database with the help of a diagram,
which is known as Entity Relationship Diagram (ER Diagram). An ER model is a design or blueprint of a database
that can later be implemented as a database. The main components of E-R model are: entity set and relationship
set.

What is an Entity Relationship Diagram (ER Diagram)?


An ER diagram shows the relationship among entity sets. An entity set is a group of similar entities and these
entities can have attributes. In terms of DBMS, an entity is a table or attribute of a table in database, so by
showing relationship among tables and their attributes, ER diagram shows the complete logical structure of a
database. Lets have a look at a simple ER diagram to understand this concept.

A simple ER Diagram:
In the following diagram we have two entities Student and College and their relationship. The relationship
between Student and College is many to one as a college can have many students however a student cannot
study in multiple colleges at the same time. Student entity has attributes such as Stu_Id, Stu_Name & Stu_Addr
and College entity has attributes such as Col_ID & Col_Name.

Here are the geometric shapes and their meaning in an E-R Diagram. We will discuss these terms in detail in the
next section(Components of a ER Diagram) of this guide so don’t worry too much about these terms now, just go
through them once.

Rectangle: Represents Entity sets.


Ellipses: Attributes
Diamonds: Relationship Set
Lines: They link attributes to Entity Sets and Entity sets to Relationship Set
Double Ellipses: Multivalued Attributes
Dashed Ellipses: Derived Attributes
Double Rectangles: Weak Entity Sets
Double Lines: Total participation of an entity in a relationship set

Components of a ER Diagram
As shown in the above diagram, an ER diagram has three main components:
1. Entity
2. Attribute
3. Relationship
1. Entity
An entity is an object or component of data. An entity is represented as rectangle in an ER diagram.
For example: In the following ER diagram we have two entities Student and College and these two entities have
many to one relationship as many students study in a single college. We will read more about relationships later,
for now focus on entities.

Weak Entity:
An entity that cannot be uniquely identified by its own attributes and relies on the relationship with other entity is
called weak entity. The weak entity is represented by a double rectangle. For example – a bank account cannot
be uniquely identified without knowing the bank to which the account belongs, so bank account is a weak entity.
2. Attribute
An attribute describes the property of an entity. An attribute is represented as Oval in an ER diagram. There are
four types of attributes:

1. Key attribute
2. Composite attribute
3. Multivalued attribute
4. Derived attribute

1. Key attribute:
A key attribute can uniquely identify an entity from an entity set. For example, student roll number can uniquely
identify a student from a set of students. Key attribute is represented by oval same as other attributes however
the text of key attribute is underlined.

2. Composite attribute:

An attribute that is a combination of other attributes is known as composite attribute. For example, In student
entity, the student address is a composite attribute as an address is composed of other attributes such as pin
code, state, country.
3. Multivalued attribute:
An attribute that can hold multiple values is known as multivalued attribute. It is represented with double ovals in
an ER Diagram. For example – A person can have more than one phone numbers so the phone number attribute
is multivalued.

4. Derived attribute:
A derived attribute is one whose value is dynamic and derived from another attribute. It is represented by dashed
oval in an ER Diagram. For example – Person age is a derived attribute as it changes over time and can be
derived from another attribute (Date of birth).

E-R diagram with multivalued and derived attributes:

3. Relationship
A relationship is represented by diamond shape in ER diagram, it shows the relationship among entities. There
are four types of relationships:
1. One to One
2. One to Many
3. Many to One
4. Many to Many

1. One to One Relationship

When a single instance of an entity is associated with a single instance of another entity then it is called one to
one relationship. For example, a person has only one passport and a passport is given to one person.

2. One to Many Relationship


When a single instance of an entity is associated with more than one instances of another entity then it is called
one to many relationship. For example – a customer can place many orders but a order cannot be placed by
many customers.

3. Many to One Relationship

When more than one instances of an entity is associated with a single instance of another entity then it is called
many to one relationship. For example – many students can study in a single college but a student cannot study
in many colleges at the same time.

4. Many to Many Relationship


When more than one instances of an entity is associated with more than one instances of another entity then it
is called many to many relationship. For example, a can be assigned to many projects and a project can be
assigned to many students.

Total Participation of an Entity set


Total participation of an entity set represents that each entity in entity set must have at least one relationship in
a relationship set. It is also called mandatory participation. For example: In the following diagram each college
must have at-least one associated Student. Total participation is represented using a double line between the
entity set and relationship set.

Partial participation of an Entity Set


Partial participation of an entity set represents that each entity in the entity set may or may not participate in the
relationship instance in that relationship set. It is also called as optional participation

Partial participation is represented using a single line between the entity set and relationship set.

Example: Consider an example of an IT company. There are many employees working for the company. Let’s
take the example of relationship between employee and role software engineer. Every software engineer is an
employee but not every employee is software engineer as there are employees for other roles as well, such as
housekeeping, managers, CEO etc. so we can say that participation of employee entity set to the software
engineer relationship is partial.

You might also like