0% found this document useful (0 votes)
115 views18 pages

Dbms PPT

The document discusses different database models: hierarchical, network, and object-oriented. The hierarchical model organizes data in a tree structure with parent-child relationships, allowing one-to-many but not many-to-many relationships. The object-oriented model represents real world entities as objects that have attributes, methods, and classes, with inheritance allowing classes to share attributes and methods. This model encapsulates data within classes and allows code reuse through inheritance.

Uploaded by

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

Dbms PPT

The document discusses different database models: hierarchical, network, and object-oriented. The hierarchical model organizes data in a tree structure with parent-child relationships, allowing one-to-many but not many-to-many relationships. The object-oriented model represents real world entities as objects that have attributes, methods, and classes, with inheritance allowing classes to share attributes and methods. This model encapsulates data within classes and allows code reuse through inheritance.

Uploaded by

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

DATABASE MODELS

GROUP-01
DATABASE
MODELS Types of Database Models:

A Database model defines


● Hierarchical Model
the logical design and
● Network Model
structure of a database and
● Object Oriented (OO) Data
defines how data will be
Model
stored, accessed and
updated in a database
management system.
Hierarchical Model

This model is like a structure of a tree with the records


forming the nodes and fields forming the branches of the
tree.The hierarchical model organizes data elements as
tabular rows, one for each instance of entity.

In the hierarchical data model, records are linked with


other superior records on which they are dependent and
also on the records, which are dependent on them. A tree
structure may establish one-to-many relationship.

Retrieved from : http://ecomputernotes.com/fundamental/what-is-a-database/database-model


Hierarchical Model

The different elements (e.g. records) present in


the hierarchical tree structure have Parent-
Child relationship. A Parent element can have
many children elements but a Child element
cannot have many parent elements.That is,
hierarchical model cannot represent many to
many relationships among records.

Retrieved from : http://ecomputernotes.com/fundamental/what-is-a-database/database-model


Hierarchical Model

Retrieved from : http://ecomputernotes.com/fundamental/what-is-a-database/database-model


Hierarchical Model

Advantages

Clear Chain of Command

Clear Paths of Advancement

Specialization

Database Integrity

Retrieved from : https://bizfluent.com/about-5065481-matrix-organizational-chart-.html


Hierarchical Model
Disadvantages

Poor Flexibility

Communication Barriers

Organizational Disunity

Retrieved from : https://bizfluent.com/about-5065481-matrix-organizational-chart-.html


Network Model - SANCHIT
Object-Oriented Model

Object oriented data model is based upon real world situations. These situations are
represented as objects, with different attributes. All these object have multiple relationships
between them.

Elements of Object oriented data model :

Objects

Attributes and Method

Class

Inheritance
Elements of Object oriented data model

Objects : The real world entities and situations are represented as objects in the Object
oriented database model.

Attributes and Method : Every object has certain characteristics. These are represented using
Attributes. The behaviour of the objects is represented using Methods.

Class : Similar attributes and methods are grouped together using a class. An object can be
called as an instance of the class.

Inheritance : A new class can be derived from the original class. The derived class contains
attributes and methods of the original class as well as its own.
Example

Let us consider an Employee database to understand this model better. In this database we
have different types of employees – Engineer, Accountant, Manager, Clerk. But all these
employees belong to Person group. Person can have different attributes like name, address,
age and phone. What do we do if we want to get a person’s address and phone number? We
write two separate procedure sp_getAddress and sp_getPhone.

What about all the employees above? They too have all the attributes what a person has. In
addition, they have their EMPLOYEE_ID, EMPLOYEE_TYPE and DEPARTMENT_ID attributes
to identify them in the organization and their department. We have to retrieve their
department details, and hence we sp_getDeptDetails procedure. Currently, say we need to
have only these attributes and functionality.
Example

Since all employees inherit the attributes and functionalities of Person, we can re-use those
features in Employee. But how do we do that?

We group the features of person together into class. Hence a class has all the attributes and
functionalities. For example, we would create a person class and it will have name, address, age
and phone as its attribute, and sp_getAddress and sp_getPhone as procedures in it.

The values for these attributes at any instance of time are object. i.e. ; {John, Troy, 25,
2453545 : sp_getAddress (John), sp_getPhone (John)} forms on person object. {Mathew, Fraser
Town, 28, 5645677: sp_getAddress (Mathew), sp_getPhone (Mathew} forms another person
object.
Example

Now, we will create another class called Employee which will inherit all the functionalities of
Person class. In addition it will have attributes EMPLOYEE_ID, EMPLOYEE_TYPE and
DEPARTMENT_ID, and sp_getDeptDetails procedure. Different objects of Employee class are
Engineer, Accountant, Manager and Clerk.
Example
Example

Here we can observe that the features of Person are available only if other class is inherited
from it. It would be a black box to any other classes. This feature of this model is called
encapsulation. It binds the features in one class and hides it from other classes. It is only visible
to its objects and any inherited classes.
ADVANTAGES

● Because of its inheritance property, we can re-use the attributes and functionalities. It
reduces the cost of maintaining the same data multiple times. Also, these informations
are encapsulated and, there is no fear being misused by other objects. If we need any new
feature we can easily add new class inherited from parent class and adds new features.
Hence it reduces the overhead and maintenance costs.
● Because of the above feature, it becomes more flexible in the case of any changes.
● Codes are re-used because of inheritance.
● Since each class binds its attributes and its functionality, it is same as representing the
real world object. We can see each object as a real entity. Hence it is more
understandable.
DISADVANTAGES

● It is not widely developed and complete to use it in the database systems. Hence it is not
accepted by the users.

● It is an approach for solving the requirement. It is not a technology. Hence it fails to put it
in the database management systems.
THANKS

You might also like