0% found this document useful (0 votes)
50 views

Unit-1 DBMS English

The document discusses Database Management System (DBMS). It provides examples of a university database with five files containing student, course, section, grade and tutor information. It also discusses defining the structure of records in each file and using foreign keys between tables. The history of DBMS is outlined, including important developments from 1960 to the 1990s. Characteristics of DBMS are listed, such as providing security, supporting multiple views, and following the ACID properties. Popular DBMS software, sectors that use DBMS and database schema are also mentioned.

Uploaded by

Awesome Vids
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views

Unit-1 DBMS English

The document discusses Database Management System (DBMS). It provides examples of a university database with five files containing student, course, section, grade and tutor information. It also discusses defining the structure of records in each file and using foreign keys between tables. The history of DBMS is outlined, including important developments from 1960 to the 1990s. Characteristics of DBMS are listed, such as providing security, supporting multiple views, and following the ACID properties. Popular DBMS software, sectors that use DBMS and database schema are also mentioned.

Uploaded by

Awesome Vids
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

What is DBMS

Database Management System (DBMS) is software for storing and retrieving users’ data
while considering appropriate security measures. It consists of a group of programs that
manipulate the database. The DBMS accepts the request for data from an application and
instructs the operating system to provide the specific data. In large systems, a DBMS helps
users and other third-party software store and retrieve data.
DBMS allows users to create their own databases as per their requirements. The term
“DBMS” includes the user of the database and other application programs. It provides an
interface between the data and the software application.

Example of a DBMS
Let us see a simple example of a university database. This database is maintaining
information concerning students, courses, and grades in a university environment. The
database is organized as five files:

 The STUDENT file stores the data of each student


 The COURSE file stores contain data on each course.
 The SECTION stores information about sections in a particular course.
 The GRADE file stores the grades which students receive in the various sections
 The TUTOR file contains information about each professor.

To define DBMS:

 We need to specify the structure of the records of each file by defining the different
types of data elements to be stored in each record.
 We can also use a coding scheme to represent the values of a data item.
 Basically, your Database will have 5 tables with a foreign key defined amongst the
various tables.

History of DBMS
Here, are the important landmarks from the history of DBMS:

 1960 – Charles Bachman designed the first DBMS system


 1970 – Codd introduced IBM’S Information Management System (IMS)
 1976- Peter Chen coined and defined the Entity-relationship model, also known as
the ER model
 1980 – Relational Model becomes a widely accepted database component
 1985- Object-oriented DBMS develops.
 1990s- Incorporation of object-orientation in relational DBMS.
 1991- Microsoft ships MS access, a personal DBMS, and that displaces all other
personal DBMS products.
 1995: First Internet database applications
Meghraj Soni Class-BSc-IV Sem (CS)
 1997: XML applied to database processing. Many vendors begin to integrate XML into
DBMS products.

Characteristics of DBMS
Here are the characteristics and properties of a Database Management System:

 Provides security and removes redundancy


 Self-describing nature of a database system
 Insulation between programs and data abstraction
 Support of multiple views of the data
 Sharing of data and multiuser transaction processing
 Database Management Software allows entities and relations among them to form
tables.
 It follows the ACID concept (Atomicity, Consistency, Isolation, and Durability).
 DBMS supports a multi-user environment that allows users to access and manipulate
data in parallel.

Information:
Information is the processed data on which decisions and actions are based. Information
can be defined as the organized and classified data to provide meaningful values. Eg: “The
age of Ravi is 25”

File: File is a collection of related data stored in secondary memory.

File Oriented Approach: The traditional file oriented approach to information processing
each application has a separate master file and its own set of personal file. In file oriented
approach the program dependent on the files and files dependent upon the programs.

Disadvantages of file oriented approach:


1) Data redundancy and inconsistency: The same information may be written in several
files. This redundancy leads to higher storage and access cost. It may lead data
inconsistency that is the various copies of the same data may present at multiple places for
example a changed customer address may be reflected in single file but not elsewhere in
the system.

2) Difficulty in accessing data : The conventional file processing system do not allow data to
be retrieved in a convenient and efficient manner according to user choice.

3) Data isolation: Because data are scattered in various files and files may be in different
formats with new application programs to retrieve the appropriate data is difficult.
Meghraj Soni Class-BSc-IV Sem (CS)
4) Integrity Problems: Developers enforce data validation in the system by adding
appropriate code in the various application program. However when new constraints are
added, it is difficult to change the programs to enforce them.

5) Atomicity: It is difficult to ensure atomicity in a file processing system when transaction


failure occurs due to power failure, networking problems etc. (atomicity: either all
operations of the transaction are reflected properly in the database or non are)

6) Concurrent access: In the file processing system it is not possible to access the same file
for transaction at same the time.

7) Security problems: There is no security provided in file processing system to secure the
data from unauthorized user access.

DBMS vs. File


DBMS Flat File Management System
Multi-user access It does not support multi-user access
Design to fulfill the need of small and large It is only limited to smaller DBMS systems.
businesses
Remove redundancy and Integrity issues. Redundancy and Integrity issues
Expensive. But in the long term Total Cost It’s cheaper
of Ownership is cheap

Easy to implement complicated No support for complicated transactions


transactions

Popular DBMS Software

 MySQL
 Microsoft Access
 Oracle
 PostgreSQL
 dBASE
 FoxPro
 SQLite
 IBM DB2
 LibreOffice Base
 MariaDB
 Microsoft SQL Server

Meghraj Soni Class-BSc-IV Sem (CS)


Application of DBMS
Sector Use of DBMS
Banking For customer information, account activities, payments,
deposits, loans, etc.
Airlines For reservations and schedule information.
Universities For student information, course registrations, colleges, and
grades.
Telecommunication It helps to keep call records, monthly bills, maintain balances,
etc.
Finance For storing information about stock, sales, and purchases of
financial instruments like stocks and bonds.
Sales Use for storing customer, product & sales information.
Manufacturing It is used to manage the supply chain and track the production
of items. Inventories status in warehouses.
HR Management For information about employees, salaries, payroll, deduction,
generation of paychecks, etc.
Database Schema
A database schema is a structure that represents the logical storage of the data in a
database. It represents the organization of data and provides information about the
relationships between the tables in a given database.

Data Independence

o Data independence can be explained using the three-schema architecture.


o Data independence refers characteristic of being able to modify the schema at one
level of the database system without altering the schema at the next higher level.
o Data is separated from the programs, so that the changes made to the data will not
affect the program execution and the application.
o We know the main purpose of the three levels of data abstraction is to achieve data
independence.

There are two types of data independence:

1. Logical Data Independence

o Logical data independence refers characteristic of being able to change the conceptual
schema without having to change the external schema.

Meghraj Soni Class-BSc-IV Sem (CS)


o Logical data independence is used to separate the external level from the conceptual
view.
o If we do any changes in the conceptual view of the data, then the user view of the data
would not be affected.
o Logical data independence occurs at the user interface level.

2. Physical Data Independence

o Physical data independence can be defined as the capacity to change the internal
schema without having to change the conceptual schema.
o If we do any changes in the storage size of the database system server, then the
Conceptual structure of the database will not be affected.
o Physical data independence is used to separate conceptual levels from the internal
levels.
o Physical data independence occurs at the logical interface level.

Different types of Database Users



Database users are categorized based up on their interaction with the database. These are
seven types of database users in DBMS.
1. Database Administrator (DBA) : Database Administrator (DBA) is a person/team who
defines the schema and also controls the 3 levels of database. The DBA will then create a
new account id and password for the user if he/she need to access the database. DBA is
also responsible for providing security to the database and he allows only the authorized
users to access/modify the data base. DBA is responsible for the problems such as
security breaches and poor system response time.
Meghraj Soni Class-BSc-IV Sem (CS)
 DBA also monitors the recovery and backup and provide technical support.
 The DBA has a DBA account in the DBMS which called a system or superuser account.
 DBA repairs damage caused due to hardware and/or software failures.
 DBA is the one having privileges to perform DCL (Data Control Language) operations
such as GRANT and REVOKE, to allow/restrict a particular user from accessing the
database.
2. Naive / Parametric End Users : Parametric End Users are the unsophisticated who don’t
have any DBMS knowledge but they frequently use the database applications in their
daily life to get the desired results. For examples, Railway’s ticket booking users are
naive users. Clerks in any bank is a naive user because they don’t have any DBMS
knowledge but they still use the database and perform their given task.
3. System Analyst :
System Analyst is a user who analyzes the requirements of parametric end users. They
check whether all the requirements of end users are satisfied.
4. Sophisticated Users : Sophisticated users can be engineers, scientists, business analyst,
who are familiar with the database. They can develop their own database applications
according to their requirement. They don’t write the program code but they interact the
database by writing SQL queries directly through the query processor.
5. Database Designers : Data Base Designers are the users who design the structure of
database which includes tables, indexes, views, triggers, stored procedures and
constraints which are usually enforced before the database is created or populated with
data. He/she controls what data must be stored and how the data items to be related. It
is responsibility of Database Designers to understand the requirements of different user
groups and then create a design which satisfies the need of all the user groups.
6. Application Programmers : Application Programmers also referred as System Analysts
or simply Software Engineers, are the back-end programmers who writes the code for
the application programs. They are the computer professionals. These programs could
be written in Programming languages such as Visual Basic, Developer, C, FORTRAN,
COBOL etc. Application programmers design, debug, test, and maintain set of programs
called “canned transactions” for the Naive (parametric) users in order to interact with
database.

Users of DBMS
Following are the various category of users of DBMS

Component Name Task


Application Programmers The Application programmers write programs in
various programming languages to interact with
databases.
Database Administrators Database Admin is responsible for managing the
entire DBMS system. He/She is called Database
admin or DBA.

Meghraj Soni Class-BSc-IV Sem (CS)


Database Designers the type of database users in DBMS who are
responsible for implementing the overall design of
the database.
End-Users (Naive users / The end users are the people who interact with
Parametric End users) the database management system. They conduct
various operations on databases like retrieving,
updating, deleting, etc.
Sophisticated user Who have knowledge of DBMS (DDL & DML
commands) and are familiar with the database.
Instead of writing whole programming code, they
can interact with the database directly using SQL
queries using the query processor.

Roles of Database Administrator (DBA) in DBMS


DBA: The person in the organization who controls the design and use of the database is
called DBA.
1. Schema Definition: DBA defines the logical schema of the database. Schema refers to the
overall logical structure of the database.
According to this Schema, a database will be developed to store the data required for an
organization.
2. Storage Structure and Access Method Definition:
The DBA decides how data is represented in the storage database.
3. Assisting Application Programmers:
DBA provides assistance to application programmers to develop application programs.
4. Physical Organization Modification:
The DBA reflects the physical organization of the database to reflect the changing needs
of the organization or to improve performance.
5. Approving Data Access:
The DBA determines which parts of the database the users need to access. According to
this, different types of authorizations are given to different users.
6. Monitoring Performance:
DBA monitors the performance of the system. The DBA ensures that optimal
performance is maintained by making changes to the physical or logical schema if
necessary.

Meghraj Soni Class-BSc-IV Sem (CS)


7. Backup and Recovery:
Database should not be lost or damaged.
DBA periodically takes backup of the database on magnetic tapes or remote servers.
In case of failure, such as a virus attack, the database is recovered from this backup.

DBMS Architecture 1-level, 2-Level, 3-Level

A Database stores a lot of critical information to access data quickly and securely. Hence it is
important to select the correct architecture for efficient data management. DBMS
Architecture helps users to get their requests done while connecting to the database. We
choose database architecture depending on several factors like the size of the database,
number of users, and relationships between the users. There are two types of database
models that we generally use, logical model and physical model. Several types of architecture
are there in the database which we will deal with in the next section.
Types of DBMS Architecture
There are several types of DBMS Architecture that we use according to the usage
requirements. Types of DBMS Architecture are discussed here.
 1-Tier Architecture
 2-Tier Architecture
 3-Tier Architecture
1-Tier Architecture
In 1-Tier Architecture the database is directly available to the user, the user can directly sit
on the DBMS and use it that is, the client, server, and Database are all present on the same
machine. For Example: to learn SQL we set up an SQL server and the database on the local
system. This enables us to directly interact with the relational database and execute
operations. The industry won’t use this architecture they logically go for 2-tier and 3-tier
Architecture.

DBMS 1-Tier Architecture

Advantages of 1-Tier Architecture


Below mentioned are the advantages of 1-Tier Architecture.

Meghraj Soni Class-BSc-IV Sem (CS)


 Simple Architecture: 1-Tier Architecture is the most simple architecture to set up, as
only a single machine is required to maintain it.
 Cost-Effective: No additional hardware is required for implementing 1-Tier Architecture,
which makes it cost-effective.
 Easy to Implement: 1-Tier Architecture can be easily deployed, and hence it is mostly
used in small projects.
2-Tier Architecture
The 2-tier architecture is similar to a basic client-server model. The application at the client
end directly communicates with the database on the server side. APIs like ODBC and JDBC
are used for this interaction. The server side is responsible for providing query processing
and transaction management functionalities. On the client side, the user interfaces and
application programs are run. The application on the client side establishes a connection with
the server side to communicate with the DBMS.
An advantage of this type is that maintenance and understanding are easier, and compatible
with existing systems. However, this model gives poor performance when there are a large
number of users.

DBMS 2-Tier Architecture

Advantages of 2-Tier Architecture


 Easy to Access: 2-Tier Architecture makes easy access to the database, which makes fast
retrieval.
 Scalable: We can scale the database easily, by adding clients or upgrading hardware.
 Low Cost: 2-Tier Architecture is cheaper than 3-Tier Architecture and Multi-Tier
Architecture.
 Easy Deployment: 2-Tier Architecture is easier to deploy than 3-Tier Architecture.
 Simple: 2-Tier Architecture is easily understandable as well as simple because of only
two components.
3-Tier Architecture
In 3-Tier Architecture, there is another layer between the client and the server. The client
does not directly communicate with the server. Instead, it interacts with an application server
which further communicates with the database system and then the query processing and
transaction management takes place. This intermediate layer acts as a medium for the
exchange of partially processed data between the server and the client. This type of
architecture is used in the case of large web applications.

Meghraj Soni Class-BSc-IV Sem (CS)


DBMS 3-Tier Architecture

Advantages of 3-Tier Architecture


 Enhanced scalability: Scalability is enhanced due to the distributed deployment of
application servers. Now, individual connections need not be made between the client
and server.
 Data Integrity: 3-Tier Architecture maintains Data Integrity. Since there is a middle layer
between the client and the server, data corruption can be avoided/removed.
 Security: 3-Tier Architecture Improves Security. This type of model prevents direct
interaction of the client with the server thereby reducing access to unauthorized data.
Disadvantages of 3-Tier Architecture
 More Complex: 3-Tier Architecture is more complex in comparison to 2-Tier
Architecture. Communication Points are also doubled in 3-Tier Architecture.
 Difficult to Interact: It becomes difficult for this sort of interaction to take place due to
the presence of middle layers.

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

Meghraj Soni Class-BSc-IV Sem (CS)


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.

Meghraj Soni Class-BSc-IV Sem (CS)


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.

Structure of Database Management System


Database Management System (DBMS) is software that allows access to data stored in a
database and provides an easy and effective method of –
 Defining the information.
 Storing the information.
 Manipulating the information.
 Protecting the information from system crashes or data theft.
 Differentiating access permissions for different users.

Note: Structure of Database Management System is also referred to as Overall System


Structure or Database Architecture but it is different from the tier architecture of Database.
The database system is divided into three components: Query Processor, Storage Manager,
and Disk Storage. These are explained as following below.

Meghraj Soni Class-BSc-IV Sem (CS)


Architecture of DBMS

1. Query Processor: It interprets the requests (queries) received from end user via an
application program into instructions. It also executes the user request which is received
from the DML compiler.
Query Processor contains the following components –
 DML Compiler: It processes the DML statements into low level instruction (machine
language), so that they can be executed.
 DDL Interpreter: It processes the DDL statements into a set of table containing meta
data (data about data).
 Embedded DML Pre-compiler: It processes DML statements embedded in an application
program into procedural calls.
 Query Optimizer: It executes the instruction generated by DML Compiler.
2. Storage Manager: Storage Manager is a program that provides an interface between the
data stored in the database and the queries received. It is also known as Database Control
System. It maintains the consistency and integrity of the database by applying the
constraints and executing the DCL statements. It is responsible for updating, storing,

Meghraj Soni Class-BSc-IV Sem (CS)


deleting, and retrieving data in the database.
It contains the following components –
 Authorization Manager: It ensures role-based access control, i.e,. checks whether the
particular person is privileged to perform the requested operation or not.

 Integrity Manager: It checks the integrity constraints when the database is modified.

 Transaction Manager: It controls concurrent access by performing the operations in a


scheduled way that it receives the transaction. Thus, it ensures that the database
remains in the consistent state before and after the execution of a transaction.

 File Manager: It manages the file space and the data structure used to represent
information in the database.

 Buffer Manager: It is responsible for cache memory and the transfer of data between
the secondary storage and main memory.

3. Disk Storage: It contains the following components –


 Data Files: It stores the data.

 Data Dictionary: It contains the information about the structure of any database object.
It is the repository of information that governs the metadata (data about data).

 Indices: It provides faster retrieval of data item.


The structure of a Database Management System (DBMS) can be divided into three main
components: the Internal Level, the Conceptual Level, and the External Level.
1. Internal Level: This level represents the physical storage of data in the database. It is
responsible for storing and retrieving data from the storage devices, such as hard drives
or solid-state drives. It deals with low-level implementation details such as data
compression, indexing, and storage allocation.
2. Conceptual Level: This level represents the logical view of the database. It deals with the
overall organization of data in the database and the relationships between them. It
defines the data schema, which includes tables, attributes, and their relationships. The
conceptual level is independent of any specific DBMS and can be implemented using
different DBMSs.
3. External Level: This level represents the user’s view of the database. It deals with how
users access the data in the database. It allows users to view data in a way that makes
sense to them, without worrying about the underlying implementation details. The
external level provides a set of views or interfaces to the database, which are tailored to
meet the needs of specific user groups.
The three levels are connected through a schema mapping process that translates data
from one level to another. The schema mapping process ensures that changes made at one
level are reflected in the other levels.

Meghraj Soni Class-BSc-IV Sem (CS)


Data Dictionary
In a DBMS, a data dictionary is a file or group of files that stores the metadata of the
database.

The data dictionary does not contain the actual data of the database, rather it only stores
information (such as table names and descriptions, etc.) in the form of ledgers to manage
the data.

Without data dictionary, dbms cannot access data from the database.

Data dictionary is also called metadata and the data that provides information about the
data is called metadata.

Data dictionary is used to control database operations, data integrity and accuracy.

There are two types of data dictionary:-

1:-Active data dictionary

2:-Passive data dictionary

1:-Active data dictionary:-The data dictionary which is automatically updated by the DBMS
all the time is called Active data dictionary.

In Activate data dictionary, database and data dictionary are together, that is, data
dictionary is created in the data base.

If we have to delete or rename some data, we can do it easily in the data dictionary through
DDL (Data Definition Language), but if we have to insert or modify something, it is updated
by the database itself. That means there is no mismatch of any kind between the data
dictionary and the database. This type of data dictionary is called Active data dictionary.

2:-Passive data dictionary:-Passive data dictionary is also similar to active data dictionary
but in this it is not automatically updated by DBMS.

In passive data dictionary there is no match between data dictionary and database. In some
databases, the data dictionary is made a separate database. Which only stores the
information of data dictionary. If we delete or insert something in the data dictionary, it
remains limited to the data dictionary only, it does not have any effect on the main
database. This type of data dictionary is called Passive data dictionary.

Database Language
Meghraj Soni Class-BSc-IV Sem (CS)
• To communicate with the database.
The language used to read, update, and store data in the database is called database
language.
In DBMS, database languages are used to create, delete and manage the database.
Types of Database Languages
Database languages are basically as follows.
1) DDL Data Definition Language
2) DML Data Manipulation Language
3) DCL Data Control Language
4) TCL Transaction Control Language

1- DDL
• Full name of DDL is Data Definition Language. It is used to define the structure of the
database.
• DDL is used to create schema, index, and constraints etc. in the database.
• Apart from this, DDL is also used to store metadata information.
DDL commands
1. CREATE – It is used to create objects in the database.
2. ALTER – It is used to make changes in the structure of the database.
3. TRUNCATE – It is used to remove the data present in the table.
4. DROP – It is used to delete the objects present in the database.
5. COMMENT – It is used to comment in the data dictionary.
6. RENAME – It is used to change the name of the object.

2- DML
• The full name of DML is Data Manipulation Language.
• DML is used to access and manipulate data in the database.
• It handles user requests.
DML commands
1. SELECT – It is used to retrieve or fetch data from the database.
2. INSERT – It is used to insert data in the table.
3. UPDATE – It is used to update the existing data in the table.
4. DELETE – It is used to delete all the records from the table.
5. CALL – It is used to call SQL function and java subprogram. ,
6. LOCK TABLE – It is used to control concurrency.
7. MERGE – This command is made up of INSERT, DELETE, and UPDATE commands.
Therefore it can do all three tasks insert, delete and update.

3- DCL
• Full name of DCL is Data Control Language. It is used to access stored data.
• DCL is used to control user privileges.
• It is mostly used to provide and take away access to the database to the user.
DCL commands
1. GRANT – It is used to provide access to the database to the user.
Meghraj Soni Class-BSc-IV Sem (CS)
2. REVOKE – REVOKE command is used to withdraw the privilege or access given by GRANT
command.

4- TCL
• The full name of TCL is Transaction Control Language.
• TCL is used to manage transactions in the database.
TCL commands
1. Rollback- It is used to restore the old database.
2. Savepoint- This command sets a save point within a transaction.
3. Commit – It is used to save the transaction in the database.

Data Model
Data models in DBMS help to understand the design at the conceptual, physical, and logical
levels as it provides a clear picture of the data making it easier for developers to create a
physical database.
Data models are used to describe how the data is stored, accessed, and updated in a DBMS.
A set of symbols and text is used to represent them so that all the members of an
organization can understand how the data is organized. It provides a set of conceptual tools
that are vastly used to represent the description of data.

The data model describes the structure of a database. It is a collection of conceptual


tools for describing data, data relationships and consistency constraints and various
types of data models such as
1. Object based logical model
2. Record based logical model
3. Physical model

Meghraj Soni Class-BSc-IV Sem (CS)


There are several different Database model types, some of them are old, while some of
them are new, to cater to the new age requirements. Here is a list of the 7 popular
Database models:

1. Hierarchical Model
2. Network Model
3. Entity-relationship Model
4. Relational Model
5. Object-oriented Model
6. NoSQL Model
7. Graph Model

1. Hierarchical Model

 The hierarchical database model organizes data into a tree-like structure, with
a single root, to which all the other data is linked.
 The hierarchy starts from the Root data, and expands like a tree, adding child nodes
to the parent nodes.
 In this model, a child node will only have a single parent node.
 This model efficiently describes many real-world relationships like the index of a
book, etc.
 IBM's Information Management System (IMS) is based on this model.
 Data is organized into a tree-like structure with a one-to-many relationship between
two different types of data, for example, one department can have many courses,
many teachers, and of course many students(like shown in the diagram below).

Advantages/Disadvantages of the Hierarchical Model

Here are a few points to mark the advantages and disadvantages of the Hierarchical
database model:

Meghraj Soni Class-BSc-IV Sem (CS)


1. Because it has one-to-many relationships between different types of data so it is
easier and fast to fetch the data.
2. But the Hierarchical model is less flexible.
3. And it doesn't support many-to-many relationships.

2. Network Model

 The Network Model is an extension of the Hierarchical model.


 In this model, data is organized more like a graph, and allowed to have more than
one parent node.
 In the network database model, data is more related as more relationships are
established in this database model.
 Also, as the data is more related, hence accessing the data is also easier and fast.
 This database model uses many-to-many data relationships.
 Integrated Data Store (IDS) is based on this database model.
 This was the most widely used database model before Relational Model was
introduced.
 The implementation of the Network model is complex, and it's very difficult to
maintain it.
 The Network model is difficult to modify also.
 You may want to explore this if you are developing some social networking
applications, although the Graph Database model is new and is far better than the
Network Database model.

Advantages of the Network Model

1. It supports complex relationships


2. It allows more flexibility

3. Entity-relationship Model

Meghraj Soni Class-BSc-IV Sem (CS)


 In this database model, relationships are created by dividing objects of interest into
entities and their characteristics into attributes.
 Different entities are related using relationships.
 ER Models are defined to represent the relationships in pictorial form to make it
easier for different stakeholders to understand.
 This model is good to design a database, which can then be turned into tables in a
relational model (explained below).
 Let's take an example, If we have to design a School Database, then the Student will
be an entity with attributes name, age, address, etc. As an Address is generally
complex, it can be another entity with attributes street, pincode, city, etc, and there
will be a relationship between them.
 Relationships can also be of different types. You can learn about ER Diagrams in
detail if you want to learn about entities and relationships.

Advantages of the ER Model

1. It is easy to understand and design.


2. Using the ER model we can represent data structures easily.
3. As the ER model cannot be directly implemented into a database model, it is just a
step toward designing the relational database model.

4. Relational Model

 In this model, data is organized in two-dimensional tables and the relationship is


maintained by storing a common field.
 This model was introduced by E.F Codd in 1970, and since then it has been the most
widely used database model.
 The basic structure of data in the relational model is tables. All the information
related to a particular type is stored in rows of that table.
 Hence, tables are also known as relations in the relational model.

Meghraj Soni Class-BSc-IV Sem (CS)


 You can design tables, normalize them to reduce data redundancy,
and use Structured Query language or SQL to access data from the tables.
 Some of the most popular databases are based on this database model. For
example, Oracle, MySQL, etc.

Advantages of the Relational Model

1. It's simple and easy to implement.


2. Poplar database software is available for this database model.
3. It supports SQL using which you can easily query the data.

5. Object-oriented Model

 In this model, data is stored in the form of objects.


 The behavior of the object-oriented database model is just like object-oriented
programming.
 A very popular example of an Object Database management system
or ODBMS is MongoDB which is also a NoSQL database.
 This database model is not mature enough as compared to the relational database
model.

Meghraj Soni Class-BSc-IV Sem (CS)


Advantages of the Object-oriented Model

1. It can easily support complex data structures, with relationships.


2. It also supports features like Inheritance, Encapsulation, etc.

6. NoSQL Model

 The NoSQL database model supports an unstructured style of storing data.


 Data is stored as documents.
 The documents look more like JSON strings or Key-value based object
representations.
 It provides a flexible schema.
 It does provide features like indexing, relationships between data, etc.
 The support for data querying is limited in the NoSQL database model.
 This database model is well-suited for Big data applications, real-time analytics, CMS
(Content Management systems), etc.

Advantages of the NoSQL Model


Meghraj Soni Class-BSc-IV Sem (CS)
1. This database model is scalable.
2. This database model functions with high performance.
3. The NoSQL database model can handle large volumes of data.

7. Graph Model

 The Graph database model is based on more real-world like relationships.


 Data is represented using Nodes or entities.
 The nodes are related using edges.
 The popular database Neo4j is based on the Graph database model.
 If your application has simple data requirements, then you should not use the graph
database model.
 In modern applications like social networks, recommendation systems, etc. the graph
database model is well-suited.

Advantages of the Graph Model

1. It handles complex relationships very well.


2. In the modern world where there is so much data and the data has to be related in
different ways, the graph database model is very useful.

Meghraj Soni Class-BSc-IV Sem (CS)

You might also like